mmc_cl_utils.h
1 /***************************************************************************/
32 #ifndef _MCEXTREME_GPU_LAUNCH_H
33 #define _MCEXTREME_GPU_LAUNCH_H
34 
35 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
36 #define CL_USE_DEPRECATED_OPENCL_2_0_APIS
37 #define CL_TARGET_OPENCL_VERSION 120
38 
39 #ifdef __APPLE__
40  #include <OpenCL/cl.h>
41 #else
42  #include <CL/cl.h>
43 #endif
44 
45 #include "mmc_utils.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 #define ABS(a) ((a)<0?-(a):(a))
52 
53 #define MCX_DEBUG_RNG 2
54 #define MCX_DEBUG_MOVE 1
55 #define MCX_DEBUG_PROGRESS 2048
56 
57 #define MIN(a,b) ((a)<(b)?(a):(b))
58 
59 #define OCL_ASSERT(x) ocl_assess((x),__FILE__,__LINE__)
60 
61 #define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
62 #define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
63 #define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
64 #define CL_DEVICE_WARP_SIZE_NV 0x4003
65 #define CL_DEVICE_GPU_OVERLAP_NV 0x4004
66 #define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
67 #define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
68 
69 #define CL_DEVICE_BOARD_NAME_AMD 0x4038
70 #define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
71 #define CL_DEVICE_WAVEFRONT_WIDTH_AMD 0x4043
72 #define CL_DEVICE_GFXIP_MAJOR_AMD 0x404A
73 #define CL_DEVICE_GFXIP_MINOR_AMD 0x404B
74 
75 cl_platform_id mcx_list_cl_gpu(mcconfig* cfg, unsigned int* activedev, cl_device_id* activedevlist, GPUInfo** info);
76 void ocl_assess(int cuerr, const char* file, const int linenum);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
This structure defines the problem settings (domain, filenames, session)
Definition: mmc_utils.h:184
Definition of program options and problem domain configurations.
Definition: mmc_utils.h:161