- Devices.mli
type dim3 = { x : int; y : int; z : int; } type specificLibrary = Cuda | OpenCL | Both type context type generalInfo = { name : string; totalGlobalMem : int; localMemSize : int; clockRate : int; totalConstMem : int; multiProcessorCount : int; eccEnabled : bool; specific : specificLibrary; id : int; ctx : context; } type cudaInfo = { major : int; minor : int; regsPerBlock : int; warpSize : int; memPitch : int; maxThreadsPerBlock : int; maxThreadsDim : dim3; maxGridSize : dim3; textureAlignment : int; deviceOverlap : bool; kernelExecTimeoutEnabled : bool; integrated : bool; canMapHostMemory : bool; computeMode : int; concurrentKernels : bool; pciBusID : int; pciDeviceID : int; } type platformInfo = { platform_profile : string; platform_version : string; platform_name : string; platform_vendor : string; platform_extensions : string; num_devices : int; } type deviceType = CL_DEVICE_TYPE_CPU | CL_DEVICE_TYPE_GPU | CL_DEVICE_TYPE_ACCELERATOR | CL_DEVICE_TYPE_DEFAULT type clDeviceFPConfig = CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_FMA | CL_FP_NONE type clDeviceQueueProperties = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE type clDeviceGlobalMemCacheType = CL_READ_WRITE_CACHE | CL_READ_ONLY_CACHE | CL_NONE type clDeviceLocalMemType = CL_LOCAL | CL_GLOBAL type clDeviceExecutionCapabilities = CL_EXEC_KERNEL | CL_EXEC_NATIVE_KERNEL type clDeviceID type openCLInfo = { platform_info : platformInfo; device_type : deviceType; profile : string; version : string; vendor : string; extensions : string; vendor_id : int; max_work_item_dimensions : int; address_bits : int; max_mem_alloc_size : int; image_support : bool; max_read_image_args : int; max_write_image_args : int; max_samplers : int; mem_base_addr_align : int; min_data_type_align_size : int; global_mem_cacheline_size : int; global_mem_cache_size : int; max_constant_args : int; endian_little : bool; available : bool; compiler_available : bool; single_fp_config : clDeviceFPConfig; global_mem_cache_type : clDeviceGlobalMemCacheType; queue_properties : clDeviceQueueProperties; local_mem_type : clDeviceLocalMemType; double_fp_config : clDeviceFPConfig; max_constant_buffer_size : int; execution_capabilities : clDeviceExecutionCapabilities; half_fp_config : clDeviceFPConfig; max_work_group_size : int; image2D_max_height : int; image2D_max_width : int; image3D_max_depth : int; image3D_max_height : int; image3D_max_width : int; max_parameter_size : int; max_work_item_size : dim3; prefered_vector_width_char : int; prefered_vector_width_short : int; prefered_vector_width_int : int; prefered_vector_width_long : int; prefered_vector_width_float : int; prefered_vector_width_double : int; profiling_timer_resolution : int; driver_version : string; device_id : clDeviceID; } type specificInfo = CudaInfo of cudaInfo | OpenCLInfo of openCLInfo | OtherInfo type device = { general_info : generalInfo; specific_info : specificInfo; } external get_cuda_compatible_devices : unit -> int = "spoc_getCudaDevicesCount" external get_opencl_compatible_devices : unit -> int = "spoc_getOpenCLDevicesCount" val init : ?only:specificLibrary -> unit -> device array val cuda_devices : unit -> int val opencl_devices : unit -> int val gpgpu_devices : unit -> int val flush : device -> ?queue_id:int -> unit -> unit val hasCLExtension : device -> string -> bool