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

Class Image1DArray

include/internal/CL/cl.hpp:3804–3880  ·  view source on GitHub ↗

! \class Image1DArray * \brief Image interface for arrays of 1D images. */

Source from the content-addressed store, hash-verified

3802 * \brief Image interface for arrays of 1D images.
3803 */
3804class Image1DArray : public Image
3805{
3806public:
3807 Image1DArray(
3808 const Context& context,
3809 cl_mem_flags flags,
3810 ImageFormat format,
3811 ::size_t arraySize,
3812 ::size_t width,
3813 ::size_t rowPitch,
3814 void* host_ptr = NULL,
3815 cl_int* err = NULL)
3816 {
3817 cl_int error;
3818 cl_image_desc desc =
3819 {
3820 CL_MEM_OBJECT_IMAGE1D_ARRAY,
3821 width,
3822 0, 0, // height, depth (unused)
3823 arraySize,
3824 rowPitch,
3825 0, 0, 0, 0
3826 };
3827 object_ = ::clCreateImage(
3828 context(),
3829 flags,
3830 &format,
3831 &desc,
3832 host_ptr,
3833 &error);
3834
3835 detail::errHandler(error, __CREATE_IMAGE_ERR);
3836 if (err != NULL) {
3837 *err = error;
3838 }
3839 }
3840
3841 Image1DArray() { }
3842
3843 __CL_EXPLICIT_CONSTRUCTORS Image1DArray(const cl_mem& imageArray) : Image(imageArray) { }
3844
3845 Image1DArray& operator = (const cl_mem& rhs)
3846 {
3847 Image::operator=(rhs);
3848 return *this;
3849 }
3850
3851 /*! \brief Copy constructor to forward copy to the superclass correctly.
3852 * Required for MSVC.
3853 */
3854 Image1DArray(const Image1DArray& img) : Image(img) {}
3855
3856 /*! \brief Copy assignment to forward copy to the superclass correctly.
3857 * Required for MSVC.
3858 */
3859 Image1DArray& operator = (const Image1DArray &img)
3860 {
3861 Image::operator=(img);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected