clProbDist
An OpenCL library for probability distributions
|
Library definitions common to all probability distributions. More...
#include <CL/cl.h>
Go to the source code of this file.
Typedefs | |
typedef enum clprobdistStatus_ | clprobdistStatus |
Error codes. More... | |
Enumerations | |
enum | clprobdistStatus_ |
Error codes. More... | |
Functions | |
const char * | clprobdistGetErrorString () |
Retrieve the last error message. More... | |
const char * | clprobdistGetLibraryDeviceIncludes (cl_int *err) |
Generate an include option string for use with the OpenCL C compiler. More... | |
const char * | clprobdistGetLibraryRoot () |
Retrieve the library installation path. More... | |
Library definitions common to all probability distributions.
typedef enum clprobdistStatus_ clprobdistStatus |
Error codes.
Most library functions return an error status indicating the success or error state of the operation carried by the function. In case of success, the error status is set to CL_SUCCESS
. Otherwise, an error message can be retrieved by invoking clprobdistGetErrorString().
enum clprobdistStatus_ |
Error codes.
Most library functions return an error status indicating the success or error state of the operation carried by the function. In case of success, the error status is set to CL_SUCCESS
. Otherwise, an error message can be retrieved by invoking clprobdistGetErrorString().
const char* clprobdistGetErrorString | ( | ) |
Retrieve the last error message.
The buffer containing the error message is internally allocated and must not be freed by the client.
NULL
. const char* clprobdistGetLibraryDeviceIncludes | ( | cl_int * | err | ) |
Generate an include option string for use with the OpenCL C compiler.
Generate and return "-I${CLPROBDIST_ROOT}/include", where ${CLPROBDIST_ROOT}
is the value of the CLPROBDIST_ROOT
environment variable. This string is meant to be passed as an option to the OpenCL C compiler for programs that make use of the clProbDist device-side headers. If the CLPROBDIST_ROOT
environment variable is not defined, it defaults to /usr
if the file /usr/include/clProbDist/clProbDist.h
exists, else to the current directory of execution of the program.
A static buffer is return and need not be released; it could change upon successive calls to the function.
An error is returned in err
if the preallocated buffer is too small to contain the include string.
[out] | err | Error status variable, or NULL . |
const char* clprobdistGetLibraryRoot | ( | ) |
Retrieve the library installation path.
/usr
if the file /usr/include/clProbDist/clProbDist.h
exists; or, the current directory (.) of execution of the program otherwise.