...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::image_object — Base-class for image objects.
// In header: <boost/compute/image/image_object.hpp> class image_object : public memory_object { public: // construct/copy/destruct image_object(); explicit image_object(cl_mem, bool = true); image_object(const image_object &); image_object(image_object &&) noexcept; image_object & operator=(const image_object &); ~image_object(); // public member functions template<typename T> T get_image_info(cl_mem_info) const; image_format format() const; size_t width() const; size_t height() const; size_t depth() const; // public static functions static std::vector< image_format > get_supported_formats(const context &, cl_mem_object_type, cl_mem_flags = read_write); static bool is_supported_format(const image_format &, const context &, cl_mem_object_type, cl_mem_flags = read_write); };
The image_object class is the base-class for image objects on compute devices.
See Also:
image_object
public
construct/copy/destructimage_object();
explicit image_object(cl_mem mem, bool retain = true);
image_object(const image_object & other);
image_object(image_object && other) noexcept;
image_object & operator=(const image_object & other);
~image_object();Destroys the image object.
image_object
public member functionstemplate<typename T> T get_image_info(cl_mem_info info) const;
Returns information about the image object.
See the documentation for
image_format format() const;Returns the format for the image.
size_t width() const;Returns the width of the image.
size_t height() const;
Returns the height of the image.
For 1D images, this function will return 1
.
size_t depth() const;
Returns the depth of the image.
For 1D and 2D images, this function will return 1
.
image_object
public static functionsstatic std::vector< image_format > get_supported_formats(const context & context, cl_mem_object_type type, cl_mem_flags flags = read_write);
Returns the supported image formats for the type
in context
.
See the documentation for
static bool is_supported_format(const image_format & format, const context & context, cl_mem_object_type type, cl_mem_flags flags = read_write);
Returns true
if format
is a supported image format for type
in context
with flags
.