OpenCL-1.0.3.1: Haskell high-level wrapper for OpenCL

Safe HaskellSafe-Infered

Control.Parallel.OpenCL.Query

Contents

Synopsis

Types

data CLPlatformInfo Source

  • CL_PLATFORM_PROFILE, OpenCL profile string. Returns the profile name supported by the implementation. The profile name returned can be one of the following strings:
FULL_PROFILE
If the implementation supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported).
EMBEDDED_PROFILE
If the implementation supports the OpenCL embedded profile. The embedded profile is defined to be a subset for each version of OpenCL.
  • CL_PLATFORM_VERSION, OpenCL version string. Returns the OpenCL version supported by the implementation. This version string has the following format: OpenCL major_version.minor_version platform-specific information The major_version.minor_version value returned will be 1.0.
  • CL_PLATFORM_NAME, Platform name string.
  • CL_PLATFORM_VENDOR, Platform vendor string.
  • CL_PLATFORM_EXTENSIONS, Returns a space-separated list of extension names (the extension names themselves do not contain any spaces) supported by the platform. Extensions defined here must be supported by all devices associated with this platform.

data CLDeviceType Source

  • CL_DEVICE_TYPE_CPU, An OpenCL device that is the host processor. The host processor runs the OpenCL implementations and is a single or multi-core CPU.
  • CL_DEVICE_TYPE_GPU, An OpenCL device that is a GPU. By this we mean that the device can also be used to accelerate a 3D API such as OpenGL or DirectX.
  • CL_DEVICE_TYPE_ACCELERATOR, Dedicated OpenCL accelerators (for example the IBM CELL Blade). These devices communicate with the host processor using a peripheral interconnect such as PCIe.
  • CL_DEVICE_TYPE_DEFAULT, The default OpenCL device in the system.
  • CL_DEVICE_TYPE_ALL, All OpenCL devices available in the system.

data CLDeviceFPConfig Source

Platform Query Functions

clGetPlatformIDs :: IO [CLPlatformID]Source

Obtain the list of platforms available. Returns the list if the function is executed successfully. Otherwise it returns the empty list.

clGetPlatformInfo :: CLPlatformID -> CLPlatformInfo -> IO StringSource

Get specific information about the OpenCL platform. It returns Nothing if platform is not a valid platform.

Device Query Functions

clGetDeviceIDs :: CLPlatformID -> CLDeviceType -> IO [CLDeviceID]Source

Obtain the list of devices available on a platform. Returns the list if the function is executed successfully. Otherwise it returns the empty list if platform is not a valid platform or no OpenCL devices that matched device_type were found.

clGetDeviceExecutionCapabilities :: CLDeviceID -> IO [CLDeviceExecCapability]Source

Describes the execution capabilities of the device. This is a list that describes one or more of the CLDeviceExecCapability values. The mandated minimum capability is CL_EXEC_KERNEL.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_EXECUTION_CAPABILITIES.

clGetDeviceAddressBits :: CLDeviceID -> IO CLuintSource

The default compute device address space size specified as an unsigned integer value in bits. Currently supported values are 32 or 64 bits.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_ADDRESS_BITS.

clGetDeviceAvailable :: CLDeviceID -> IO BoolSource

Is True if the device is available and False if the device is not available.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_AVAILABLE.

clGetDeviceCompilerAvailable :: CLDeviceID -> IO BoolSource

Is False if the implementation does not have a compiler available to compile the program source. Is True if the compiler is available. This can be False for the embededed platform profile only.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_COMPILER_AVAILABLE.

clGetDeviceEndianLittle :: CLDeviceID -> IO BoolSource

Is True if the OpenCL device is a little endian device and False otherwise.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_ENDIAN_LITTLE.

clGetDeviceErrorCorrectionSupport :: CLDeviceID -> IO BoolSource

Is True if the device implements error correction for the memories, caches, registers etc. in the device. Is False if the device does not implement error correction. This can be a requirement for certain clients of OpenCL.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_ERROR_CORRECTION_SUPPORT.

clGetDeviceExtensions :: CLDeviceID -> IO StringSource

Returns a space separated list of extension names (the extension names themselves do not contain any spaces). The list of extension names returned currently can include one or more of the following approved extension names:

  • cl_khr_fp64
  • cl_khr_select_fprounding_mode
  • cl_khr_global_int32_base_atomics
  • cl_khr_global_int32_extended_atomics
  • cl_khr_local_int32_base_atomics
  • cl_khr_local_int32_extended_atomics
  • cl_khr_int64_base_atomics
  • cl_khr_int64_extended_atomics
  • cl_khr_3d_image_writes
  • cl_khr_byte_addressable_store
  • cl_khr_fp16

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_EXTENSIONS.

clGetDeviceGlobalMemCacheSize :: CLDeviceID -> IO CLulongSource

Size of global memory cache in bytes.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_GLOBAL_MEM_CACHE_SIZE.

