61 detail::ScanProblem *detail_;
76 void setType(
const Type &type);
81 void setTunePolicy(
const TunePolicy &tunePolicy);
101 detail::Scan *getDetail()
const;
102 detail::Scan *getDetailNonNull()
const;
103 void construct(cl_context context, cl_device_id device,
const ScanProblem &problem,
104 cl_int &err,
const char *&errStr);
108 void enqueue(cl_command_queue commandQueue,
114 const cl_event *events,
117 const char *&errStr);
120 void enqueue(cl_command_queue commandQueue,
127 const cl_event *events,
130 const char *&errStr);
132 void moveAssign(
Scan &other);
140 #ifdef CLOGS_HAVE_RVALUE_REFERENCES 143 moveConstruct(other);
146 Scan &operator=(
Scan &&other) CLOGS_NOEXCEPT
166 Scan(
const cl::Context &context,
const cl::Device &device,
const Type &type)
172 construct(context(), device(), problem, err, errStr);
173 detail::handleError(err, errStr);
186 Scan(
const cl::Context &context,
const cl::Device &device,
const ScanProblem &problem)
190 construct(context(), device(), problem, err, errStr);
191 detail::handleError(err, errStr);
202 void enqueue(
const cl::CommandQueue &commandQueue,
203 const cl::Buffer &buffer,
205 const void *offset = NULL,
206 const VECTOR_CLASS<cl::Event> *events = NULL,
207 cl::Event *event = NULL)
209 enqueue(commandQueue, buffer, buffer, elements, offset, events, event);
240 void enqueue(
const cl::CommandQueue &commandQueue,
241 const cl::Buffer &inBuffer,
242 const cl::Buffer &outBuffer,
244 const void *offset = NULL,
245 const VECTOR_CLASS<cl::Event> *events = NULL,
246 cl::Event *event = NULL)
252 enqueue(commandQueue(), inBuffer(), outBuffer(), elements, offset,
253 events_.size(), events_.data(),
254 event != NULL ? &outEvent : NULL,
256 detail::handleError(err, errStr);
266 const void *offset = NULL,
267 cl_uint numEvents = 0,
268 const cl_event *events = NULL,
269 cl_event *event = NULL)
273 enqueue(commandQueue, inBuffer, outBuffer, elements, offset, numEvents, events, event,
275 detail::handleError(err, errStr);
284 void enqueue(
const cl::CommandQueue &commandQueue,
285 const cl::Buffer &buffer,
287 const cl::Buffer &offsetBuffer,
289 const VECTOR_CLASS<cl::Event> *events = NULL,
290 cl::Event *event = NULL)
292 enqueue(commandQueue, buffer, buffer, elements, offsetBuffer, offsetIndex, events, event);
330 void enqueue(
const cl::CommandQueue &commandQueue,
331 const cl::Buffer &inBuffer,
332 const cl::Buffer &outBuffer,
334 const cl::Buffer &offsetBuffer,
336 const VECTOR_CLASS<cl::Event> *events = NULL,
337 cl::Event *event = NULL)
343 enqueue(commandQueue(), inBuffer(), outBuffer(), elements,
344 offsetBuffer(), offsetIndex,
345 events_.size(), events_.data(),
346 event != NULL ? &outEvent : NULL,
348 detail::handleError(err, errStr);
360 cl_uint numEvents = 0,
361 const cl_event *events = NULL,
362 cl_event *event = NULL)
366 enqueue(commandQueue, inBuffer, outBuffer, elements, offsetBuffer, offsetIndex,
367 numEvents, events, event, err, errStr);
368 detail::handleError(err, errStr);
void setType(const Type &type)
Set the element type for the scan.
Scan(const cl::Context &context, const cl::Device &device, const ScanProblem &problem)
Constructor.
Definition: scan.h:186
Pops default visibility if appropriate.
void enqueue(const cl::CommandQueue &commandQueue, const cl::Buffer &buffer,::size_t elements, const void *offset=NULL, const VECTOR_CLASS< cl::Event > *events=NULL, cl::Event *event=NULL)
Enqueue a scan operation on a command queue (in-place).
Definition: scan.h:202
Pushes default visibility if appropriate.
Encapsulation of an OpenCL built-in type that can be stored in a buffer.
Definition: core.h:134
void enqueue(const cl::CommandQueue &commandQueue, const cl::Buffer &buffer,::size_t elements, const cl::Buffer &offsetBuffer, cl_uint offsetIndex, const VECTOR_CLASS< cl::Event > *events=NULL, cl::Event *event=NULL)
Enqueue a scan operation on a command queue, with an offset in a buffer (in-place).
Definition: scan.h:284
Basic types shared by several primitives.
Creates an array of handles from a vector of wrappers.
Definition: core.h:198
Scan(const cl::Context &context, const cl::Device &device, const Type &type)
Constructor.
Definition: scan.h:166
Encapsulates the specifics of a scan problem.
Definition: scan.h:58
void enqueue(cl_command_queue commandQueue, cl_mem inBuffer, cl_mem outBuffer,::size_t elements, cl_mem offsetBuffer, cl_uint offsetIndex, cl_uint numEvents=0, const cl_event *events=NULL, cl_event *event=NULL)
Definition: scan.h:354
Exclusive scan (prefix sum) primitive.
Definition: scan.h:98
void enqueue(cl_command_queue commandQueue, cl_mem inBuffer, cl_mem outBuffer,::size_t elements, const void *offset=NULL, cl_uint numEvents=0, const cl_event *events=NULL, cl_event *event=NULL)
Definition: scan.h:262
void enqueue(const cl::CommandQueue &commandQueue, const cl::Buffer &inBuffer, const cl::Buffer &outBuffer,::size_t elements, const cl::Buffer &offsetBuffer, cl_uint offsetIndex, const VECTOR_CLASS< cl::Event > *events=NULL, cl::Event *event=NULL)
Enqueue a scan operation on a command queue, with an offset in a buffer.
Definition: scan.h:330
Base class for all algorithm classes.
Definition: core.h:305
OpenCL primitives.
Definition: clogs.h:56
Control over tuning policy.
void enqueue(const cl::CommandQueue &commandQueue, const cl::Buffer &inBuffer, const cl::Buffer &outBuffer,::size_t elements, const void *offset=NULL, const VECTOR_CLASS< cl::Event > *events=NULL, cl::Event *event=NULL)
Enqueue a scan operation on a command queue.
Definition: scan.h:240