29package com.jogamp.opencl;
31import com.jogamp.opencl.llb.CL;
40 private static final long serialVersionUID = 6573520735486076436L;
56 super(message +
" [error: " + errorStr+
"]");
57 this.error = errorStr;
64 public static void checkForError(
final int status,
final String message) {
67 ex.fillInStackTrace();
76 final CLException specificEx = createSpecificException(status, message);
77 if(specificEx !=
null) {
78 specificEx.fillInStackTrace();
81 return new CLException(status,
"unknown",
"unknown cause: code " + status);
150 default:
return null;
154 private static CLException createSpecificException(
final int error,
final String message) {
207 default:
return null;
CLException thrown on CL.CL_BUILD_PROGRAM_FAILURE errors.
CLBuildProgramFailureException(final String message)
CLException thrown on CL.CL_COMPILER_NOT_AVAILABLE errors.
CLCompilerNotAvailableException(final String message)
CLException thrown on CL.CL_DEVICE_NOT_AVAILABLE errors.
CLDeviceNotAvailableException(final String message)
CLException thrown on CL.CL_DEVICE_NOT_FOUND errors.
CLDeviceNotFoundException(final String message)
CLException thrown on CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST errors.
CLExecStatusErrorForEventsInWaitListException(final String message)
CLException thrown on CL.CL_INVALID_ARG_INDEX errors.
CLInvalidArgIndexException(final String message)
CLException thrown on CL.CL_INVALID_ARG_SIZE errors.
CLInvalidArgSizeException(final String message)
CLException thrown on CL.CL_INVALID_ARG_VALUE errors.
CLInvalidArgValueException(final String message)
CLException thrown on CL.CL_INVALID_BINARY errors.
CLInvalidBinaryException(final String message)
CLException thrown on CL.CL_INVALID_BUFFER_SIZE errors.
CLInvalidBufferSizeException(final String message)
CLException thrown on CL.CL_INVALID_BUILD_OPTIONS errors.
CLInvalidBuildOptionsException(final String message)
CLException thrown on CL.CL_INVALID_COMMAND_QUEUE errors.
CLInvalidCommandQueueException(final String message)
CLException thrown on CL.CL_INVALID_CONTEXT errors.
CLInvalidContextException(final String message)
CLException thrown on CL.CL_INVALID_DEVICE errors.
CLInvalidDeviceException(final String message)
CLException thrown on CL.CL_INVALID_DEVICE_TYPE errors.
CLInvalidDeviceTypeException(final String message)
CLException thrown on CL.CL_INVALID_EVENT errors.
CLInvalidEventException(final String message)
CLException thrown on CL.CL_INVALID_EVENT_WAIT_LIST errors.
CLInvalidEventWaitListException(final String message)
CLException thrown on CL.CL_INVALID_GL_OBJECT errors.
CLInvalidGLObjectException(final String message)
CLException thrown on CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR errors.
CLInvalidGLSharegroupReferenceKhrException(final String message)
CLException thrown on CL.CL_INVALID_GLOBAL_OFFSET errors.
CLInvalidGlobalOffsetException(final String message)
CLException thrown on CL.CL_INVALID_GLOBAL_WORK_SIZE errors.
CLInvalidGlobalWorkSizeException(final String message)
CLException thrown on CL.CL_INVALID_HOST_PTR errors.
CLInvalidHostPtrException(final String message)
CLException thrown on CL.CL_INVALID_IMAGE_SIZE errors.
CLInvalidImageSizeException(final String message)
CLException thrown on CL.CL_INVALID_KERNEL_ARGS errors.
CLInvalidKernelArgsException(final String message)
CLException thrown on CL.CL_INVALID_KERNEL_DEFINITION errors.
CLInvalidKernelDefinitionException(final String message)
CLException thrown on CL.CL_INVALID_KERNEL errors.
CLInvalidKernelException(final String message)
CLException thrown on CL.CL_INVALID_KERNEL_NAME errors.
CLInvalidKernelNameException(final String message)
CLException thrown on CL.CL_INVALID_MEM_OBJECT errors.
CLInvalidMemObjectException(final String message)
CLException thrown on CL.CL_INVALID_MIP_LEVEL errors.
CLInvalidMipLevelException(final String message)
CLException thrown on CL.CL_INVALID_OPERATION errors.
CLInvalidOperationException(final String message)
CLException thrown on CL.CL_INVALID_PROGRAM errors.
CLInvalidProgramException(final String message)
CLException thrown on CL.CL_INVALID_PROGRAM_EXECUTABLE errors.
CLInvalidProgramExecutableException(final String message)
CLException thrown on CL.CL_INVALID_PROPERTY errors.
CLInvalidPropertyException(final String message)
CLException thrown on CL.CL_INVALID_QUEUE_PROPERTIES errors.
CLInvalidQueuePropertiesException(final String message)
CLException thrown on CL.CL_INVALID_SAMPLER errors.
CLInvalidSamplerException(final String message)
CLException thrown on CL.CL_INVALID_VALUE errors.
CLInvalidValueException(final String message)
CLException thrown on CL.CL_INVALID_WORK_DIMENSION errors.
CLInvalidWorkDimensionException(final String message)
CLException thrown on CL.CL_INVALID_WORK_GROUP_SIZE errors.
CLInvalidWorkGroupSizeException(final String message)
CLException thrown on CL.CL_INVALID_WORK_ITEM_SIZE errors.
CLInvalidWorkItemSizeException(final String message)
CLException thrown on CL.CL_MAP_FAILURE errors.
CLMapFailureException(final String message)
CLException thrown on CL.CL_MEM_COPY_OVERLAP errors.
CLMemCopyOverlapException(final String message)
CLException thrown on CL.CL_MEM_OBJECT_ALLOCATION_FAILURE errors.
CLMemObjectAllocationFailureException(final String message)
CLException thrown on CL.CL_MISALIGNED_SUB_BUFFER_OFFSET errors.
CLMisalignedSubBufferOffsetException(final String message)
CLException thrown on CL.CL_OUT_OF_HOST_MEMORY errors.
CLOutOfHostMemoryException(final String message)
CLException thrown on CL.CL_OUT_OF_RESOURCES errors.
CLOutOfResourcesException(final String message)
CLException thrown on CL.CL_PROFILING_INFO_NOT_AVAILABLE errors.
CLProfilingInfoNotAvailableException(final String message)
Main Exception type for runtime OpenCL errors and failed function calls (e.g.
String getCLErrorString()
Returns a human readable String for the OpenCL error code.
static CLException newException(final int status, final String message)
Returns a CLException specific to the error code.
CLException(final String message)
static String resolveErrorCode(final int error)
Returns a human readable String for the OpenCL error code or null if not known.
static void checkForError(final int status, final String message)
Throws a CLException when status != CL_SUCCESS.
Java bindings to OpenCL, the Open Computing Language.
static final int CL_INVALID_ARG_INDEX
Define "CL_INVALID_ARG_INDEX" with expression '-49', CType: int.
static final int CL_INVALID_BINARY
Define "CL_INVALID_BINARY" with expression '-42', CType: int.
static final int CL_DEVICE_NOT_AVAILABLE
Define "CL_DEVICE_NOT_AVAILABLE" with expression '-2', CType: int.
static final int CL_INVALID_WORK_ITEM_SIZE
Define "CL_INVALID_WORK_ITEM_SIZE" with expression '-55', CType: int.
static final int CL_PROFILING_INFO_NOT_AVAILABLE
Define "CL_PROFILING_INFO_NOT_AVAILABLE" with expression '-7', CType: int.
static final int CL_INVALID_DEVICE
Define "CL_INVALID_DEVICE" with expression '-33', CType: int.
static final int CL_INVALID_GLOBAL_OFFSET
Define "CL_INVALID_GLOBAL_OFFSET" with expression '-56', CType: int.
static final int CL_MISALIGNED_SUB_BUFFER_OFFSET
Define "CL_MISALIGNED_SUB_BUFFER_OFFSET" with expression '-13', CType: int.
static final int CL_INVALID_BUILD_OPTIONS
Define "CL_INVALID_BUILD_OPTIONS" with expression '-43', CType: int.
static final int CL_INVALID_VALUE
Define "CL_INVALID_VALUE" with expression '-30', CType: int.
static final int CL_INVALID_EVENT
Define "CL_INVALID_EVENT" with expression '-58', CType: int.
static final int CL_INVALID_SAMPLER
Define "CL_INVALID_SAMPLER" with expression '-41', CType: int.
static final int CL_INVALID_PROGRAM_EXECUTABLE
Define "CL_INVALID_PROGRAM_EXECUTABLE" with expression '-45', CType: int.
static final int CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
Define "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST" with expression '-14', CType: int.
static final int CL_OUT_OF_RESOURCES
Define "CL_OUT_OF_RESOURCES" with expression '-5', CType: int.
static final int CL_INVALID_WORK_GROUP_SIZE
Define "CL_INVALID_WORK_GROUP_SIZE" with expression '-54', CType: int.
static final int CL_MEM_OBJECT_ALLOCATION_FAILURE
Define "CL_MEM_OBJECT_ALLOCATION_FAILURE" with expression '-4', CType: int.
static final int CL_INVALID_GL_OBJECT
Define "CL_INVALID_GL_OBJECT" with expression '-60', CType: int.
static final int CL_INVALID_KERNEL_DEFINITION
Define "CL_INVALID_KERNEL_DEFINITION" with expression '-47', CType: int.
static final int CL_MAP_FAILURE
Define "CL_MAP_FAILURE" with expression '-12', CType: int.
static final int CL_INVALID_EVENT_WAIT_LIST
Define "CL_INVALID_EVENT_WAIT_LIST" with expression '-57', CType: int.
static final int CL_PLATFORM_NOT_FOUND_KHR
Define "CL_PLATFORM_NOT_FOUND_KHR" with expression '-1001', CType: int.
static final int CL_INVALID_QUEUE_PROPERTIES
Define "CL_INVALID_QUEUE_PROPERTIES" with expression '-35', CType: int.
static final int CL_INVALID_IMAGE_SIZE
Define "CL_INVALID_IMAGE_SIZE" with expression '-40', CType: int.
static final int CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
Define "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR" with expression '-39', CType: int.
static final int CL_INVALID_HOST_PTR
Define "CL_INVALID_HOST_PTR" with expression '-37', CType: int.
static final int CL_INVALID_ARG_SIZE
Define "CL_INVALID_ARG_SIZE" with expression '-51', CType: int.
static final int CL_INVALID_PROGRAM
Define "CL_INVALID_PROGRAM" with expression '-44', CType: int.
static final int CL_BUILD_PROGRAM_FAILURE
Define "CL_BUILD_PROGRAM_FAILURE" with expression '-11', CType: int.
static final int CL_INVALID_GLOBAL_WORK_SIZE
Define "CL_INVALID_GLOBAL_WORK_SIZE" with expression '-63', CType: int.
static final int CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR
Define "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR" with expression '-1000', CType: int.
static final int CL_SUCCESS
Define "CL_SUCCESS" with expression '0', CType: int.
static final int CL_MEM_COPY_OVERLAP
Define "CL_MEM_COPY_OVERLAP" with expression '-8', CType: int.
static final int CL_OUT_OF_HOST_MEMORY
Define "CL_OUT_OF_HOST_MEMORY" with expression '-6', CType: int.
static final int CL_INVALID_KERNEL_ARGS
Define "CL_INVALID_KERNEL_ARGS" with expression '-52', CType: int.
static final int CL_INVALID_OPERATION
Define "CL_INVALID_OPERATION" with expression '-59', CType: int.
static final int CL_INVALID_CONTEXT
Define "CL_INVALID_CONTEXT" with expression '-34', CType: int.
static final int CL_INVALID_COMMAND_QUEUE
Define "CL_INVALID_COMMAND_QUEUE" with expression '-36', CType: int.
static final int CL_INVALID_ARG_VALUE
Define "CL_INVALID_ARG_VALUE" with expression '-50', CType: int.
static final int CL_INVALID_BUFFER_SIZE
Define "CL_INVALID_BUFFER_SIZE" with expression '-61', CType: int.
static final int CL_INVALID_MEM_OBJECT
Define "CL_INVALID_MEM_OBJECT" with expression '-38', CType: int.
static final int CL_INVALID_PROPERTY
Define "CL_INVALID_PROPERTY" with expression '-64', CType: int.
static final int CL_INVALID_WORK_DIMENSION
Define "CL_INVALID_WORK_DIMENSION" with expression '-53', CType: int.
static final int CL_INVALID_MIP_LEVEL
Define "CL_INVALID_MIP_LEVEL" with expression '-62', CType: int.
static final int CL_INVALID_PLATFORM
Define "CL_INVALID_PLATFORM" with expression '-32', CType: int.
static final int CL_COMPILER_NOT_AVAILABLE
Define "CL_COMPILER_NOT_AVAILABLE" with expression '-3', CType: int.
static final int CL_INVALID_KERNEL_NAME
Define "CL_INVALID_KERNEL_NAME" with expression '-46', CType: int.
static final int CL_INVALID_KERNEL
Define "CL_INVALID_KERNEL" with expression '-48', CType: int.
static final int CL_INVALID_DEVICE_TYPE
Define "CL_INVALID_DEVICE_TYPE" with expression '-31', CType: int.
static final int CL_IMAGE_FORMAT_NOT_SUPPORTED
Define "CL_IMAGE_FORMAT_NOT_SUPPORTED" with expression '-10', CType: int.
static final int CL_IMAGE_FORMAT_MISMATCH
Define "CL_IMAGE_FORMAT_MISMATCH" with expression '-9', CType: int.
static final int CL_DEVICE_NOT_FOUND
Define "CL_DEVICE_NOT_FOUND" with expression '-1', CType: int.