clQMC
An OpenCL library for quasi-Monte Carlo methods
clQMC.h
Go to the documentation of this file.
1 /*
2  * Authors:
3  *
4  * David Munger <mungerd@iro.umontreal.ca> (2015)
5  * Pierre L'Ecuyer <lecuyer@iro.umontreal.ca> (2015)
6  *
7  */
8 
479 #pragma once
480 #ifndef CLQMC_H
481 #define CLQMC_H
482 
483 #if defined(__APPLE__) || defined(__MACOSX)
484 #include <OpenCL/cl.h>
485 #else
486 #include <CL/cl.h>
487 #endif
488 
489 typedef cl_double clqmc_double;
490 typedef cl_float clqmc_float;
491 typedef cl_int clqmc_int;
492 typedef cl_uint clqmc_uint;
493 typedef cl_long clqmc_long;
494 typedef cl_ulong clqmc_ulong;
495 
496 #ifdef CLQMC_SINGLE_PRECISION
497  typedef clqmc_float clqmc_fptype;
498  #define _CLQMC_FPTYPE clqmc_float
499 #else
500  typedef clqmc_double clqmc_fptype;
501  #define _CLQMC_FPTYPE clqmc_double
502 #endif
503 #define _CLQMC_TAG_FPTYPE(name) _CLQMC_TAG_FPTYPE_(name,_CLQMC_FPTYPE)
504 #define _CLQMC_TAG_FPTYPE_(name,fptype) _CLQMC_TAG_FPTYPE__(name,fptype)
505 #define _CLQMC_TAG_FPTYPE__(name,fptype) name##_##fptype
506 
507 
508 #if defined( _WIN32 )
509  #define CLQMCAPI __declspec( dllexport )
510 #else
511  #define CLQMCAPI
512 #endif
513 
514 
527 typedef enum clqmcStatus_ {
528  CLQMC_SUCCESS = CL_SUCCESS,
529  CLQMC_OUT_OF_RESOURCES = CL_OUT_OF_RESOURCES,
530  CLQMC_INVALID_VALUE = CL_INVALID_VALUE,
531  /* ... */
532  CLQMC_NOT_IMPLEMENTED
533 } clqmcStatus;
534 
535 
536 #ifdef __cplusplus
537 extern "C" {
538 #endif
539 
547 const char* clqmcGetErrorString();
548 
570 const char* clqmcGetLibraryDeviceIncludes(cl_int* err);
571 
578 const char* clqmcGetLibraryRoot();
579 
580 #ifdef __cplusplus
581 }
582 #endif
583 
584 #endif /* CLQMC_H */
585 
586 /*
587  * vim: syntax=c.doxygen spell spelllang=en fdm=syntax fdls=0
588  */
const char * clqmcGetLibraryRoot()
Retrieve the library installation path.
const char * clqmcGetLibraryDeviceIncludes(cl_int *err)
Generate an include option string for use with the OpenCL C compiler.
enum clqmcStatus_ clqmcStatus
Error codes.
const char * clqmcGetErrorString()
Retrieve the last error message.