All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
error.hpp
Go to the documentation of this file.
#ifndef VIENNACL_OCL_ERROR_HPP_
#define VIENNACL_OCL_ERROR_HPP_
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
-----------------
ViennaCL - The Vienna Computing Library
-----------------
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
(A list of authors and contributors can be found in the manual)
License: MIT (X11), see file LICENSE in the base directory
============================================================================= */
//error levels:
//#define VIENNACL_DEBUG_ALL //print all of the following
//#define VIENNACL_DEBUG_KERNEL //debug any modifications on viennacl::ocl::kernel objects
//#define VIENNACL_DEBUG_COPY //print infos related to setting up/modifying memory objects
//#define VIENNACL_DEBUG_OPENCL //display debug info for the OpenCL layer (platform/context/queue creation,
//#define VIENNACL_DEBUG_DEVICE //Show device info upon allocation
//#define VIENNACL_DEBUG_CONTEXT //Debug queries to context
//#define VIENNACL_DEBUG_BUILD //Show debug info from OpenCL compiler
//backwards compatibility:
#ifdef VIENNACL_BUILD_INFO
#define VIENNACL_DEBUG_ALL
#endif
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#include <string>
#include <iostream>
#include <exception>
#include <stdexcept>
#define VIENNACL_BUG_REPORT_STRING \
"\nIf you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:\n"\
" * Operating System\n"\
" * Which OpenCL implementation (AMD, NVIDIA, etc.)\n"\
" * ViennaCL version\n"\
"Many thanks in advance!";\
namespace viennacl
{
namespace ocl
{
//
// Generic errors
//
class queue_not_found : public std::runtime_error
{
public:
queue_not_found(std::string const & what_arg) : std::runtime_error(what_arg) {}
};
class program_not_found : public std::runtime_error
{
public:
program_not_found(std::string const & what_arg) : std::runtime_error(what_arg) {}
};
class kernel_not_found : public std::runtime_error
{
public:
kernel_not_found(std::string const & what_arg) : std::runtime_error(what_arg) {}
};
//
// Wrapper for OpenCL exceptions:
//
class device_not_found : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_DEVICE_NOT_FOUND \n ViennaCL could not find a suitable device. Please check whether an OpenCL implementation is properly installed and a suitable device available."
VIENNACL_BUG_REPORT_STRING;
}
};
class device_not_available : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_DEVICE_NOT_AVAILABLE \n ViennaCL could not use the compute device because it is not available."
VIENNACL_BUG_REPORT_STRING;
}
};
class compiler_not_available : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_COMPILER_NOT_AVAILABLE \n Your OpenCL framework does not provide an OpenCL compiler. Unfortunately, ViennaCL cannot be used without such a compiler."
VIENNACL_BUG_REPORT_STRING;
}
};
class mem_object_allocation_failure : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_MEM_OBJECT_ALLOCATION_FAILURE \n ViennaCL could not allocate memory on the device. Most likely the device simply ran out of memory."
VIENNACL_BUG_REPORT_STRING;
}
};
class out_of_resources : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_OUT_OF_RESOURCES \n ViennaCL tried to launch a compute kernel, but the device does not provide enough resources. Try changing the global and local work item sizes."
VIENNACL_BUG_REPORT_STRING;
}
};
class out_of_host_memory : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_OUT_OF_HOST_MEMORY \n The host ran out of memory (usually CPU RAM). Please try again on smaller problems."
VIENNACL_BUG_REPORT_STRING;
}
};
class profiling_info_not_available : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_PROFILING_INFO_NOT_AVAILABLE."
VIENNACL_BUG_REPORT_STRING;
}
};
class mem_copy_overlap : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_MEM_COPY_OVERLAP."
VIENNACL_BUG_REPORT_STRING;
}
};
class image_format_mismatch : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_IMAGE_FORMAT_MISMATCH."
VIENNACL_BUG_REPORT_STRING;
}
};
class image_format_not_supported : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_IMAGE_FORMAT_NOT_SUPPORTED."
VIENNACL_BUG_REPORT_STRING;
}
};
class build_program_failure : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_BUILD_PROGRAM_FAILURE \n The OpenCL compiler encountered an error during the compilation of ViennaCL sources. This is most likely a bug in ViennaCL."
VIENNACL_BUG_REPORT_STRING;
}
};
class map_failure : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_MAP_FAILURE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_value : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_VALUE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_device_type : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_DEVICE_TYPE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_platform : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_PLATFORM."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_device : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_DEVICE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_context : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_CONTEXT."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_queue_properties : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_QUEUE_PROPERTIES."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_command_queue : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_COMMAND_QUEUE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_host_ptr : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_HOST_PTR."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_mem_object : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_MEM_OBJECT."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_image_format_descriptor : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_IMAGE_FORMAT_DESCRIPTOR."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_image_size : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_IMAGE_SIZE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_sampler : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_SAMPLER."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_binary : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_BINARY."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_build_options : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_BUILD_OPTIONS."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_program : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_PROGRAM."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_program_executable : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_PROGRAM_EXECUTABLE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_kernel_name : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_KERNEL_NAME \n The supplied kernel name is invalid. If you have written your own OpenCL kernel, please check that the correct kernel name is used in the initalization of the kernel object."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_kernel_definition : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_KERNEL_DEFINITION."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_kernel : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_KERNEL \n The supplied kernel argument is invalid."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_arg_index : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_ARG_INDEX."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_arg_value : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_ARG_VALUE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_arg_size : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_ARG_SIZE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_kernel_args : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_KERNEL_ARGS \n The supplied kernel arguments do not fit the kernel parameter list. If you have written your own OpenCL kernel, please check that the correct kernel arguments are set in the appropriate order."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_work_dimension : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_WORK_DIMENSION"
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_work_group_size : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_WORK_GROUP_SIZE \n The supplied work group size is invalid. If you have set this value manually, please reconsider your choice."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_work_item_size : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_WORK_ITEM_SIZE \n The work item size is invalid. If you have set this value manually, please reconsider your choice."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_global_offset : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_GLOBAL_OFFSET."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_event_wait_list : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_EVENT_WAIT_LIST."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_event : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_EVENT."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_operation : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_OPERATION."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_gl_object : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_GL_OBJECT."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_buffer_size : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_BUFFER_SIZE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_mip_level : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_MIP_LEVEL."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_global_work_size : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_GLOBAL_WORK_SIZE."
VIENNACL_BUG_REPORT_STRING;
}
};
class invalid_property : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: CL_INVALID_PROPERTY."
VIENNACL_BUG_REPORT_STRING;
}
};
class unknown_error : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors."
VIENNACL_BUG_REPORT_STRING;
}
};
class double_precision_not_provided_error : public std::exception
{
virtual const char* what() const throw()
{
return "ViennaCL: FATAL ERROR: You requested to create a ViennaCL type using double precision. However, double precision is not supported by your device."
VIENNACL_BUG_REPORT_STRING;
}
};
template<typename T>
struct error_checker
{
static void raise_exception(cl_int err)
{
switch (err)
{
case CL_DEVICE_NOT_FOUND: throw device_not_found();
case CL_DEVICE_NOT_AVAILABLE: throw device_not_available();
case CL_COMPILER_NOT_AVAILABLE: throw compiler_not_available();
case CL_MEM_OBJECT_ALLOCATION_FAILURE: throw mem_object_allocation_failure();
case CL_OUT_OF_RESOURCES: throw out_of_resources();
case CL_OUT_OF_HOST_MEMORY: throw out_of_host_memory();
case CL_PROFILING_INFO_NOT_AVAILABLE: throw profiling_info_not_available();
case CL_MEM_COPY_OVERLAP: throw mem_copy_overlap();
case CL_IMAGE_FORMAT_MISMATCH: throw image_format_mismatch();
case CL_IMAGE_FORMAT_NOT_SUPPORTED: throw image_format_not_supported();
case CL_BUILD_PROGRAM_FAILURE: throw build_program_failure();
case CL_MAP_FAILURE: throw map_failure();
case CL_INVALID_VALUE: throw invalid_value();
case CL_INVALID_DEVICE_TYPE: throw invalid_device_type();
case CL_INVALID_PLATFORM: throw invalid_platform();
case CL_INVALID_DEVICE: throw invalid_device();
case CL_INVALID_CONTEXT: throw invalid_context();
case CL_INVALID_QUEUE_PROPERTIES: throw invalid_queue_properties();
case CL_INVALID_COMMAND_QUEUE: throw invalid_command_queue();
case CL_INVALID_HOST_PTR: throw invalid_host_ptr();
case CL_INVALID_MEM_OBJECT: throw invalid_mem_object();
case CL_INVALID_IMAGE_FORMAT_DESCRIPTOR: throw invalid_image_format_descriptor();
case CL_INVALID_IMAGE_SIZE: throw invalid_image_size();
case CL_INVALID_SAMPLER: throw invalid_sampler();
case CL_INVALID_BINARY: throw invalid_binary();
case CL_INVALID_BUILD_OPTIONS: throw invalid_build_options();
case CL_INVALID_PROGRAM: throw invalid_program();
case CL_INVALID_PROGRAM_EXECUTABLE: throw invalid_program_executable();
case CL_INVALID_KERNEL_NAME: throw invalid_kernel_name();
case CL_INVALID_KERNEL_DEFINITION: throw invalid_kernel_definition();
case CL_INVALID_KERNEL: throw invalid_kernel();
case CL_INVALID_ARG_INDEX: throw invalid_arg_index();
case CL_INVALID_ARG_VALUE: throw invalid_arg_value();
case CL_INVALID_ARG_SIZE: throw invalid_arg_size();
case CL_INVALID_KERNEL_ARGS: throw invalid_kernel_args();
case CL_INVALID_WORK_DIMENSION: throw invalid_work_dimension();
case CL_INVALID_WORK_GROUP_SIZE: throw invalid_work_group_size();
case CL_INVALID_WORK_ITEM_SIZE: throw invalid_work_item_size();
case CL_INVALID_GLOBAL_OFFSET: throw invalid_global_offset();
case CL_INVALID_EVENT_WAIT_LIST: throw invalid_event_wait_list();
case CL_INVALID_EVENT: throw invalid_event();
case CL_INVALID_OPERATION: throw invalid_operation();
case CL_INVALID_GL_OBJECT: throw invalid_gl_object();
case CL_INVALID_BUFFER_SIZE: throw invalid_buffer_size();
case CL_INVALID_MIP_LEVEL: throw invalid_mip_level();
case CL_INVALID_GLOBAL_WORK_SIZE: throw invalid_global_work_size();
#ifdef CL_INVALID_PROPERTY
case CL_INVALID_PROPERTY: throw invalid_property();
#endif
// return "CL_INVALID_GLOBAL_WORK_SIZE";
default: throw unknown_error();
}
} //getErrorString
static void checkError(cl_int err,
#ifdef VIENNACL_DEBUG_ALL
const char * file,
const char * func,
int line)
#else
const char *,
const char *,
int)
#endif
{
if (err != CL_SUCCESS)
{
#ifdef VIENNACL_DEBUG_ALL
std::cerr << "ViennaCL: Error " << err << " in function " << func << " ( "<< file << ":" << line << " ) " << std::endl;
#endif
raise_exception(err);
}
} //checkError()
}; //struct
#define VIENNACL_ERR_CHECK(err) viennacl::ocl::error_checker<void>::checkError(err, __FILE__, __FUNCTION__, __LINE__);
} //namespace ocl
} //namespace viennacl
#endif
viennacl::ocl::invalid_device_type
Exception thrown if an invalid device type is specified.
Definition: error.hpp:223
viennacl::ocl::queue_not_found::queue_not_found
queue_not_found(std::string const &what_arg)
Definition: error.hpp:69
viennacl::ocl::error_checker
An error reporting class. Template argument is used to avoid problems with external linkage...
Definition: error.hpp:589
viennacl::ocl::queue_not_found
Definition: error.hpp:66
viennacl::ocl::invalid_image_size
Exception thrown if the image size provided is invalid (e.g. zero).
Definition: error.hpp:313
viennacl::ocl::compiler_not_available
Exception thrown if the OpenCL just-in-time compiler is not available.
Definition: error.hpp:113
viennacl::ocl::program_not_found
Definition: error.hpp:72
viennacl::ocl::mem_object_allocation_failure
Exception thrown if a memory object cannot be allocated. Usually the requested memory buffer is simpl...
Definition: error.hpp:123
viennacl::ocl::invalid_work_group_size
Exception thrown if the number of work groups is invalid (usually this means that more than 256/512/7...
Definition: error.hpp:453
viennacl::ocl::invalid_host_ptr
Exception thrown if the provided pointer to host memory is invalid.
Definition: error.hpp:283
viennacl::ocl::invalid_build_options
Exception thrown if invalid build options are passed to the OpenCL just-in-time compiler.
Definition: error.hpp:343
viennacl::ocl::mem_copy_overlap
Exception thrown if the source buffer overlaps the destination buffer when copying from device memory...
Definition: error.hpp:163
viennacl::ocl::device_not_available
Exception thrown if the selected compute device is not available (maybe locked by another process)...
Definition: error.hpp:103
viennacl::ocl::invalid_arg_value
Exception thrown if the kernel argument provided has an invalid value.
Definition: error.hpp:413
viennacl::ocl::out_of_host_memory
Exception thrown if the host cannot provide enough memory for the datastructures in the OpenCL backen...
Definition: error.hpp:143
VIENNACL_BUG_REPORT_STRING
#define VIENNACL_BUG_REPORT_STRING
Definition: error.hpp:52
viennacl::ocl::invalid_gl_object
Exception thrown if the provided OpenGL (not OpenCL) object is invalid.
Definition: error.hpp:513
viennacl::ocl::invalid_arg_index
Exception thrown if the kernel argument index is invalid, e.g. an arg index larger than the number of...
Definition: error.hpp:403
viennacl::ocl::invalid_platform
Exception thrown if an invalid OpenCL platform is provided to an OpenCL function. ...
Definition: error.hpp:233
viennacl::ocl::invalid_program_executable
Exception thrown if there is no built program exectuable available for the device.
Definition: error.hpp:363
viennacl::ocl::invalid_mip_level
Exception thrown if the provided miplevel is greater than zero, but the OpenGL implementation does no...
Definition: error.hpp:533
viennacl::ocl::invalid_kernel_definition
Exception thrown if the kernel definition (number of arguments, argument types, etc.) is not the same for all devices for which the program has been built.
Definition: error.hpp:383
viennacl::ocl::image_format_mismatch
Exception thrown if there is a mismatch in image formats for the operands.
Definition: error.hpp:173
viennacl::ocl::invalid_program
Exception thrown if an OpenCL program object handle is invalid (e.g. not initialized).
Definition: error.hpp:353
viennacl::ocl::invalid_operation
Exception thrown if interoperability of OpenCL with other frameworks collide.
Definition: error.hpp:503
viennacl::ocl::program_not_found::program_not_found
program_not_found(std::string const &what_arg)
Definition: error.hpp:75
viennacl::ocl::out_of_resources
Exception thrown if the compute device is out of resources (either global memory, registers...
Definition: error.hpp:133
viennacl::ocl::double_precision_not_provided_error
Exception thrown if the user wants to use double precision arithmetics, but the device does not suppo...
Definition: error.hpp:573
viennacl::ocl::invalid_device
Exception thrown if an invalid OpenCL device is provided to an OpenCL function.
Definition: error.hpp:243
viennacl::ocl::invalid_buffer_size
Exception thrown if the provided buffer size is invalid (e.g. zero)
Definition: error.hpp:523
viennacl::ocl::error_checker::checkError
static void checkError(cl_int err, const char *, const char *, int)
Checks whether an OpenCL error has occured.
Definition: error.hpp:658
viennacl::ocl::invalid_event
Exception thrown if the provided event object (of type cl_event) is invalid.
Definition: error.hpp:493
viennacl::ocl::invalid_arg_size
Exception thrown if the arguments to an OpenCL kernel have an invalid size e.g. not sizeof(cl_mem))...
Definition: error.hpp:423
viennacl::ocl::invalid_kernel_args
Exception thrown if the kernel arguments are invalid and/or do not fit the kernel parameter list...
Definition: error.hpp:433
viennacl::ocl::invalid_mem_object
Exception thrown if an invalid OpenCL memory object (of type cl_mem) is passed to an OpenCL funciton...
Definition: error.hpp:293
viennacl::ocl::invalid_context
Exception thrown if an invalid OpenCL context is provided to an OpenCL function.
Definition: error.hpp:253
viennacl::ocl::kernel_not_found::kernel_not_found
kernel_not_found(std::string const &what_arg)
Definition: error.hpp:81
viennacl::ocl::invalid_global_work_size
Exception thrown if the total number of work items is invalid (for example, not divisible by the numb...
Definition: error.hpp:543
viennacl::ocl::invalid_work_dimension
Exception thrown if the work dimension is invalid (usually this means that the work dimension was set...
Definition: error.hpp:443
viennacl::ocl::invalid_kernel_name
Exception thrown if the provided kernel name is invalid (e.g. not part of the program provided)...
Definition: error.hpp:373
viennacl::ocl::error_checker::raise_exception
static void raise_exception(cl_int err)
Trows exceptions that reflect OpenCL error codes.
Definition: error.hpp:593
viennacl::ocl::invalid_command_queue
Exception thrown if an invalid OpenCL command queue is provided to an OpenCL function.
Definition: error.hpp:273
viennacl::ocl::invalid_kernel
Exception thrown if the provided kernel object (of type cl_kernel) is invalid (e.g. not initialized, from different context, or corrupted).
Definition: error.hpp:393
viennacl::ocl::device_not_found
Exception thrown in the case that a requested compute device was not found.
Definition: error.hpp:93
viennacl::ocl::invalid_global_offset
Exception thrown if the provided offset for get_global_id() in OpenCL kernels is invalid.
Definition: error.hpp:473
viennacl::ocl::invalid_property
Exception thrown if an invalid property is provided to a function (vague value).
Definition: error.hpp:553
viennacl::ocl::profiling_info_not_available
Exception thrown if the OpenCL context does not have CL_QUEUE_PROFILING_ENABLE set, if the execution is not complete, or the event object is a user event object.
Definition: error.hpp:153
viennacl::ocl::invalid_event_wait_list
Exception thrown if the provided event wait list is invalid.
Definition: error.hpp:483
viennacl::ocl::invalid_image_format_descriptor
Exception thrown if an invalid image format descriptor is provided.
Definition: error.hpp:303
viennacl::ocl::build_program_failure
Exception thrown if the OpenCL program cannot be built, usually due to a syntax error in the OpenCL c...
Definition: error.hpp:193
viennacl::ocl::kernel_not_found
Definition: error.hpp:78
viennacl::ocl::invalid_work_item_size
Exception thrown if the number of work items per work group invalid (usually this means that more tha...
Definition: error.hpp:463
viennacl::ocl::image_format_not_supported
Exception thrown if the requested image format is not supported.
Definition: error.hpp:183
viennacl::ocl::invalid_binary
Exception thrown if the OpenCL binary (generated from the jit-compiler or loaded from some other loca...
Definition: error.hpp:333
viennacl::ocl::invalid_sampler
Exception thrown if an invalid sampler is provided for an image.
Definition: error.hpp:323
viennacl::ocl::map_failure
Exception thrown if the mapping of device memory to the host memory space failed. ...
Definition: error.hpp:203
viennacl::ocl::unknown_error
Exception thrown if the returned error cannot be resolved to some defined error constant. Might result from invalid sources, invalid memory operations, etc.
Definition: error.hpp:563
viennacl::ocl::invalid_queue_properties
Exception thrown if invalid OpenCL command queue properties are provided when creating a command queu...
Definition: error.hpp:263
viennacl::ocl::invalid_value
Exception thrown is an invalid value is provided to an OpenCL function.
Definition: error.hpp:213