42 _buffer = cl::Buffer(
CLScheduler::get().context(), CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE,
info()->descriptor_size() *
sizeof(
float));
49 _buffer = cl::Buffer();
74 uint8_t *CLHOG::do_map(cl::CommandQueue &q,
bool blocking)
77 return static_cast<uint8_t *
>(q.enqueueMapBuffer(_buffer, blocking ? CL_TRUE : CL_FALSE, CL_MAP_READ | CL_MAP_WRITE, 0,
info()->descriptor_size() *
sizeof(
float)));
80 void CLHOG::do_unmap(cl::CommandQueue &q)
83 q.enqueueUnmapMemObject(_buffer,
descriptor());
void init(const HOGInfo &input)
Allocate the HOG descriptor using the given HOG's metadata.
static CLScheduler & get()
Access the scheduler singleton.
Store the HOG's metadata.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
void map(cl::CommandQueue &q, bool blocking=true)
Enqueue a map operation of the allocated buffer on the given queue.
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
const cl::Buffer & cl_buffer() const override
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing ...
void free() override
Interface to be implemented by the child class to free the allocated cl buffer.
void unmap()
Enqueue an unmap operation of the allocated and mapped buffer.
void map(bool blocking=true)
Enqueue a map operation of the allocated buffer.
Wrapper to configure the Khronos OpenCL C++ header.
float * descriptor() const override
Pointer to the first element of the array which stores the linear SVM coefficients of HOG descriptor...
CLHOG()
Default constructor.
const HOGInfo * info() const override
Interface to be implemented by the child class to return the HOG's metadata.
void unmap(cl::CommandQueue &q)
Enqueue an unmap operation of the allocated and mapped buffer on the given queue. ...