clSPARSE  v0.10.0.0
a software library containing Sparse functions written in OpenCL
Classes | Typedefs | Functions
Modifying library state

Functions to create or modify library state. More...

Classes

struct  clsparseCreateResult
 A structure returned by value from the clsparseCreateControl function. This serves as result/status pair for the creation operation. More...
 
struct  clsparseEventResult
 A structure returned by value from the clsparseGetEvent function. This serves as result/status pair for the creation operation. More...
 

Typedefs

typedef struct _clsparseControl * clsparseControl
 clsparseControl keeps OpenCL state like kernel execution, memory allocation and synchronization behavior More...
 

Functions

CLSPARSE_EXPORT clsparseCreateResult clsparseCreateControl (cl_command_queue queue)
 Setup the clsparse control object from external OpenCL queue. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseEnableAsync (clsparseControl control, cl_bool async)
 Enable/Disable asynchronous behavior for clSPARSE. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseEnableExtendedPrecision (clsparseControl control, cl_bool extPrecision)
 Enable/Disable the use of compensated summation. More...
 
CLSPARSE_EXPORT clsparseEventResult clsparseGetEvent (clsparseControl control)
 Return an event from the last kernel execution. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseReleaseControl (clsparseControl control)
 Sets internal control fields to 0 or Null and frees allocated structures. More...
 

Detailed Description

Functions to create or modify library state.

Typedef Documentation

typedef struct _clsparseControl* clsparseControl

clsparseControl keeps OpenCL state like kernel execution, memory allocation and synchronization behavior

Struct implementation hidden to clients using C PIMPL idiom to make private to library

Function Documentation

CLSPARSE_EXPORT clsparseCreateResult clsparseCreateControl ( cl_command_queue  queue)

Setup the clsparse control object from external OpenCL queue.

Parameters
[in]queuecl_command_queue created
Returns
A clsparseCreateResult which contains a return code and result handle
Examples:
sample-axpy.cpp, sample-cg.cpp, sample-norm1-c.c, and sample-spmv.cpp.
CLSPARSE_EXPORT clsparseStatus clsparseEnableAsync ( clsparseControl  control,
cl_bool  async 
)

Enable/Disable asynchronous behavior for clSPARSE.

Parameters
[in]controlA valid clsparseControl created with clsparseCreateControl
[in]asyncTrue to enable immediate return, false to block execution until event completion
Returns
clsparseSuccess
CLSPARSE_EXPORT clsparseStatus clsparseEnableExtendedPrecision ( clsparseControl  control,
cl_bool  extPrecision 
)

Enable/Disable the use of compensated summation.

Note
This currently only controls the precision of SpM-dV
Parameters
[in]controlA valid clsparseControl created with clsparseCreateControl
[in]extPrecisionTrue to enable extended precision, false for fast precision
Returns
clsparseSuccess
CLSPARSE_EXPORT clsparseEventResult clsparseGetEvent ( clsparseControl  control)

Return an event from the last kernel execution.

Parameters
[in]controlA valid clsparseControl created with clsparseCreateControl
Returns
A clsparseEventResult which contains a return code and result handle
CLSPARSE_EXPORT clsparseStatus clsparseReleaseControl ( clsparseControl  control)

Sets internal control fields to 0 or Null and frees allocated structures.

Parameters
[in,out]controlA valid clsparseControl created with clsparseCreateControl
Returns
clsparseSuccess
Examples:
sample-axpy.cpp, sample-cg.cpp, sample-norm1-c.c, and sample-spmv.cpp.