ViennaCL - The Vienna Computing Library
1.5.2
|
A class representing a compute device (e.g. a GPU) More...
#include <device.hpp>
Public Member Functions | |
device () | |
device (cl_device_id dev) | |
device (const device &other) | |
cl_uint | address_bits () const |
The default compute device address space size specified as an unsigned integer value in bits. Currently supported values are 32 or 64 bits. More... | |
cl_bool | available () const |
Is CL_TRUE if the device is available and CL_FALSE if the device is not available. More... | |
cl_bool | compiler_available () const |
Is CL_FALSE if the implementation does not have a compiler available to compile the program source. Is CL_TRUE if the compiler is available. This can be CL_FALSE for the embedded platform profile only. More... | |
cl_bool | endian_little () const |
Is CL_TRUE if the OpenCL device is a little endian device and CL_FALSE otherwise. More... | |
cl_bool | error_correction_support () const |
Is CL_TRUE if the device implements error correction for all accesses to compute device memory (global and constant) and CL_FALSE otherwise. More... | |
cl_device_exec_capabilities | execution_capabilities () const |
Describes the execution capabilities of the device. More... | |
std::string | extensions () const |
Returns a space-separated list of extension names (the extension names themselves do not contain any spaces). More... | |
cl_ulong | global_mem_cache_size () const |
Size of global memory cache in bytes. More... | |
cl_device_mem_cache_type | global_mem_cache_type () const |
Type of global memory cache supported. Valid values are: CL_NONE, CL_READ_ONLY_CACHE, and CL_READ_WRITE_CACHE. More... | |
cl_uint | global_mem_cacheline_size () const |
Size of global memory cache in bytes. More... | |
cl_ulong | global_mem_size () const |
Size of global memory in bytes. More... | |
cl_bool | image_support () const |
Is CL_TRUE if the device and the host have a unified memory subsystem and is CL_FALSE otherwise. More... | |
size_t | image2d_max_height () const |
Max height of 2D image in pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
size_t | image2d_max_width () const |
Max width of 2D image in pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
size_t | image3d_max_depth () const |
Max depth of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
size_t | image3d_max_height () const |
Max height of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
size_t | image3d_max_width () const |
Max width of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
cl_ulong | local_mem_size () const |
Size of local memory arena in bytes. The minimum value is 32 KB. More... | |
cl_device_local_mem_type | local_mem_type () const |
Type of local memory supported. This can be set to CL_LOCAL implying dedicated local memory storage such as SRAM, or CL_GLOBAL. More... | |
cl_uint | max_clock_frequency () const |
Maximum configured clock frequency of the device in MHz. More... | |
cl_uint | max_compute_units () const |
The number of parallel compute cores on the OpenCL device. The minimum value is 1. More... | |
cl_uint | max_constant_args () const |
Max number of arguments declared with the __constant qualifier in a kernel. The minimum value is 8. More... | |
cl_ulong | max_constant_buffer_size () const |
Max size in bytes of a constant buffer allocation. The minimum value is 64 KB. More... | |
cl_ulong | max_mem_alloc_size () const |
Max size of memory object allocation in bytes. The minimum value is max(1/4th of CL_DEVICE_GLOBAL_MEM_SIZE, 128*1024*1024) More... | |
size_t | max_parameter_size () const |
Max size in bytes of the arguments that can be passed to a kernel. The minimum value is 1024. More... | |
cl_uint | max_read_image_args () const |
Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
cl_uint | max_samplers () const |
Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
size_t | max_work_group_size () const |
Maximum number of work-items in a work-group executing a kernel using the data parallel execution model. The minimum value is 1. More... | |
cl_uint | max_work_item_dimensions () const |
Maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model. The minimum value is 3. More... | |
std::vector< size_t > | max_work_item_sizes () const |
Maximum number of work-items that can be specified in each dimension of the work-group. More... | |
cl_uint | max_write_image_args () const |
Max number of simultaneous image objects that can be written to by a kernel. The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. More... | |
cl_uint | mem_base_addr_align () const |
Describes the alignment in bits of the base address of any allocated memory object. More... | |
cl_uint | min_data_type_align_size () const |
The smallest alignment in bytes which can be used for any data type. More... | |
std::string | name () const |
Device name string. More... | |
device_architecture_family | architecture_family () const |
Device architecture family. More... | |
cl_platform_id | platform () const |
The platform associated with this device. More... | |
cl_uint | preferred_vector_width_char () const |
Preferred native vector width size for built-in scalar 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. More... | |
cl_uint | preferred_vector_width_short () const |
Preferred native vector width size for built-in scalar 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. More... | |
cl_uint | preferred_vector_width_int () const |
Preferred native vector width size for built-in scalar 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. More... | |
cl_uint | preferred_vector_width_long () const |
Preferred native vector width size for built-in scalar 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. More... | |
cl_uint | preferred_vector_width_float () const |
Preferred native vector width size for built-in scalar 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. More... | |
cl_uint | preferred_vector_width_double () const |
Preferred native vector width size for built-in scalar 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. More... | |
std::string | profile () const |
Preferred native vector width size for built-in scalar 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. More... | |
size_t | profiling_timer_resolution () const |
Describes the resolution of device timer. This is measured in nanoseconds. More... | |
cl_command_queue_properties | queue_properties () const |
Describes the command-queue properties supported by the device. More... | |
cl_device_fp_config | single_fp_config () const |
Describes single precision floating-point capability of the OpenCL device. More... | |
cl_device_type | type () const |
The OpenCL device type. More... | |
std::string | vendor () const |
Vendor name string. More... | |
cl_uint | vendor_id () const |
A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID. More... | |
std::string | version () const |
Vendor name string. More... | |
std::string | driver_version () const |
Vendor name string. More... | |
bool | double_support () const |
ViennaCL convenience function: Returns true if the device supports double precision. More... | |
std::string | double_support_extension () const |
ViennaCL convenience function: Returns the device extension which enables double precision (usually cl_khr_fp64, but AMD used cl_amd_fp64 in the past) More... | |
cl_device_id | id () const |
Returns the OpenCL device id. More... | |
std::string | info (vcl_size_t indent=0, char indent_char= ' ') const |
Returns an info string with a few properties of the device. Use full_info() to get all details. More... | |
std::string | full_info (vcl_size_t indent=0, char indent_char= ' ') const |
Returns an info string with all device properties defined in the OpenCL 1.1 standard, listed in alphabetical order. Use info() for a short overview. More... | |
bool | operator== (device const &other) const |
bool | operator== (cl_device_id other) const |
A class representing a compute device (e.g. a GPU)
|
inlineexplicit |
|
inlineexplicit |
|
inline |
The default compute device address space size specified as an unsigned integer value in bits. Currently supported values are 32 or 64 bits.
|
inline |
Device architecture family.
|
inline |
Is CL_TRUE if the device is available and CL_FALSE if the device is not available.
|
inline |
Is CL_FALSE if the implementation does not have a compiler available to compile the program source. Is CL_TRUE if the compiler is available. This can be CL_FALSE for the embedded platform profile only.
|
inline |
ViennaCL convenience function: Returns true if the device supports double precision.
|
inline |
ViennaCL convenience function: Returns the device extension which enables double precision (usually cl_khr_fp64, but AMD used cl_amd_fp64 in the past)
|
inline |
Vendor name string.
|
inline |
Is CL_TRUE if the OpenCL device is a little endian device and CL_FALSE otherwise.
|
inline |
Is CL_TRUE if the device implements error correction for all accesses to compute device memory (global and constant) and CL_FALSE otherwise.
|
inline |
Describes the execution capabilities of the device.
This is a bit-field that describes one or more of the following values: CL_EXEC_KERNEL - The OpenCL device can execute OpenCL kernels. CL_EXEC_NATIVE_KERNEL - The OpenCL device can execute native kernels. The mandated minimum capability is CL_EXEC_KERNEL.
|
inline |
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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_event cl_khr_d3d10_sharing
|
inline |
Returns an info string with all device properties defined in the OpenCL 1.1 standard, listed in alphabetical order. Use info() for a short overview.
indent | Number of optional blanks to be added at the start of each line |
indent_char | Character to be used for indenting |
|
inline |
Size of global memory cache in bytes.
|
inline |
Type of global memory cache supported. Valid values are: CL_NONE, CL_READ_ONLY_CACHE, and CL_READ_WRITE_CACHE.
|
inline |
Size of global memory cache in bytes.
|
inline |
Size of global memory in bytes.
|
inline |
Returns the OpenCL device id.
|
inline |
Max height of 2D image in pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Max width of 2D image in pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Max depth of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Max height of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Max width of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Is CL_TRUE if the device and the host have a unified memory subsystem and is CL_FALSE otherwise.
Is CL_TRUE if images are supported by the OpenCL device and CL_FALSE otherwise.
|
inline |
Returns an info string with a few properties of the device. Use full_info() to get all details.
Returns the following device properties: name, vendor, type, availability, max compute units, max work group size, global mem size, local mem size, local mem type, host unified memory
indent | Number of optional blanks to be added at the start of each line |
indent_char | Character to be used for indenting |
|
inline |
Size of local memory arena in bytes. The minimum value is 32 KB.
|
inline |
Type of local memory supported. This can be set to CL_LOCAL implying dedicated local memory storage such as SRAM, or CL_GLOBAL.
|
inline |
Maximum configured clock frequency of the device in MHz.
|
inline |
The number of parallel compute cores on the OpenCL device. The minimum value is 1.
|
inline |
Max number of arguments declared with the __constant qualifier in a kernel. The minimum value is 8.
|
inline |
Max size in bytes of a constant buffer allocation. The minimum value is 64 KB.
|
inline |
Max size of memory object allocation in bytes. The minimum value is max(1/4th of CL_DEVICE_GLOBAL_MEM_SIZE, 128*1024*1024)
|
inline |
Max size in bytes of the arguments that can be passed to a kernel. The minimum value is 1024.
For this minimum value, only a maximum of 128 arguments can be passed to a kernel.
|
inline |
Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Maximum number of work-items in a work-group executing a kernel using the data parallel execution model. The minimum value is 1.
|
inline |
Maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model. The minimum value is 3.
|
inline |
Maximum number of work-items that can be specified in each dimension of the work-group.
Returns n size_t entries, where n is the value returned by the query for CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS. The minimum value is (1, 1, 1).
|
inline |
Max number of simultaneous image objects that can be written to by a kernel. The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
|
inline |
Describes the alignment in bits of the base address of any allocated memory object.
|
inline |
The smallest alignment in bytes which can be used for any data type.
|
inline |
Device name string.
|
inline |
|
inline |
|
inline |
The platform associated with this device.
|
inline |
Preferred native vector width size for built-in scalar 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.
|
inline |
Preferred native vector width size for built-in scalar 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, this function returns 0.
|
inline |
Preferred native vector width size for built-in scalar 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.
|
inline |
Preferred native vector width size for built-in scalar 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.
|
inline |
Preferred native vector width size for built-in scalar 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.
|
inline |
Preferred native vector width size for built-in scalar 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.
|
inline |
Preferred native vector width size for built-in scalar 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_fp16 extension is not supported, this function returns 0.OpenCL profile string. Returns the profile name supported by the device.
The profile name returned can be one of the following strings: FULL_PROFILE - if the device supports the OpenCL specification EMBEDDED_PROFILE - if the device supports the OpenCL embedded profile.
|
inline |
Describes the resolution of device timer. This is measured in nanoseconds.
|
inline |
Describes the command-queue properties supported by the device.
This is a bit-field that describes one or more of the following values: CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE CL_QUEUE_PROFILING_ENABLE3 These properties are described in the table for clCreateCommandQueue in the OpenCL standard. The mandated minimum capability is CL_QUEUE_PROFILING_ENABLE.
|
inline |
Describes single precision floating-point capability of the OpenCL device.
This is a bit-field that describes one or more of the following values: CL_FP_DENORM - denorms are supported. CL_FP_INF_NAN - INF and NaNs are supported. CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode supported. CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported. CL_FP_ROUND_TO_INF - round to +ve and -ve infinity rounding modes supported. CP_FP_FMA - IEEE754-2008 fused multiply-add is supported. CL_FP_SOFT_FLOAT - Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software.
The mandated minimum floating-point capability is CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.
|
inline |
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.
|
inline |
Vendor name string.
|
inline |
A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID.
|
inline |
Vendor name string.