Skip to content

Commit 8cf1a0f

Browse files
committed
* Addede two utility functions:
channel_order get_channel_order() channel_data_type get_channel_data_type() const
1 parent 07b5659 commit 8cf1a0f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/boost/compute/image/image_format.hpp

+12
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ class image_format
110110
return &m_format;
111111
}
112112

113+
/// Returns the imgage channel order.
114+
channel_order get_channel_order() const
115+
{
116+
return static_cast<channel_order>(m_format.image_channel_order);
117+
}
118+
119+
/// Returns the imgage channel data type.
120+
channel_data_type get_channel_data_type() const
121+
{
122+
return static_cast<channel_data_type>(m_format.image_channel_data_type);
123+
}
124+
113125
/// Returns \c true if \c *this is the same as \p other.
114126
bool operator==(const image_format &other) const
115127
{

0 commit comments

Comments
 (0)