clRNG
An OpenCL library for random number generators (RNG)
 All Data Structures Files Functions Typedefs Enumerations Pages
clRNG.h
Go to the documentation of this file.
1 
267 #pragma once
268 #ifndef CLRNG_H
269 #define CLRNG_H
270 
271 #if defined(__APPLE__) || defined(__MACOSX)
272 #include <OpenCL/cl.h>
273 #else
274 #include <CL/cl.h>
275 #endif
276 
279 #ifdef CLRNG_SINGLE_PRECISION
280  #define _CLRNG_FPTYPE cl_float
281 #else
282  #define _CLRNG_FPTYPE cl_double
283 #endif
284 #define _CLRNG_TAG_FPTYPE(name) _CLRNG_TAG_FPTYPE_(name,_CLRNG_FPTYPE)
285 #define _CLRNG_TAG_FPTYPE_(name,fptype) _CLRNG_TAG_FPTYPE__(name,fptype)
286 #define _CLRNG_TAG_FPTYPE__(name,fptype) name##_##fptype
287 
304 typedef enum clrngStatus_ {
305  CLRNG_SUCCESS = CL_SUCCESS,
306  CLRNG_OUT_OF_RESOURCES = CL_OUT_OF_RESOURCES,
307  CLRNG_INVALID_VALUE = CL_INVALID_VALUE,
308  /* ... */
309  CLRNG_INVALID_RNG_TYPE,
310  CLRNG_INVALID_STREAM_CREATOR,
311  CLRNG_INVALID_SEED,
312  CLRNG_FUNCTION_NOT_IMPLEMENTED
313 } clrngStatus;
314 
315 
316 #ifdef __cplusplus
317 extern "C" {
318 #endif
319 
327 const char* clrngGetErrorString();
328 
350 const char* clrngGetLibraryDeviceIncludes(cl_int* err);
351 
357 const char* clrngGetLibraryRoot();
358 
359 #ifdef __cplusplus
360 }
361 #endif
362 
363 #endif /* CLRNG_H */
364 
365 /*
366  * vim: syntax=c.doxygen spell spelllang=en fdm=syntax fdls=0
367  */
enum clrngStatus_ clrngStatus
Error codes.
clrngStatus_
Error codes.
Definition: clRNG.h:304
const char * clrngGetLibraryDeviceIncludes(cl_int *err)
Generate an include option string for use with the OpenCL C compiler.
const char * clrngGetErrorString()
Retrieve the last error message.
const char * clrngGetLibraryRoot()
Retrieve the library installation path.