diff options
Diffstat (limited to 'src/cl-utils.c')
-rw-r--r-- | src/cl-utils.c | 87 |
1 files changed, 65 insertions, 22 deletions
diff --git a/src/cl-utils.c b/src/cl-utils.c index ae146ed0..71ff25b5 100644 --- a/src/cl-utils.c +++ b/src/cl-utils.c @@ -46,28 +46,71 @@ const char *clError(cl_int err) { switch ( err ) { - case CL_SUCCESS : return "no error"; - case CL_INVALID_PLATFORM : return "invalid platform"; - case CL_INVALID_KERNEL : return "invalid kernel"; - case CL_INVALID_ARG_INDEX : return "invalid argument index"; - case CL_INVALID_ARG_VALUE : return "invalid argument value"; - case CL_INVALID_MEM_OBJECT : return "invalid memory object"; - case CL_INVALID_SAMPLER : return "invalid sampler"; - case CL_INVALID_ARG_SIZE : return "invalid argument size"; - case CL_INVALID_COMMAND_QUEUE : return "invalid command queue"; - case CL_INVALID_CONTEXT : return "invalid context"; - case CL_INVALID_VALUE : return "invalid value"; - case CL_INVALID_EVENT_WAIT_LIST : return "invalid wait list"; - case CL_MAP_FAILURE : return "map failure"; - case CL_MEM_OBJECT_ALLOCATION_FAILURE : return "object allocation failure"; - case CL_OUT_OF_HOST_MEMORY : return "out of host memory"; - case CL_OUT_OF_RESOURCES : return "out of resources"; - case CL_INVALID_KERNEL_NAME : return "invalid kernel name"; - case CL_INVALID_KERNEL_ARGS : return "invalid kernel arguments"; - case CL_INVALID_WORK_GROUP_SIZE : return "invalid work group size"; - case CL_IMAGE_FORMAT_NOT_SUPPORTED : return "image format not supported"; - case CL_INVALID_WORK_DIMENSION : return "invalid work dimension"; - default : + + case CL_SUCCESS : + return "no error"; + + case CL_INVALID_PLATFORM : + return "invalid platform"; + + case CL_INVALID_KERNEL : + return "invalid kernel"; + + case CL_INVALID_ARG_INDEX : + return "invalid argument index"; + + case CL_INVALID_ARG_VALUE : + return "invalid argument value"; + + case CL_INVALID_MEM_OBJECT : + return "invalid memory object"; + + case CL_INVALID_SAMPLER : + return "invalid sampler"; + + case CL_INVALID_ARG_SIZE : + return "invalid argument size"; + + case CL_INVALID_COMMAND_QUEUE : + return "invalid command queue"; + + case CL_INVALID_CONTEXT : + return "invalid context"; + + case CL_INVALID_VALUE : + return "invalid value"; + + case CL_INVALID_EVENT_WAIT_LIST : + return "invalid wait list"; + + case CL_MAP_FAILURE : + return "map failure"; + + case CL_MEM_OBJECT_ALLOCATION_FAILURE : + return "object allocation failure"; + + case CL_OUT_OF_HOST_MEMORY : + return "out of host memory"; + + case CL_OUT_OF_RESOURCES : + return "out of resources"; + + case CL_INVALID_KERNEL_NAME : + return "invalid kernel name"; + + case CL_INVALID_KERNEL_ARGS : + return "invalid kernel arguments"; + + case CL_INVALID_WORK_GROUP_SIZE : + return "invalid work group size"; + + case CL_IMAGE_FORMAT_NOT_SUPPORTED : + return "image format not supported"; + + case CL_INVALID_WORK_DIMENSION : + return "invalid work dimension"; + + default : return "unknown error"; } } |