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

Method Buffer

include/CL/opencl.hpp:4100–4114  ·  view source on GitHub ↗

! \brief Constructs a Buffer in a specified context. * * Wraps clCreateBuffer(). * * \param host_ptr Storage to be used if the CL_MEM_USE_HOST_PTR flag was * specified. Note alignment & exclusivity requirements. */

Source from the content-addressed store, hash-verified

4098 * specified. Note alignment & exclusivity requirements.
4099 */
4100 Buffer(
4101 const Context& context,
4102 cl_mem_flags flags,
4103 size_type size,
4104 void* host_ptr = nullptr,
4105 cl_int* err = nullptr)
4106 {
4107 cl_int error;
4108 object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error);
4109
4110 detail::errHandler(error, __CREATE_BUFFER_ERR);
4111 if (err != nullptr) {
4112 *err = error;
4113 }
4114 }
4115
4116#if CL_HPP_TARGET_OPENCL_VERSION >= 300
4117 /*! \brief Constructs a Buffer in a specified context and with specified properties.

Callers

nothing calls this directly

Calls 5

clCreateBufferFunction · 0.85
errHandlerFunction · 0.85
copyFunction · 0.70
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected