24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CLARRAY_H
25 #define ARM_COMPUTE_CLARRAY_H
67 void map(
bool blocking =
true)
91 uint8_t *do_map(cl::CommandQueue &q,
bool blocking)
override
94 return static_cast<uint8_t *
>(q.enqueueMapBuffer(
95 _buffer, blocking ? CL_TRUE : CL_FALSE, CL_MAP_READ | CL_MAP_WRITE, 0, this->
max_num_values() *
sizeof(T)));
97 void do_unmap(cl::CommandQueue &q, uint8_t *mapping)
override
100 q.enqueueUnmapMemObject(_buffer, mapping);
void unmap()
Enqueue an unmap operation of the allocated and mapped buffer.
const cl::Buffer & cl_buffer() const override
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing ...
Provides global access to a CL context and command queue.
void map(cl::CommandQueue &q, bool blocking=true)
Enqueue a map operation of the allocated buffer on the given queue.
size_t max_num_values() const
Maximum number of values which can be stored in this array.
Interface for OpenCL Array.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
CLArray & operator=(const CLArray &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
CLArray()
Default constructor: empty array.
void map(bool blocking=true)
Enqueue a map operation of the allocated buffer.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Wrapper to configure the Khronos OpenCL C++ header.
static CLScheduler & get()
Access the scheduler singleton.
void unmap(cl::CommandQueue &q)
Enqueue an unmap operation of the allocated and mapped buffer on the given queue.
Copyright (c) 2017-2024 Arm Limited.
CLArray(size_t max_num_values)
Constructor: initializes an array which can contain up to max_num_points values.