...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::image3d — An OpenCL 3D image object.
// In header: <boost/compute/image/image3d.hpp> class image3d : public boost::compute::image_object { public: // construct/copy/destruct image3d(); image3d(const context &, size_t, size_t, size_t, const image_format &, cl_mem_flags = read_write, void * = 0, size_t = 0, size_t = 0); image3d(const image3d &); image3d(image3d &&) noexcept; image3d & operator=(const image3d &); image3d & operator=(image3d &&) noexcept; ~image3d(); // public member functions extents< 3 > size() const; extents< 3 > origin() const; template<typename T> T get_info(cl_image_info) const; template<int Enum> unspecified get_info() const; image3d clone(command_queue &) const; // public static functions static std::vector< image_format > get_supported_formats(const context &, cl_mem_flags = read_write); static bool is_supported_format(const image_format &, const context &, cl_mem_flags = read_write); };
See Also:
image3d
public
construct/copy/destructimage3d();Creates a null
image3d
object. image3d(const context & context, size_t image_width, size_t image_height, size_t image_depth, const image_format & format, cl_mem_flags flags = read_write, void * host_ptr = 0, size_t image_row_pitch = 0, size_t image_slice_pitch = 0);
Creates a new image3d
object.
See the documentation for
image3d(const image3d & other);Creates a new
image3d
as a copy of other
. image3d(image3d && other) noexcept;Move-constructs a new image object from
other
. image3d & operator=(const image3d & other);Copies the
image3d
from other
. image3d & operator=(image3d && other) noexcept;Move-assigns the image from
other
to *this
. ~image3d();Destroys the
image3d
object. image3d
public member functionsextents< 3 > size() const;Returns the size (width, height, depth) of the image.
extents< 3 > origin() const;Returns the origin of the image (
0
, 0
, 0
). template<typename T> T get_info(cl_image_info info) const;
Returns information about the image.
See the documentation for
template<int Enum> unspecified get_info() const;This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
image3d clone(command_queue & queue) const;
Creates a new image with a copy of the data in *this
. Uses queue
to perform the copy operation.
image3d
public static functionsstatic std::vector< image_format > get_supported_formats(const context & context, cl_mem_flags flags = read_write);
Returns the supported 3D image formats for the context.
See the documentation for
static bool is_supported_format(const image_format & format, const context & context, cl_mem_flags flags = read_write);
Returns true
if format
is a supported 3D image format for context
.