! \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. */
| 3154 | * specified. Note alignment & exclusivity requirements. |
| 3155 | */ |
| 3156 | Buffer( |
| 3157 | const Context& context, |
| 3158 | cl_mem_flags flags, |
| 3159 | ::size_t size, |
| 3160 | void* host_ptr = NULL, |
| 3161 | cl_int* err = NULL) |
| 3162 | { |
| 3163 | cl_int error; |
| 3164 | object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error); |
| 3165 | |
| 3166 | detail::errHandler(error, __CREATE_BUFFER_ERR); |
| 3167 | if (err != NULL) { |
| 3168 | *err = error; |
| 3169 | } |
| 3170 | } |
| 3171 | |
| 3172 | /*! \brief Constructs a Buffer in the default context. |
| 3173 | * |
nothing calls this directly
no test coverage detected