OpenCL- Haskell high-level wrapper for OpenCL

Safe HaskellNone




Basic Types

data CLError Source

  • CL_BUILD_PROGRAM_FAILURE, Returned if there is a failure to build the program executable.
  • CL_COMPILER_NOT_AVAILABLE, Returned if the parameter program is created with clCreateProgramWithSource and a compiler is not available. For example clDeviceCompilerAvalaible is set to False.
  • CL_DEVICE_NOT_AVAILABLE, Returned if the specified device is not currently available.
  • CL_DEVICE_NOT_FOUND, Returned if no OpenCL devices that match the specified devices were found.
  • CL_PLATFORM_NOT_FOUND_khr, Returned when no .icd (platform drivers) can be properly loaded.
  • CL_IMAGE_FORMAT_MISMATCH, Returned if the specified source and destination images are not valid image objects.
  • CL_IMAGE_FORMAT_NOT_SUPPORTED, Returned if the specified image format is not supported.
  • CL_INVALID_ARG_INDEX, Returned if an invalid argument index is specified.
  • CL_INVALID_ARG_SIZE, Returned if argument size specified (arg_size) does not match the size of the data type for an argument that is not a memory object, or if the argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the __local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).
  • CL_INVALID_ARG_VALUE, Returned if the argument value specified is NULL for an argument that is not declared with the __local qualifier or vice-versa.
  • CL_INVALID_BINARY, Returned if the program binary is not a valid binary for the specified device.
  • CL_INVALID_BUFFER_SIZE, Returned if the value of the parameter size is 0 or is greater than clDeviceMaxMemAllocSize for all devices specified in the parameter context.
  • CL_INVALID_BUILD_OPTIONS, Returned if the specified build options are invalid.
  • CL_INVALID_COMMAND_QUEUE, Returned if the specified command-queue is not a valid command-queue.
  • CL_INVALID_CONTEXT, Returned if the specified context is not a valid OpenCL context, or the context associated with certain parameters are not the same.
  • CL_INVALID_DEVICE, Returned if the device or devices specified are not valid.
  • CL_INVALID_DEVICE_TYPE, Returned if device type specified is not valid.
  • CL_INVALID_EVENT, Returned if the event objects specified are not valid.
  • CL_INVALID_EVENT_WAIT_LIST, Returned if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list_list is not NULL and num_events_in_wait_list is 0, or specified event objects are not valid events.
  • CL_INVALID_GL_OBJECT, Returned if obj is not a vaild GL object or is a GL object but does not have an existing data store.
  • CL_INVALID_GLOBAL_OFFSET, Returned if global_work_offset is not NULL.
  • CL_INVALID_HOST_PTR, Returned if host_ptr is NULL and CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are set in flags or if host_ptr is not NULL but CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in flags.
  • CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, Returned if the image format specified is not valid or is NULL or does not map to a supported OpenCL image format.
  • CL_INVALID_IMAGE_SIZE, Returned if the specified image width or height are invalid or if the image row pitch and image slice pitch do not follow the rules.
  • CL_INVALID_KERNEL_NAME, Returned if the specified kernel name is not found in program.
  • CL_INVALID_KERNEL, Returned if the specified kernel is not a valid kernel object.
  • CL_INVALID_KERNEL_ARGS, Returned if the kernel argument values have not been specified.
  • CL_INVALID_KERNEL_DEFINITION, Returned if the function definition for __kernel function given by kernel_name such as the number of arguments, the argument types are not the same for all devices for which the program executable has been built.
  • CL_INVALID_MEM_OBJECT, Returned if a parameter is not a valid memory, image, or buffer object.
  • CL_INVALID_OPERATION, Returned if there are no devices in context that support images. Returned if the build of a program executable for any of the devices specified by a previous call to clBuildProgram for program has not completed, or if there are kernel objects attached to program. Returned by clEnqueueNativeKernel if the specified device cannot execute the native kernel.
  • CL_INVALID_PLATFORM, Returned if the specified platform is not a valid platform, or no platform could be selected, or if platform value specified in properties is not a valid platform.
  • CL_INVALID_PROGRAM, Returned if the specified program is not a valid program object.
  • CL_INVALID_PROGRAM_EXECUTABLE, Returned if there is no successfully built executable for program, or if there is no device in program. Returned if there is no successfully built program executable available for device associated with command_queue.
  • CL_INVALID_QUEUE_PROPERTIES, Returned if specified properties are valid but are not supported by the device.
  • CL_INVALID_SAMPLER, Returned if the specified sampler is not a valid sampler object, or for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.
  • CL_INVALID_VALUE, Returned if a parameter is not an expected value.
  • CL_INVALID_WORK_DIMENSION, Returned if work_dim is not a valid value.
  • CL_INVALID_WORK_GROUP_SIZE, Returned if local_work_size is specified and number of workitems specified by global_work_size is not evenly divisible by size of work-group given by local_work_size or does not match the work-group size specified for kernel using the __attribute__((reqd_work_group_size(X, Y, Z))) qualifier in program source.
  • CL_INVALID_WORK_ITEM_SIZE, Returned if the number of work-items specified in any of local_work_size... [0]... local_work_size[work_dim - 1] is greater than the corresponding values specified by clDeviceMaxWorkItemSizes.
  • CL_MAP_FAILURE, Returned by if there is a failure to map the requested region into the host address space. This error cannot occur for buffer objects created with CLMEM_USE_HOST_PTR or CLMEM_ALLOC_HOST_PTR.
  • CL_MEM_OBJECT_ALLOCATION_FAILURE, Returned if there is a failure to allocate memory for data store associated with image or buffer objects specified as arguments to kernel.
  • CL_MEM_COPY_OVERLAP, Returned if the source and destination images are the same image (or the source and destination buffers are the same buffer), and the source and destination regions overlap.
  • CL_OUT_OF_HOST_MEMORY, Returned in the event of a failure to allocate resources required by the OpenCL implementation on the host.
  • CL_OUT_OF_RESOURCES, Returned in the event of a failure to queue the execution instance of kernel on the command-queue because of insufficient resources needed to execute the kernel.
  • CL_PROFILING_INFO_NOT_AVAILABLE, Returned if the CL_QUEUE_PROFILING_ENABLE flag is not set for the command-queue and the profiling information is currently not available (because the command identified by event has not completed).
  • CL_SUCCESS, Indicates that the function executed successfully.