MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / Image1D

Method Image1D

include/CL/opencl.hpp:4605–4631  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

4603 * Wraps clCreateImage().
4604 */
4605 Image1D(
4606 const Context& context,
4607 cl_mem_flags flags,
4608 ImageFormat format,
4609 size_type width,
4610 void* host_ptr = nullptr,
4611 cl_int* err = nullptr)
4612 {
4613 cl_int error;
4614
4615 cl_image_desc desc = {};
4616 desc.image_type = CL_MEM_OBJECT_IMAGE1D;
4617 desc.image_width = width;
4618
4619 object_ = ::clCreateImage(
4620 context(),
4621 flags,
4622 &format,
4623 &desc,
4624 host_ptr,
4625 &error);
4626
4627 detail::errHandler(error, __CREATE_IMAGE_ERR);
4628 if (err != nullptr) {
4629 *err = error;
4630 }
4631 }
4632
4633 //! \brief Default constructor - initializes to nullptr.
4634 Image1D() { }

Callers

nothing calls this directly

Calls 2

clCreateImageFunction · 0.85
errHandlerFunction · 0.85

Tested by

no test coverage detected