clGetDeviceGlobalMemCachelineSize :: CLDeviceID -> IO CLuintSource

Size of global memory cache line in bytes.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE.

clGetDeviceGlobalMemSize :: CLDeviceID -> IO CLulongSource

Size of global device memory in bytes.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_GLOBAL_MEM_SIZE.

clGetDeviceImageSupport :: CLDeviceID -> IO BoolSource

Is True if images are supported by the OpenCL device and False otherwise.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_IMAGE_SUPPORT.

clGetDeviceImage2DMaxHeight :: CLDeviceID -> IO CSizeSource

Max height of 2D image in pixels. The minimum value is 8192 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_IMAGE2D_MAX_HEIGHT.

clGetDeviceImage2DMaxWidth :: CLDeviceID -> IO CSizeSource

Max width of 2D image in pixels. The minimum value is 8192 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_IMAGE2D_MAX_WIDTH.

clGetDeviceImage3DMaxDepth :: CLDeviceID -> IO CSizeSource

Max depth of 3D image in pixels. The minimum value is 2048 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_IMAGE3D_MAX_DEPTH.

clGetDeviceImage3DMaxHeight :: CLDeviceID -> IO CSizeSource

Max height of 3D image in pixels. The minimum value is 2048 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_IMAGE3D_MAX_HEIGHT.

clGetDeviceImage3DMaxWidth :: CLDeviceID -> IO CSizeSource

Max width of 3D image in pixels. The minimum value is 2048 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_IMAGE3D_MAX_WIDTH.

clGetDeviceLocalMemSize :: CLDeviceID -> IO CLulongSource

Size of local memory arena in bytes. The minimum value is 16 KB.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_LOCAL_MEM_SIZE.

clGetDeviceMaxClockFrequency :: CLDeviceID -> IO CLuintSource

Maximum configured clock frequency of the device in MHz.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_CLOCK_FREQUENCY.

clGetDeviceMaxComputeUnits :: CLDeviceID -> IO CLuintSource

The number of parallel compute cores on the OpenCL device. The minimum value is 1.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_COMPUTE_UNITS.

clGetDeviceMaxConstantArgs :: CLDeviceID -> IO CLuintSource

Max number of arguments declared with the __constant qualifier in a kernel. The minimum value is 8.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_CONSTANT_ARGS.

clGetDeviceMaxConstantBufferSize :: CLDeviceID -> IO CLulongSource

Max size in bytes of a constant buffer allocation. The minimum value is 64 KB.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE.

clGetDeviceMaxMemAllocSize :: CLDeviceID -> IO CLulongSource

Max size of memory object allocation in bytes. The minimum value is max (1/4th of clGetDeviceGlobalMemSize, 128*1024*1024)

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_MEM_ALLOC_SIZE.

clGetDeviceMaxParameterSize :: CLDeviceID -> IO CSizeSource

Max size in bytes of the arguments that can be passed to a kernel. The minimum value is 256.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_PARAMETER_SIZE.

clGetDeviceMaxReadImageArgs :: CLDeviceID -> IO CLuintSource

Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_READ_IMAGE_ARGS.

clGetDeviceMaxSamplers :: CLDeviceID -> IO CLuintSource

Maximum number of samplers that can be used in a kernel. The minimum value is 16 if clGetDeviceImageSupport is True. (Also see sampler type.)

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_SAMPLERS.

clGetDeviceMaxWorkGroupSize :: CLDeviceID -> IO CSizeSource

Maximum number of work-items in a work-group executing a kernel using the data parallel execution model. (Refer to clEnqueueNDRangeKernel). The minimum value is 1.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_WORK_GROUP_SIZE.

clGetDeviceMaxWorkItemDimensions :: CLDeviceID -> IO CLuintSource

Maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model. (Refer to clEnqueueNDRangeKernel). The minimum value is 3.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS.

clGetDeviceMaxWorkItemSizes :: CLDeviceID -> IO [CSize]Source

Maximum number of work-items that can be specified in each dimension of the work-group to clEnqueueNDRangeKernel. Returns n entries, where n is the value returned by the query for clDeviceMaxWorkItemDimensions. The minimum value is (1, 1, 1).

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_WORK_ITEM_SIZES.

clGetDeviceMaxWriteImageArgs :: CLDeviceID -> IO CLuintSource

Max number of simultaneous image objects that can be written to by a kernel. The minimum value is 8 if clGetDeviceImageSupport is True.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MAX_WRITE_IMAGE_ARGS.

clGetDeviceMemBaseAddrAlign :: CLDeviceID -> IO CLuintSource

Describes the alignment in bits of the base address of any allocated memory object.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MEM_BASE_ADDR_ALIGN.

clGetDeviceMinDataTypeAlignSize :: CLDeviceID -> IO CLuintSource

The smallest alignment in bytes which can be used for any data type.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE.

