- CLHandleType
- CLGetInfoInteger
- CLGetInfoString
- CLContextCreate
- CLContextFree
- CLGetDeviceInfo
- CLProgramCreate
- CLProgramFree
- CLKernelCreate
- CLKernelFree
- CLSetKernelArg
- CLSetKernelArgMem
- CLSetKernelArgMemLocal
- CLBufferCreate
- CLBufferFree
- CLBufferWrite
- CLBufferRead
- CLExecute
- CLExecutionStatus
CLGetDeviceInfo
Recibe la propiedad del dispositivo desde el controlador de dispositivo OpenCL.
bool CLGetDeviceInfo(
|
Parámetros
handle
[in] Número del dispositivo OpenCL o el manejador de OpenCL creado por la función CLContextCreate().
property_id
[in] Identificador de la propiedad que hay que recibir sobre el dispositivo OpenCL. Puede ser uno de los valores predeterminados que se listan en la tabla de abajo.
data[]
[out] Array para recibir los datos sobre la propiedad solicitada.
size
[out] Tamaño de datos recibidos en el array data[].
Valor devuelto
true para la ejecución con éxito, false en caso del error. Para obtener la información sobre el error, hay que llamar a la función GetLastError().
Nota
Para los arrays unidimensionales el número del elemento con el que se empieza la lectura de datos para su escritura en el buffer OpenCL se calcula teniendo en cuenta la bandera AS_SERIES.
Lista de disponibles identificadores de propiedades del dispositivo OpenCL
Puede encontrar la descripción de la propiedad más detallada y su función en la página oficial de OpenCL.
Identificador |
Valor |
---|---|
CL_DEVICE_TYPE |
0x1000 |
CL_DEVICE_VENDOR_ID |
0x1001 |
CL_DEVICE_MAX_COMPUTE_UNITS |
0x1002 |
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS |
0x1003 |
CL_DEVICE_MAX_WORK_GROUP_SIZE |
0x1004 |
CL_DEVICE_MAX_WORK_ITEM_SIZES |
0x1005 |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR |
0x1006 |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT |
0x1007 |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT |
0x1008 |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG |
0x1009 |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT |
0x100A |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE |
0x100B |
CL_DEVICE_MAX_CLOCK_FREQUENCY |
0x100C |
CL_DEVICE_ADDRESS_BITS |
0x100D |
CL_DEVICE_MAX_READ_IMAGE_ARGS |
0x100E |
CL_DEVICE_MAX_WRITE_IMAGE_ARGS |
0x100F |
CL_DEVICE_MAX_MEM_ALLOC_SIZE |
0x1010 |
CL_DEVICE_IMAGE2D_MAX_WIDTH |
0x1011 |
CL_DEVICE_IMAGE2D_MAX_HEIGHT |
0x1012 |
CL_DEVICE_IMAGE3D_MAX_WIDTH |
0x1013 |
CL_DEVICE_IMAGE3D_MAX_HEIGHT |
0x1014 |
CL_DEVICE_IMAGE3D_MAX_DEPTH |
0x1015 |
CL_DEVICE_IMAGE_SUPPORT |
0x1016 |
CL_DEVICE_MAX_PARAMETER_SIZE |
0x1017 |
CL_DEVICE_MAX_SAMPLERS |
0x1018 |
CL_DEVICE_MEM_BASE_ADDR_ALIGN |
0x1019 |
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE |
0x101A |
CL_DEVICE_SINGLE_FP_CONFIG |
0x101B |
CL_DEVICE_GLOBAL_MEM_CACHE_TYPE |
0x101C |
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE |
0x101D |
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE |
0x101E |
CL_DEVICE_GLOBAL_MEM_SIZE |
0x101F |
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE |
0x1020 |
CL_DEVICE_MAX_CONSTANT_ARGS |
0x1021 |
CL_DEVICE_LOCAL_MEM_TYPE |
0x1022 |
CL_DEVICE_LOCAL_MEM_SIZE |
0x1023 |
CL_DEVICE_ERROR_CORRECTION_SUPPORT |
0x1024 |
CL_DEVICE_PROFILING_TIMER_RESOLUTION |
0x1025 |
CL_DEVICE_ENDIAN_LITTLE |
0x1026 |
CL_DEVICE_AVAILABLE |
0x1027 |
CL_DEVICE_COMPILER_AVAILABLE |
0x1028 |
CL_DEVICE_EXECUTION_CAPABILITIES |
0x1029 |
CL_DEVICE_QUEUE_PROPERTIES |
0x102A |
CL_DEVICE_NAME |
0x102B |
CL_DEVICE_VENDOR |
0x102C |
CL_DRIVER_VERSION |
0x102D |
CL_DEVICE_PROFILE |
0x102E |
CL_DEVICE_VERSION |
0x102F |
CL_DEVICE_EXTENSIONS |
0x1030 |
CL_DEVICE_PLATFORM |
0x1031 |
CL_DEVICE_DOUBLE_FP_CONFIG |
0x1032 |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF |
0x1034 |
CL_DEVICE_HOST_UNIFIED_MEMORY |
0x1035 |
CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR |
0x1036 |
CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT |
0x1037 |
CL_DEVICE_NATIVE_VECTOR_WIDTH_INT |
0x1038 |
CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG |
0x1039 |
CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT |
0x103A |
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE |
0x103B |
CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF |
0x103C |
CL_DEVICE_OPENCL_C_VERSION |
0x103D |
CL_DEVICE_LINKER_AVAILABLE |
0x103E |
CL_DEVICE_BUILT_IN_KERNELS |
0x103F |
CL_DEVICE_IMAGE_MAX_BUFFER_SIZE |
0x1040 |
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE |
0x1041 |
CL_DEVICE_PARENT_DEVICE |
0x1042 |
CL_DEVICE_PARTITION_MAX_SUB_DEVICES |
0x1043 |
CL_DEVICE_PARTITION_PROPERTIES |
0x1044 |
CL_DEVICE_PARTITION_AFFINITY_DOMAIN |
0x1045 |
CL_DEVICE_PARTITION_TYPE |
0x1046 |
CL_DEVICE_REFERENCE_COUNT |
0x1047 |
CL_DEVICE_PREFERRED_INTEROP_USER_SYNC |
0x1048 |
CL_DEVICE_PRINTF_BUFFER_SIZE |
0x1049 |
CL_DEVICE_IMAGE_PITCH_ALIGNMENT |
0x104A |
CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT |
0x104B |
Ejemplo:
void OnStart()
|