GeNN
4.9.0
GPU enhanced Neuronal Networks (GeNN)
|
Library definitions common to all RNG's. More...
#include <CL/cl.h>
Go to the source code of this file.
Macros | |
#define | CLRNG_H |
#define | _CLRNG_FPTYPE cl_double |
#define | _CLRNG_TAG_FPTYPE(name) _CLRNG_TAG_FPTYPE_(name,_CLRNG_FPTYPE) |
#define | _CLRNG_TAG_FPTYPE_(name, fptype) _CLRNG_TAG_FPTYPE__(name,fptype) |
#define | _CLRNG_TAG_FPTYPE__(name, fptype) name##_##fptype |
#define | CLRNGAPI |
Typedefs | |
typedef enum clrngStatus_ | clrngStatus |
Error codes. More... | |
Enumerations | |
enum | clrngStatus_ { CLRNG_SUCCESS = CL_SUCCESS, CLRNG_OUT_OF_RESOURCES = CL_OUT_OF_RESOURCES, CLRNG_INVALID_VALUE = CL_INVALID_VALUE, CLRNG_INVALID_RNG_TYPE, CLRNG_INVALID_STREAM_CREATOR, CLRNG_INVALID_SEED, CLRNG_FUNCTION_NOT_IMPLEMENTED } |
Error codes. More... | |
Functions | |
CLRNGAPI const char * | clrngGetErrorString () |
Retrieve the last error message. More... | |
CLRNGAPI const char * | clrngGetLibraryDeviceIncludes (cl_int *err) |
Generate an include option string for use with the OpenCL C compiler. More... | |
CLRNGAPI const char * | clrngGetLibraryRoot () |
Retrieve the library installation path. More... | |
Library definitions common to all RNG's.
#define _CLRNG_FPTYPE cl_double |
#define _CLRNG_TAG_FPTYPE | ( | name | ) | _CLRNG_TAG_FPTYPE_(name,_CLRNG_FPTYPE) |
#define _CLRNG_TAG_FPTYPE_ | ( | name, | |
fptype | |||
) | _CLRNG_TAG_FPTYPE__(name,fptype) |
#define _CLRNG_TAG_FPTYPE__ | ( | name, | |
fptype | |||
) | name##_##fptype |
#define CLRNG_H |
#define CLRNGAPI |
typedef enum clrngStatus_ clrngStatus |
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 CLRNG_SUCCESS
. Otherwise, an error message can be retrieved by invoking clrngGetErrorString().
enum clrngStatus_ |
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 CLRNG_SUCCESS
. Otherwise, an error message can be retrieved by invoking clrngGetErrorString().
Enumerator | |
---|---|
CLRNG_SUCCESS | |
CLRNG_OUT_OF_RESOURCES | |
CLRNG_INVALID_VALUE | |
CLRNG_INVALID_RNG_TYPE | |
CLRNG_INVALID_STREAM_CREATOR | |
CLRNG_INVALID_SEED | |
CLRNG_FUNCTION_NOT_IMPLEMENTED |
CLRNGAPI const char* clrngGetErrorString | ( | ) |
Retrieve the last error message.
The buffer containing the error message is internally allocated and must not be freed by the client.
NULL
. CLRNGAPI const char* clrngGetLibraryDeviceIncludes | ( | cl_int * | err | ) |
Generate an include option string for use with the OpenCL C compiler.
Generate and return "-I${CLRNG_ROOT}/include", where ${CLRNG_ROOT}
is the value of the CLRNG_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 clRNG device-side headers. If the CLRNG_ROOT
environment variable is not defined, it defaults /usr
if the file /usr/include/clRNG/clRNG.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 . |
CLRNGAPI const char* clrngGetLibraryRoot | ( | ) |
Retrieve the library installation path.
/usr
if the file /usr/include/clRNG/clRNG.h
exists; or, the current directory (.) of execution of the program otherwise.