Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class image3d

boost::compute::image3d — An OpenCL 3D image object.

Synopsis

// 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);
};

Description

See Also:

image_format, image2d

image3d public construct/copy/destruct

  1. image3d();
    Creates a null image3d object.
  2. 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 clCreateImage() for more information.

  3. image3d(const image3d & other);
    Creates a new image3d as a copy of other.
  4. image3d(image3d && other) noexcept;
    Move-constructs a new image object from other.
  5. image3d & operator=(const image3d & other);
    Copies the image3d from other.
  6. image3d & operator=(image3d && other) noexcept;
    Move-assigns the image from other to *this.
  7. ~image3d();
    Destroys the image3d object.

image3d public member functions

  1. extents< 3 > size() const;
    Returns the size (width, height, depth) of the image.
  2. extents< 3 > origin() const;
    Returns the origin of the image (0, 0, 0).
  3. template<typename T> T get_info(cl_image_info info) const;

    Returns information about the image.

    See the documentation for clGetImageInfo() for more information.

  4. 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.

  5. 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 functions

  1. static 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 clGetSupportedImageFormats() for more information.

  2. 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.


PrevUpHomeNext