clGetDeviceName :: CLDeviceID -> IO StringSource

Device name string.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_NAME.

clGetDevicePlatform :: CLDeviceID -> IO CLPlatformIDSource

The platform associated with this device.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PLATFORM.

clGetDevicePreferredVectorWidthChar :: CLDeviceID -> IO CLuintSource

Preferred native vector width size for built-in char types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR.

clGetDevicePreferredVectorWidthShort :: CLDeviceID -> IO CLuintSource

Preferred native vector width size for built-in short types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT.

clGetDevicePreferredVectorWidthInt :: CLDeviceID -> IO CLuintSource

Preferred native vector width size for built-in int types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT.

clGetDevicePreferredVectorWidthLong :: CLDeviceID -> IO CLuintSource

Preferred native vector width size for built-in long types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG.

clGetDevicePreferredVectorWidthFloat :: CLDeviceID -> IO CLuintSource

Preferred native vector width size for built-in float types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT.

clGetDevicePreferredVectorWidthDouble :: CLDeviceID -> IO CLuintSource

Preferred native vector width size for built-in double types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector. | If the cl_khr_fp64 extension is not supported, clGetDevicePreferredVectorWidthDouble must return 0.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE.

clGetDeviceProfile :: CLDeviceID -> IO StringSource

OpenCL profile string. Returns the profile name supported by the device (see note). The profile name returned can be one of the following strings:

  • FULL_PROFILE - if the device supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported).
  • EMBEDDED_PROFILE - if the device supports the OpenCL embedded profile.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PROFILE.

clGetDeviceProfilingTimerResolution :: CLDeviceID -> IO CSizeSource

Describes the resolution of device timer. This is measured in nanoseconds.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_PROFILING_TIMER_RESOLUTION.

clGetDeviceVendor :: CLDeviceID -> IO StringSource

Vendor name string.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_VENDOR.

clGetDeviceVendorID :: CLDeviceID -> IO CLuintSource

A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_VENDOR_ID.

clGetDeviceVersion :: CLDeviceID -> IO StringSource

OpenCL version string. Returns the OpenCL version supported by the device. This version string has the following format: OpenCL major_version.minor_version vendor-specific information The major_version.minor_version value returned will be 1.0.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_VERSION.

clGetDeviceDriverVersion :: CLDeviceID -> IO StringSource

OpenCL software driver version string in the form major_number.minor_number.

This function execute OpenCL clGetDeviceInfo with CL_DRIVER_VERSION.

clGetDeviceSingleFPConfig :: CLDeviceID -> IO [CLDeviceFPConfig]Source

Describes single precision floating-point capability of the device. This is a bit-field that describes one or more of the CLDeviceFPConfig values. The mandated minimum floating-point capability is CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_SINGLE_FP_CONFIG.

clGetDeviceDoubleFPConfig :: CLDeviceID -> IO [CLDeviceFPConfig]Source

Describes the OPTIONAL double precision floating-point capability of the OpenCL device. This is a bit-field that describes one or more of the CLDeviceFPConfig values. The mandated minimum double precision floating-point capability is CL_FP_FMA | CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_INF_NAN | CL_FP_DENORM.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_DOUBLE_FP_CONFIG.

clGetDeviceHalfFPConfig :: CLDeviceID -> IO [CLDeviceFPConfig]Source

Describes the OPTIONAL half precision floating-point capability of the OpenCL device. This is a bit-field that describes one or more of the CLDeviceFPConfig values. The required minimum half precision floating-point capability as implemented by this extension is CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_INF_NAN.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_HALF_FP_CONFIG.

clGetDeviceLocalMemType :: CLDeviceID -> IO CLDeviceLocalMemTypeSource

Type of local memory supported. This can be set to CL_LOCAL implying dedicated local memory storage such as SRAM, or CL_GLOBAL.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_LOCAL_MEM_TYPE.

clGetDeviceGlobalMemCacheType :: CLDeviceID -> IO CLDeviceMemCacheTypeSource

Type of global memory cache supported. Valid values are: CL_NONE, CL_READ_ONLY_CACHE, and CL_READ_WRITE_CACHE.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_GLOBAL_MEM_CACHE_TYPE.

clGetDeviceQueueProperties :: CLDeviceID -> IO [CLCommandQueueProperty]Source

Describes the command-queue properties supported by the device. This is a list that describes one or more of the CLCommandQueueProperty values. These properties are described in the table for clCreateCommandQueue. The mandated minimum capability is CL_QUEUE_PROFILING_ENABLE.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_QUEUE_PROPERTIES.

clGetDeviceType :: CLDeviceID -> IO [CLDeviceType]Source

The OpenCL device type. Currently supported values are one of or a combination of: CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR, or CL_DEVICE_TYPE_DEFAULT.

This function execute OpenCL clGetDeviceInfo with CL_DEVICE_TYPE.