MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / Image2DArray

Class Image2DArray

include/internal/CL/cl.hpp:4110–4190  ·  view source on GitHub ↗

! \class Image2DArray * \brief Image interface for arrays of 2D images. */

Source from the content-addressed store, hash-verified

4108 * \brief Image interface for arrays of 2D images.
4109 */
4110class Image2DArray : public Image
4111{
4112public:
4113 Image2DArray(
4114 const Context& context,
4115 cl_mem_flags flags,
4116 ImageFormat format,
4117 ::size_t arraySize,
4118 ::size_t width,
4119 ::size_t height,
4120 ::size_t rowPitch,
4121 ::size_t slicePitch,
4122 void* host_ptr = NULL,
4123 cl_int* err = NULL)
4124 {
4125 cl_int error;
4126 cl_image_desc desc =
4127 {
4128 CL_MEM_OBJECT_IMAGE2D_ARRAY,
4129 width,
4130 height,
4131 0, // depth (unused)
4132 arraySize,
4133 rowPitch,
4134 slicePitch,
4135 0, 0, 0
4136 };
4137 object_ = ::clCreateImage(
4138 context(),
4139 flags,
4140 &format,
4141 &desc,
4142 host_ptr,
4143 &error);
4144
4145 detail::errHandler(error, __CREATE_IMAGE_ERR);
4146 if (err != NULL) {
4147 *err = error;
4148 }
4149 }
4150
4151 Image2DArray() { }
4152
4153 __CL_EXPLICIT_CONSTRUCTORS Image2DArray(const cl_mem& imageArray) : Image(imageArray) { }
4154
4155 Image2DArray& operator = (const cl_mem& rhs)
4156 {
4157 Image::operator=(rhs);
4158 return *this;
4159 }
4160
4161 /*! \brief Copy constructor to forward copy to the superclass correctly.
4162 * Required for MSVC.
4163 */
4164 Image2DArray(const Image2DArray& img) : Image(img) {}
4165
4166 /*! \brief Copy assignment to forward copy to the superclass correctly.
4167 * Required for MSVC.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected