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

Method Image1D

include/internal/CL/cl.hpp:3645–3672  ·  view source on GitHub ↗

! \brief Constructs a 1D Image in a specified context. * * Wraps clCreateImage(). */

Source from the content-addressed store, hash-verified

3643 * Wraps clCreateImage().
3644 */
3645 Image1D(
3646 const Context& context,
3647 cl_mem_flags flags,
3648 ImageFormat format,
3649 ::size_t width,
3650 void* host_ptr = NULL,
3651 cl_int* err = NULL)
3652 {
3653 cl_int error;
3654 cl_image_desc desc =
3655 {
3656 CL_MEM_OBJECT_IMAGE1D,
3657 width,
3658 0, 0, 0, 0, 0, 0, 0, 0
3659 };
3660 object_ = ::clCreateImage(
3661 context(),
3662 flags,
3663 &format,
3664 &desc,
3665 host_ptr,
3666 &error);
3667
3668 detail::errHandler(error, __CREATE_IMAGE_ERR);
3669 if (err != NULL) {
3670 *err = error;
3671 }
3672 }
3673
3674 //! \brief Default constructor - initializes to NULL.
3675 Image1D() { }

Callers

nothing calls this directly

Calls 2

errHandlerFunction · 0.85
ImageClass · 0.85

Tested by

no test coverage detected