P4 to Git Change 1455364 by lmoriche@lmoriche_opencl_dev2 on 2017/09/05 15:55:28
SWDEV-126884 - OCL 2.1 Platform APIs - Update the OpenCL headers with Khronos GitHub latest - Switch the runtime/compiler/compilerlib to OpenCL 2.2 headers (still reporting OpenCL 2.0) - Move spir.h to compiler/llvm/lib/Transforms/SPIR - Update the cl.hpp and cl2.hpp C++ wrappers. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_context.cpp#55 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_icd_amd.h#19 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/build/Makefile.headers#5 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl.h#4 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_d3d10.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_d3d11.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_dx9_media_sharing.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h#14 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_gl.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_gl_ext.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_platform.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/opencl.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/spir.h#3 delete ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl.h#23 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl.hpp#5 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl2.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_d3d10.h#4 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_d3d11.h#4 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_dx9_media_sharing.h#5 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_egl.h#5 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#30 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_gl.h#4 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_gl_ext.h#3 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_platform.h#9 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/opencl.h#3 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/spir.h#3 delete ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl.h#4 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl2.hpp#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_d3d10.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_d3d11.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_dx9_media_sharing.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_egl.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h#7 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_gl.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_gl_ext.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_platform.h#3 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/opencl.h#2 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/spir.h#2 delete ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl.hpp#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl2.hpp#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_d3d10.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_d3d11.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_dx9_media_sharing.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_egl.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_ext.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_gl.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_gl_ext.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_platform.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/opencl.h#1 add ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/build/Makefile.icd#32 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/src/build/Makefile.clc#16 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/src/e2lSpir.cpp#18 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/src/e2lSpirMeta.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/AMDSPIRLoader.cpp#101 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/spir.h#1 branch ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Transforms/SPIR/AMDSPIRLoader.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Transforms/SPIR/spir.h#1 branch ... //depot/stg/opencl/drivers/opencl/runtime/runtimedefs#45 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/spir/SPIREnumCheck.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/spir/build/Makefile.spir#18 edit ... //depot/stg/opencl/drivers/opencl/tools/cltrace/build/Makefile.cltrace#2 edit ... //depot/stg/opencl/drivers/opencl/tools/cltrace/cltrace.cpp#15 edit
Šī revīzija ir iekļauta:
1 vecāks
a89198e6ea
revīzija
b3ca3bdd0e
51 file changed
+42091
-3059
No files matched your search
@@ -470,15 +470,15 @@ CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddress(const char* func_na
|
|||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateFromD3D10Texture3DKHR);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateFromD3D10Texture3DKHR);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateFromDX9MediaSurfaceKHR);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateFromDX9MediaSurfaceKHR);
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
#ifdef cl_ext_device_fission
|
#if defined(cl_ext_device_fission) || defined(CL_VERSION_1_2)
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateSubDevicesEXT);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateSubDevicesEXT);
|
||||||
#endif // cl_ext_device_fission
|
#endif // defined(cl_ext_device_fission) || defined(CL_VERSION_1_2)
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateKeyAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateKeyAMD);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clConvertImageAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clConvertImageAMD);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateBufferFromImageAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateBufferFromImageAMD);
|
||||||
#if cl_khr_il_program
|
#if defined(cl_khr_il_program) || defined(CL_VERSION_2_1)
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateProgramWithILKHR);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateProgramWithILKHR)
|
||||||
#endif // cl_khr_il_program
|
#endif // defined(cl_khr_il_program) || defined(CL_VERSION_2_1)
|
||||||
#if cl_amd_liquid_flash
|
#if cl_amd_liquid_flash
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateSsgFileObjectAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clCreateSsgFileObjectAMD);
|
||||||
#endif // cl_amd_liquid_flash
|
#endif // cl_amd_liquid_flash
|
||||||
@@ -521,7 +521,9 @@ CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddress(const char* func_na
|
|||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clGetDeviceIDsFromDX9MediaAdapterKHR);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clGetDeviceIDsFromDX9MediaAdapterKHR);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clGetPlaneFromImageAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clGetPlaneFromImageAMD);
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
#if defined(cl_khr_sub_groups) || defined(CL_VERSION_2_1)
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clGetKernelSubGroupInfoKHR);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clGetKernelSubGroupInfoKHR);
|
||||||
|
#endif // defined(cl_khr_sub_groups) || defined(CL_VERSION_2_1)
|
||||||
#if cl_amd_liquid_flash
|
#if cl_amd_liquid_flash
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clGetSsgFileObjectInfoAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clGetSsgFileObjectInfoAMD);
|
||||||
#endif // cl_amd_liquid_flash
|
#endif // cl_amd_liquid_flash
|
||||||
@@ -566,10 +568,10 @@ CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddress(const char* func_na
|
|||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainPerfCounterAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainPerfCounterAMD);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clReleaseThreadTraceAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clReleaseThreadTraceAMD);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainThreadTraceAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainThreadTraceAMD);
|
||||||
#ifdef cl_ext_device_fission
|
#if defined(cl_ext_device_fission) || defined(CL_VERSION_1_2)
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainDeviceEXT);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainDeviceEXT);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clReleaseDeviceEXT);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clReleaseDeviceEXT);
|
||||||
#endif // cl_ext_device_fission
|
#endif // defined(cl_ext_device_fission) || defined(CL_VERSION_1_2)
|
||||||
#if cl_amd_liquid_flash
|
#if cl_amd_liquid_flash
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainSsgFileObjectAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clRetainSsgFileObjectAMD);
|
||||||
CL_EXTENSION_ENTRYPOINT_CHECK(clReleaseSsgFileObjectAMD);
|
CL_EXTENSION_ENTRYPOINT_CHECK(clReleaseSsgFileObjectAMD);
|
||||||
|
|||||||
@@ -153,6 +153,11 @@ typedef cl_program(CL_API_CALL* clCreateProgramWithSource_fn)(
|
|||||||
cl_context /* context */, cl_uint /* count */, const char** /* strings */,
|
cl_context /* context */, cl_uint /* count */, const char** /* strings */,
|
||||||
const size_t* /* lengths */, cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
const size_t* /* lengths */, cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||||
|
clCreateProgramWithILKHR(cl_context /* context */,
|
||||||
|
const void * /* strings */, size_t /* lengths */,
|
||||||
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
typedef cl_program(CL_API_CALL* clCreateProgramWithILKHR_fn)(
|
typedef cl_program(CL_API_CALL* clCreateProgramWithILKHR_fn)(
|
||||||
cl_context /* context */, const void* /* il */, size_t /* length */,
|
cl_context /* context */, const void* /* il */, size_t /* length */,
|
||||||
cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
|
cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
|
||||||
@@ -550,6 +555,35 @@ typedef cl_int(CL_API_CALL* clGetKernelSubGroupInfoKHR_fn)(
|
|||||||
void* /* param_value */, size_t* /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
|
void* /* param_value */, size_t* /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef cl_int(CL_API_CALL* clSetDefaultDeviceCommandQueue_fn)(
|
||||||
|
cl_context /* context */, cl_device_id /* device */,
|
||||||
|
cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
typedef cl_kernel(CL_API_CALL* clCloneKernel_fn)(
|
||||||
|
cl_kernel /* source_kernel */, cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
typedef cl_int (CL_API_CALL* clEnqueueSVMMigrateMem_fn)(
|
||||||
|
cl_command_queue /* command_queue */, cl_uint /* num_svm_pointers */,
|
||||||
|
const void ** /* svm_pointers */, const size_t * /* sizes */,
|
||||||
|
cl_mem_migration_flags /* flags */, cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */, cl_event * /* event */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
typedef cl_int (CL_API_CALL* clGetDeviceAndHostTimer_fn)(
|
||||||
|
cl_device_id /* device */, cl_ulong * /* device_timestamp */,
|
||||||
|
cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
typedef cl_int (CL_API_CALL* clGetHostTimer_fn)(
|
||||||
|
cl_device_id /* device */, cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
typedef cl_int (CL_API_CALL* clSetProgramSpecializationConstant_fn)(
|
||||||
|
cl_program /* program */, cl_uint /* spec_id */, size_t /* spec_size */,
|
||||||
|
const void* /* spec_value */) CL_API_SUFFIX__VERSION_2_2;
|
||||||
|
|
||||||
|
typedef cl_int (CL_API_CALL* clSetProgramReleaseCallback_fn)(
|
||||||
|
cl_program /* program */,
|
||||||
|
void (CL_CALLBACK * /* pfn_notify */)(cl_program program, void * user_data),
|
||||||
|
void * /* user_data */) CL_API_SUFFIX__VERSION_2_2;
|
||||||
|
|
||||||
typedef struct _cl_icd_dispatch_table {
|
typedef struct _cl_icd_dispatch_table {
|
||||||
/* OpenCL 1.0 */
|
/* OpenCL 1.0 */
|
||||||
clGetPlatformIDs_fn GetPlatformIDs;
|
clGetPlatformIDs_fn GetPlatformIDs;
|
||||||
@@ -680,11 +714,22 @@ typedef struct _cl_icd_dispatch_table {
|
|||||||
clSetKernelArgSVMPointer_fn SetKernelArgSVMPointer;
|
clSetKernelArgSVMPointer_fn SetKernelArgSVMPointer;
|
||||||
clSetKernelExecInfo_fn SetKernelExecInfo;
|
clSetKernelExecInfo_fn SetKernelExecInfo;
|
||||||
|
|
||||||
clGetKernelSubGroupInfoKHR_fn GetKernelSubGroupInfoKHR;
|
/* cl_khr_sub_groups */
|
||||||
clTerminateContextKHR_fn TerminateContextKHR;
|
clGetKernelSubGroupInfoKHR_fn clGetKernelSubGroupInfoKHR;
|
||||||
|
|
||||||
|
/* OpenCL 2.1 */
|
||||||
|
clCloneKernel_fn clCloneKernel;
|
||||||
|
clCreateProgramWithILKHR_fn clCreateProgramWithIL;
|
||||||
|
clEnqueueSVMMigrateMem_fn clEnqueueSVMMigrateMem;
|
||||||
|
clGetDeviceAndHostTimer_fn clGetDeviceAndHostTimer;
|
||||||
|
clGetHostTimer_fn clGetHostTimer;
|
||||||
|
clGetKernelSubGroupInfoKHR_fn clGetKernelSubGroupInfo;
|
||||||
|
clSetDefaultDeviceCommandQueue_fn clSetDefaultDeviceCommandQueue;
|
||||||
|
|
||||||
|
/* OpenCL 2.2 */
|
||||||
|
clSetProgramReleaseCallback_fn clSetProgramReleaseCallback;
|
||||||
|
clSetProgramSpecializationConstant_fn clSetProgramSpecializationConstant;
|
||||||
|
|
||||||
/* cl_khr_il_program */
|
|
||||||
clCreateProgramWithILKHR_fn CreateProgramWithILKHR;
|
|
||||||
} cl_icd_dispatch_table;
|
} cl_icd_dispatch_table;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 - 2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -255,7 +260,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_DEVICE_EXTENSIONS 0x1030
|
#define CL_DEVICE_EXTENSIONS 0x1030
|
||||||
#define CL_DEVICE_PLATFORM 0x1031
|
#define CL_DEVICE_PLATFORM 0x1031
|
||||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||||
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
|
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
||||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
|
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
||||||
@@ -280,7 +285,6 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
|
#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
|
||||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
|
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
|
||||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
|
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
|
||||||
/* 0x104C reserved for CL_DEVICE_SVM_CAPABILITIES */
|
|
||||||
|
|
||||||
/* cl_device_fp_config - bitfield */
|
/* cl_device_fp_config - bitfield */
|
||||||
#define CL_FP_DENORM (1 << 0)
|
#define CL_FP_DENORM (1 << 0)
|
||||||
@@ -346,7 +350,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_MEM_USE_HOST_PTR (1 << 3)
|
#define CL_MEM_USE_HOST_PTR (1 << 3)
|
||||||
#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
|
#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
|
||||||
#define CL_MEM_COPY_HOST_PTR (1 << 5)
|
#define CL_MEM_COPY_HOST_PTR (1 << 5)
|
||||||
// reserved (1 << 6)
|
/* reserved (1 << 6) */
|
||||||
#define CL_MEM_HOST_WRITE_ONLY (1 << 7)
|
#define CL_MEM_HOST_WRITE_ONLY (1 << 7)
|
||||||
#define CL_MEM_HOST_READ_ONLY (1 << 8)
|
#define CL_MEM_HOST_READ_ONLY (1 << 8)
|
||||||
#define CL_MEM_HOST_NO_ACCESS (1 << 9)
|
#define CL_MEM_HOST_NO_ACCESS (1 << 9)
|
||||||
@@ -502,7 +506,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
||||||
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
||||||
|
|
||||||
/* cl_kernel_arg_type_qualifer */
|
/* cl_kernel_arg_type_qualifier */
|
||||||
#define CL_KERNEL_ARG_TYPE_NONE 0
|
#define CL_KERNEL_ARG_TYPE_NONE 0
|
||||||
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
||||||
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
||||||
@@ -549,7 +553,6 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
|
#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
|
||||||
#define CL_COMMAND_FILL_BUFFER 0x1207
|
#define CL_COMMAND_FILL_BUFFER 0x1207
|
||||||
#define CL_COMMAND_FILL_IMAGE 0x1208
|
#define CL_COMMAND_FILL_IMAGE 0x1208
|
||||||
/* 0x1209-0x120F reserved for SVM commands */
|
|
||||||
|
|
||||||
/* command execution status */
|
/* command execution status */
|
||||||
#define CL_COMPLETE 0x0
|
#define CL_COMPLETE 0x0
|
||||||
@@ -1167,7 +1170,7 @@ clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */,
|
|||||||
const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2;
|
const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
|
||||||
// Deprecated OpenCL 1.1 APIs
|
/* Deprecated OpenCL 1.1 APIs */
|
||||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||||
clCreateImage2D(cl_context /* context */,
|
clCreateImage2D(cl_context /* context */,
|
||||||
cl_mem_flags /* flags */,
|
cl_mem_flags /* flags */,
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -43,31 +48,31 @@ typedef cl_uint cl_d3d10_device_set_khr;
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
// Error Codes
|
/* Error Codes */
|
||||||
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
||||||
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
||||||
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
||||||
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
||||||
|
|
||||||
// cl_d3d10_device_source_nv
|
/* cl_d3d10_device_source_nv */
|
||||||
#define CL_D3D10_DEVICE_KHR 0x4010
|
#define CL_D3D10_DEVICE_KHR 0x4010
|
||||||
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
||||||
|
|
||||||
// cl_d3d10_device_set_nv
|
/* cl_d3d10_device_set_nv */
|
||||||
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
||||||
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
||||||
|
|
||||||
// cl_context_info
|
/* cl_context_info */
|
||||||
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
||||||
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
||||||
|
|
||||||
// cl_mem_info
|
/* cl_mem_info */
|
||||||
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
||||||
|
|
||||||
// cl_image_info
|
/* cl_image_info */
|
||||||
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
||||||
|
|
||||||
// cl_command_type
|
/* cl_command_type */
|
||||||
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
||||||
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
||||||
|
|
||||||
@@ -122,5 +127,5 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __OPENCL_CL_D3D10_H
|
#endif /* __OPENCL_CL_D3D10_H */
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -43,31 +48,31 @@ typedef cl_uint cl_d3d11_device_set_khr;
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
// Error Codes
|
/* Error Codes */
|
||||||
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
||||||
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
||||||
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
||||||
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
||||||
|
|
||||||
// cl_d3d11_device_source
|
/* cl_d3d11_device_source */
|
||||||
#define CL_D3D11_DEVICE_KHR 0x4019
|
#define CL_D3D11_DEVICE_KHR 0x4019
|
||||||
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
||||||
|
|
||||||
// cl_d3d11_device_set
|
/* cl_d3d11_device_set */
|
||||||
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
||||||
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
||||||
|
|
||||||
// cl_context_info
|
/* cl_context_info */
|
||||||
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
||||||
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
||||||
|
|
||||||
// cl_mem_info
|
/* cl_mem_info */
|
||||||
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
||||||
|
|
||||||
// cl_image_info
|
/* cl_image_info */
|
||||||
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
||||||
|
|
||||||
// cl_command_type
|
/* cl_command_type */
|
||||||
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
||||||
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
||||||
|
|
||||||
@@ -122,5 +127,5 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __OPENCL_CL_D3D11_H
|
#endif /* __OPENCL_CL_D3D11_H */
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -52,34 +57,34 @@ typedef struct _cl_dx9_surface_info_khr
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
// Error Codes
|
/* Error Codes */
|
||||||
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
||||||
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
||||||
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
||||||
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
||||||
|
|
||||||
// cl_media_adapter_type_khr
|
/* cl_media_adapter_type_khr */
|
||||||
#define CL_ADAPTER_D3D9_KHR 0x2020
|
#define CL_ADAPTER_D3D9_KHR 0x2020
|
||||||
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
||||||
#define CL_ADAPTER_DXVA_KHR 0x2022
|
#define CL_ADAPTER_DXVA_KHR 0x2022
|
||||||
|
|
||||||
// cl_media_adapter_set_khr
|
/* cl_media_adapter_set_khr */
|
||||||
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
||||||
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
||||||
|
|
||||||
// cl_context_info
|
/* cl_context_info */
|
||||||
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
||||||
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
||||||
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
||||||
|
|
||||||
// cl_mem_info
|
/* cl_mem_info */
|
||||||
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
||||||
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
||||||
|
|
||||||
// cl_image_info
|
/* cl_image_info */
|
||||||
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
||||||
|
|
||||||
// cl_command_type
|
/* cl_command_type */
|
||||||
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
||||||
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
||||||
|
|
||||||
@@ -123,5 +128,5 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __OPENCL_CL_DX9_MEDIA_SHARING_H
|
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -21,7 +26,7 @@
|
|||||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* $Revision: 14835 $ on $Date: 2011-05-26 11:32:00 -0700 (Thu, 26 May 2011) $ */
|
/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
|
||||||
|
|
||||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||||
/* (OpenGL, D3D) dependencies. */
|
/* (OpenGL, D3D) dependencies. */
|
||||||
@@ -149,40 +154,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* conte
|
|||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
// <amd_internal>
|
|
||||||
/******************************
|
|
||||||
* cl_khr_subgroups extension *
|
|
||||||
******************************/
|
|
||||||
|
|
||||||
#define cl_khr_subgroups 1
|
|
||||||
|
|
||||||
typedef cl_uint cl_kernel_sub_group_info;
|
|
||||||
|
|
||||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2011
|
|
||||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2012
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clGetKernelSubGroupInfoKHR(cl_kernel /* kernel */,
|
|
||||||
cl_device_id /* device */,
|
|
||||||
cl_kernel_sub_group_info /* param_name */,
|
|
||||||
size_t /* input_value_size */,
|
|
||||||
const void * /* input_value */,
|
|
||||||
size_t /* param_value_size */,
|
|
||||||
void * /* param_value */,
|
|
||||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetKernelSubGroupInfoKHR_fn)(
|
|
||||||
cl_kernel /* kernel */,
|
|
||||||
cl_device_id /* device */,
|
|
||||||
cl_kernel_sub_group_info /* param_name */,
|
|
||||||
size_t /* input_value_size */,
|
|
||||||
const void * /* input_value */,
|
|
||||||
size_t /* param_value_size */,
|
|
||||||
void * /* param_value */,
|
|
||||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;
|
|
||||||
|
|
||||||
// </amd_internal>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extension: cl_khr_spir
|
* Extension: cl_khr_spir
|
||||||
*
|
*
|
||||||
@@ -190,11 +162,10 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetKernelSubGroupInfoKHR_fn)(
|
|||||||
* Standard Portable Intermediate Representation (SPIR) instance
|
* Standard Portable Intermediate Representation (SPIR) instance
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// KHR SPIR extension (Section 9.15.2 in the extension SPEC)
|
|
||||||
// TODO: The values have been approved by khronos and waiting to be updated in official header file.
|
|
||||||
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||||
|
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
* cl_nv_device_attribute_query extension *
|
* cl_nv_device_attribute_query extension *
|
||||||
******************************************/
|
******************************************/
|
||||||
@@ -245,6 +216,138 @@ typedef union
|
|||||||
|
|
||||||
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
||||||
|
|
||||||
|
/**************************
|
||||||
|
* cl_amd_offline_devices *
|
||||||
|
**************************/
|
||||||
|
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
||||||
|
|
||||||
|
/********************************
|
||||||
|
* cl_amd_bus_addressable_memory *
|
||||||
|
********************************/
|
||||||
|
|
||||||
|
/* cl_mem flag - bitfield */
|
||||||
|
#define CL_MEM_BUS_ADDRESSABLE_AMD (1<<30)
|
||||||
|
#define CL_MEM_EXTERNAL_PHYSICAL_AMD (1<<31)
|
||||||
|
|
||||||
|
#define CL_COMMAND_WAIT_SIGNAL_AMD 0x4080
|
||||||
|
#define CL_COMMAND_WRITE_SIGNAL_AMD 0x4081
|
||||||
|
#define CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD 0x4082
|
||||||
|
|
||||||
|
typedef struct _cl_bus_address_amd
|
||||||
|
{
|
||||||
|
cl_ulong surface_bus_address;
|
||||||
|
cl_ulong marker_bus_address;
|
||||||
|
} cl_bus_address_amd;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWaitSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*mem_object*/,
|
||||||
|
cl_uint /*value*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWriteSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*mem_object*/,
|
||||||
|
cl_uint /*value*/,
|
||||||
|
cl_ulong /*offset*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueMakeBuffersResidentAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_uint /*num_mem_objs*/,
|
||||||
|
cl_mem * /*mem_objects*/,
|
||||||
|
cl_bool /*blocking_make_resident*/,
|
||||||
|
cl_bus_address_amd * /*bus_addresses*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* cl_amd_liquid_flash *
|
||||||
|
***********************/
|
||||||
|
#define cl_amd_liquid_flash 1
|
||||||
|
|
||||||
|
#define CL_COMMAND_READ_SSG_FILE_AMD 0x4083
|
||||||
|
#define CL_COMMAND_WRITE_SSG_FILE_AMD 0x4087
|
||||||
|
|
||||||
|
#define CL_INVALID_FILE_OBJECT_AMD 0x4084
|
||||||
|
|
||||||
|
typedef struct _cl_file_amd * cl_file_amd;
|
||||||
|
|
||||||
|
typedef cl_uint cl_file_flags_amd;
|
||||||
|
#define CL_FILE_READ_ONLY_AMD (1 << 0)
|
||||||
|
#define CL_FILE_WRITE_ONLY_AMD (1 << 1)
|
||||||
|
#define CL_FILE_READ_WRITE_AMD (1 << 2)
|
||||||
|
|
||||||
|
typedef cl_uint cl_file_info_amd;
|
||||||
|
#define CL_FILE_BLOCK_SIZE_AMD 0x4085
|
||||||
|
#define CL_FILE_SIZE_AMD 0x4086
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_file_amd
|
||||||
|
(CL_API_CALL * clCreateSsgFileObjectAMD_fn)(cl_context /*context*/,
|
||||||
|
cl_file_flags_amd /*flags*/,
|
||||||
|
const wchar_t * /*file_name*/,
|
||||||
|
cl_int * /*errcode_ret*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clGetSsgFileObjectInfoAMD_fn)(cl_file_amd /* file */,
|
||||||
|
cl_file_info_amd /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
void * /* param_value */,
|
||||||
|
size_t * /* param_value_size_ret */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clRetainSsgFileObjectAMD_fn)( cl_file_amd /*file*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clReleaseSsgFileObjectAMD_fn)( cl_file_amd /*file*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueReadSsgFileAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*buffer*/,
|
||||||
|
cl_bool /*blocking_write*/,
|
||||||
|
size_t /*buffer_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_file_amd /*file*/,
|
||||||
|
size_t /*file_offset*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWriteSsgFileAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*buffer*/,
|
||||||
|
cl_bool /*blocking_read*/,
|
||||||
|
size_t /*buffer_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_file_amd /*file*/,
|
||||||
|
size_t /*file_offset*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
/*************************
|
||||||
|
* cl_amd_copy_buffer_p2p *
|
||||||
|
**************************/
|
||||||
|
#define CL_DEVICE_NUM_P2P_DEVICES_AMD 0x4088
|
||||||
|
#define CL_DEVICE_P2P_DEVICES_AMD 0x4089
|
||||||
|
|
||||||
|
#define cl_amd_copy_buffer_p2p 1
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueCopyBufferP2PAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*src_buffer*/,
|
||||||
|
cl_mem /*dst_buffer*/,
|
||||||
|
size_t /*src_offset*/,
|
||||||
|
size_t /*dst_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event* /*event_wait_list*/,
|
||||||
|
cl_event* /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
// <amd_internal>
|
// <amd_internal>
|
||||||
/***************************
|
/***************************
|
||||||
@@ -264,36 +367,54 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|||||||
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
||||||
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
||||||
|
|
||||||
/***************************************
|
/*************************
|
||||||
* cl-gl depth buffer interop extension *
|
* cl_amd_object_metadata *
|
||||||
****************************************/
|
**************************/
|
||||||
|
#define cl_amd_object_metadata 1
|
||||||
|
|
||||||
#define CL_DEPTH 0x10BD
|
typedef size_t cl_key_amd;
|
||||||
#define CL_DEPTH_STENCIL 0x10BE
|
|
||||||
#define CL_UNORM_INT24 0x10DF
|
#define CL_INVALID_OBJECT_AMD 0x403A
|
||||||
#define CL_GL_NUM_SAMPLES 0x2012
|
#define CL_INVALID_KEY_AMD 0x403B
|
||||||
|
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
||||||
|
cl_platform_id /* platform */,
|
||||||
|
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
// </amd_internal>
|
// </amd_internal>
|
||||||
|
|
||||||
/**************************
|
/*********************************
|
||||||
* cl_amd_offline_devices *
|
* cl_arm_printf extension
|
||||||
**************************/
|
*********************************/
|
||||||
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||||
|
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_1
|
#ifdef CL_VERSION_1_1
|
||||||
/***********************************
|
/***********************************
|
||||||
* cl_ext_device_fission extension *
|
* cl_ext_device_fission extension *
|
||||||
***********************************/
|
***********************************/
|
||||||
#define cl_ext_device_fission 1
|
#define cl_ext_device_fission 1
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
typedef CL_API_ENTRY cl_int
|
||||||
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
typedef CL_API_ENTRY cl_int
|
||||||
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
@@ -317,14 +438,14 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|||||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||||
|
|
||||||
/* clDeviceGetInfo selectors */
|
/* clDeviceGetInfo selectors */
|
||||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||||
|
|
||||||
/* clGetImageInfo enum */
|
/* clGetImageInfo enum */
|
||||||
#define CL_IMAGE_BYTE_PITCH_AMD 0x4059
|
#define CL_IMAGE_BYTE_PITCH_AMD 0x4059
|
||||||
|
|
||||||
@@ -332,7 +453,7 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|||||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||||
|
|
||||||
/* CL_AFFINITY_DOMAINs */
|
/* CL_AFFINITY_DOMAINs */
|
||||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||||
@@ -340,6 +461,7 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|||||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||||
|
|
||||||
/* cl_device_partition_property_ext list terminators */
|
/* cl_device_partition_property_ext list terminators */
|
||||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
@@ -374,11 +496,11 @@ clGetDeviceImageInfoQCOM(cl_device_id device,
|
|||||||
|
|
||||||
typedef struct _cl_mem_ext_host_ptr
|
typedef struct _cl_mem_ext_host_ptr
|
||||||
{
|
{
|
||||||
// Type of external memory allocation.
|
/* Type of external memory allocation. */
|
||||||
// Legal values will be defined in layered extensions.
|
/* Legal values will be defined in layered extensions. */
|
||||||
cl_uint allocation_type;
|
cl_uint allocation_type;
|
||||||
|
|
||||||
// Host cache policy for this external memory allocation.
|
/* Host cache policy for this external memory allocation. */
|
||||||
cl_uint host_cache_policy;
|
cl_uint host_cache_policy;
|
||||||
|
|
||||||
} cl_mem_ext_host_ptr;
|
} cl_mem_ext_host_ptr;
|
||||||
@@ -391,111 +513,223 @@ typedef struct _cl_mem_ext_host_ptr
|
|||||||
|
|
||||||
typedef struct _cl_mem_ion_host_ptr
|
typedef struct _cl_mem_ion_host_ptr
|
||||||
{
|
{
|
||||||
// Type of external memory allocation.
|
/* Type of external memory allocation. */
|
||||||
// Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations.
|
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||||
cl_mem_ext_host_ptr ext_host_ptr;
|
cl_mem_ext_host_ptr ext_host_ptr;
|
||||||
|
|
||||||
// ION file descriptor
|
/* ION file descriptor */
|
||||||
int ion_filedesc;
|
int ion_filedesc;
|
||||||
|
|
||||||
// Host pointer to the ION allocated memory
|
/* Host pointer to the ION allocated memory */
|
||||||
void* ion_hostptr;
|
void* ion_hostptr;
|
||||||
|
|
||||||
} cl_mem_ion_host_ptr;
|
} cl_mem_ion_host_ptr;
|
||||||
|
|
||||||
// <amd_internal>
|
|
||||||
/*************************
|
|
||||||
* cl_amd_object_metadata *
|
|
||||||
**************************/
|
|
||||||
#define cl_amd_object_metadata 1
|
|
||||||
|
|
||||||
typedef size_t cl_key_amd;
|
|
||||||
|
|
||||||
#define CL_INVALID_OBJECT_AMD 0x403A
|
|
||||||
#define CL_INVALID_KEY_AMD 0x403B
|
|
||||||
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
|
||||||
cl_platform_id /* platform */,
|
|
||||||
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
|
||||||
void * /* object */,
|
|
||||||
cl_key_amd /* key */,
|
|
||||||
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
|
||||||
void * /* object */,
|
|
||||||
cl_key_amd /* key */,
|
|
||||||
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
// </amd_internal>
|
|
||||||
#endif /* CL_VERSION_1_1 */
|
#endif /* CL_VERSION_1_1 */
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_2
|
#if defined(CL_VERSION_1_2)
|
||||||
/********************************
|
|
||||||
* cl_amd_bus_addressable_memory *
|
|
||||||
********************************/
|
|
||||||
|
|
||||||
/* cl_mem flag - bitfield */
|
/******************************************
|
||||||
#define CL_MEM_BUS_ADDRESSABLE_AMD (1<<30)
|
* cl_img_yuv_image extension *
|
||||||
#define CL_MEM_EXTERNAL_PHYSICAL_AMD (1<<31)
|
******************************************/
|
||||||
|
|
||||||
#define CL_COMMAND_WAIT_SIGNAL_AMD 0x4080
|
/* Image formats used in clCreateImage */
|
||||||
#define CL_COMMAND_WRITE_SIGNAL_AMD 0x4081
|
#define CL_NV21_IMG 0x40D0
|
||||||
#define CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD 0x4082
|
#define CL_YV12_IMG 0x40D1
|
||||||
|
|
||||||
typedef struct _cl_bus_address_amd
|
/******************************************
|
||||||
{
|
* cl_img_cached_allocations extension *
|
||||||
cl_ulong surface_bus_address;
|
******************************************/
|
||||||
cl_ulong marker_bus_address;
|
|
||||||
} cl_bus_address_amd;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
/* Flag values used by clCreteBuffer */
|
||||||
(CL_API_CALL * clEnqueueWaitSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||||
cl_mem /*mem_object*/,
|
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||||
cl_uint /*value*/,
|
|
||||||
cl_uint /*num_events*/,
|
|
||||||
const cl_event * /*event_wait_list*/,
|
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
/******************************************
|
||||||
(CL_API_CALL * clEnqueueWriteSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
* cl_img_use_gralloc_ptr extension *
|
||||||
cl_mem /*mem_object*/,
|
******************************************/
|
||||||
cl_uint /*value*/,
|
|
||||||
cl_ulong /*offset*/,
|
|
||||||
cl_uint /*num_events*/,
|
|
||||||
const cl_event * /*event_list*/,
|
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
/* Flag values used by clCreteBuffer */
|
||||||
(CL_API_CALL * clEnqueueMakeBuffersResidentAMD_fn)( cl_command_queue /*command_queue*/,
|
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||||
cl_uint /*num_mem_objs*/,
|
|
||||||
cl_mem * /*mem_objects*/,
|
/* To be used by clGetEventInfo: */
|
||||||
cl_bool /*blocking_make_resident*/,
|
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||||
cl_bus_address_amd * /*bus_addresses*/,
|
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||||
cl_uint /*num_events*/,
|
|
||||||
const cl_event * /*event_list*/,
|
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
#endif /* CL_VERSION_1_2 */
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* cl_arm_import_memory extension *
|
||||||
|
**********************************/
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_0
|
||||||
|
|
||||||
|
typedef intptr_t cl_import_properties_arm;
|
||||||
|
|
||||||
|
/* Default and valid proporties name for cl_arm_import_memory */
|
||||||
|
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||||
|
|
||||||
|
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||||
|
|
||||||
|
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||||
|
|
||||||
|
/* Secure DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_SECURE_ARM 0x40B5
|
||||||
|
|
||||||
|
/* This extension adds a new function that allows for direct memory import into
|
||||||
|
* OpenCL via the clImportMemoryARM function.
|
||||||
|
*
|
||||||
|
* Memory imported through this interface will be mapped into the device's page
|
||||||
|
* tables directly, providing zero copy access. It will never fall back to copy
|
||||||
|
* operations and aliased buffers.
|
||||||
|
*
|
||||||
|
* Types of memory supported for import are specified as additional extension
|
||||||
|
* strings.
|
||||||
|
*
|
||||||
|
* This extension produces cl_mem allocations which are compatible with all other
|
||||||
|
* users of cl_mem in the standard API.
|
||||||
|
*
|
||||||
|
* This extension maps pages with the same properties as the normal buffer creation
|
||||||
|
* function clCreateBuffer.
|
||||||
|
*/
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clImportMemoryARM( cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
const cl_import_properties_arm *properties,
|
||||||
|
void *memory,
|
||||||
|
size_t size,
|
||||||
|
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_0 */
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_arm_shared_virtual_memory extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_2
|
#ifdef CL_VERSION_1_2
|
||||||
/*********************************
|
|
||||||
* cl_khr_il_program extension
|
|
||||||
*********************************/
|
|
||||||
#define cl_khr_il_program 1
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
/* Used by clGetDeviceInfo */
|
||||||
clCreateProgramWithILKHR(cl_context /* context */,
|
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||||
const void * /* strings */,
|
|
||||||
size_t /* lengths */,
|
|
||||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_program
|
/* Used by clGetMemObjectInfo */
|
||||||
( CL_API_CALL * clCreateProgramWithILKHR_fn)(cl_context /* context */,
|
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||||
const void * /* strings */,
|
|
||||||
size_t /* lengths */,
|
/* Used by clSetKernelExecInfoARM: */
|
||||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2;
|
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||||
|
|
||||||
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||||
|
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||||
|
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||||
|
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||||
|
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||||
|
|
||||||
|
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||||
|
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||||
|
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||||
|
|
||||||
|
/* Flag values used by clSVMAllocARM: */
|
||||||
|
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||||
|
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||||
|
|
||||||
|
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||||
|
typedef cl_uint cl_kernel_exec_info_arm;
|
||||||
|
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void * CL_API_CALL
|
||||||
|
clSVMAllocARM(cl_context /* context */,
|
||||||
|
cl_svm_mem_flags_arm /* flags */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* alignment */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void CL_API_CALL
|
||||||
|
clSVMFreeARM(cl_context /* context */,
|
||||||
|
void * /* svm_pointer */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMFreeARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void * /* user_data */),
|
||||||
|
void * /* user_data */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemcpyARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_copy */,
|
||||||
|
void * /* dst_ptr */,
|
||||||
|
const void * /* src_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemFillARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
const void * /* pattern */,
|
||||||
|
size_t /* pattern_size */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMapARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_map */,
|
||||||
|
cl_map_flags /* flags */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMUnmapARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelArgSVMPointerARM(cl_kernel /* kernel */,
|
||||||
|
cl_uint /* arg_index */,
|
||||||
|
const void * /* arg_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelExecInfoARM(cl_kernel /* kernel */,
|
||||||
|
cl_kernel_exec_info_arm /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
const void * /* param_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
#endif /* CL_VERSION_1_2 */
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008 - 2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -104,7 +109,7 @@ clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
|
|||||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
// Deprecated OpenCL 1.1 APIs
|
/* Deprecated OpenCL 1.1 APIs */
|
||||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||||
clCreateFromGLTexture2D(cl_context /* context */,
|
clCreateFromGLTexture2D(cl_context /* context */,
|
||||||
cl_mem_flags /* flags */,
|
cl_mem_flags /* flags */,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -21,7 +26,7 @@
|
|||||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
|
|
||||||
/* $Revision: 14826 $ on $Date: 2011-05-26 07:40:43 -0700 (Thu, 26 May 2011) $ */
|
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||||
|
|
||||||
/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
|
/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
|
||||||
/* OpenGL dependencies. */
|
/* OpenGL dependencies. */
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2012 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012 The Khronos Group Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* NOTICE TO KHRONOS MEMBER:
|
|
||||||
*
|
|
||||||
* AMD has assigned the copyright for this object code to Khronos.
|
|
||||||
* This object code is subject to Khronos ownership rights under U.S. and
|
|
||||||
* international Copyright laws.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any Khronos Member
|
|
||||||
* obtaining a copy of this software and/or associated documentation files
|
|
||||||
* (the "Materials"), to use, copy, modify and merge the Materials in object
|
|
||||||
* form only and to publish, distribute and/or sell copies of the Materials
|
|
||||||
* solely in object code form as part of conformant OpenCL API implementations,
|
|
||||||
* subject to the following conditions:
|
|
||||||
*
|
|
||||||
* Khronos Members shall ensure that their respective ICD implementation,
|
|
||||||
* that is installed over another Khronos Members' ICD implementation, will
|
|
||||||
* continue to support all OpenCL devices (hardware and software) supported
|
|
||||||
* by the replaced ICD implementation. For the purposes of this notice, "ICD"
|
|
||||||
* shall mean a library that presents an implementation of the OpenCL API for
|
|
||||||
* the purpose routing API calls to different vendor implementation.
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Materials.
|
|
||||||
*
|
|
||||||
* KHRONOS AND AMD MAKE NO REPRESENTATION ABOUT THE SUITABILITY OF THIS
|
|
||||||
* SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
|
|
||||||
* IMPLIED WARRANTY OF ANY KIND. KHRONOS AND AMD DISCLAIM ALL WARRANTIES
|
|
||||||
* WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
* IN NO EVENT SHALL KHRONOS OR AMD BE LIABLE FOR ANY SPECIAL, INDIRECT,
|
|
||||||
* INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
|
||||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
|
||||||
* THE USE OR PERFORMANCE OF THIS SOURCE CODE.
|
|
||||||
*
|
|
||||||
* U.S. Government End Users. This source code is a "commercial item" as
|
|
||||||
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
|
|
||||||
* "commercial computer software" and "commercial computer software
|
|
||||||
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
|
|
||||||
* and is provided to the U.S. Government only as a commercial end item.
|
|
||||||
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
|
|
||||||
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
|
|
||||||
* source code with only those rights set forth herein.
|
|
||||||
*/
|
|
||||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
|
||||||
#ifndef __SPIR_H
|
|
||||||
#define __SPIR_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
// CLS is for CL SPIR.
|
|
||||||
typedef enum {
|
|
||||||
CLS_PRIVATE_AS = 0,
|
|
||||||
CLS_GLOBAL_AS = 1,
|
|
||||||
CLS_CONSTANT_AS = 2,
|
|
||||||
CLS_LOCAL_AS = 3,
|
|
||||||
CLS_GLOBAL_HOST_AS = 4,
|
|
||||||
CLS_CONSTANT_HOST_AS = 5,
|
|
||||||
CLS_REGION_AS_AMD = 16,
|
|
||||||
} CLS_ADDRESS_SPACES;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_ADDRESS_MIRRORED_REPEAT = 0,
|
|
||||||
CLS_ADDRESS_REPEAT = 1,
|
|
||||||
CLS_ADDRESS_CLAMP_TO_EDGE = 2,
|
|
||||||
CLS_ADDRESS_CLAMP = 3,
|
|
||||||
CLS_ADDRESS_NONE = 4
|
|
||||||
} CLS_ADDRESSING_MODES;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_FILTER_NEAREST = 0,
|
|
||||||
CLS_FILTER_LINEAR = 1
|
|
||||||
} CLS_FILTER_MODE;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_NORMALIZED_COORDS_TRUE = 0,
|
|
||||||
CLS_NORMALIZED_COORDS_FALSE = 1
|
|
||||||
} CLS_NORMALIZED_COORDS;
|
|
||||||
|
|
||||||
// Section 2.3
|
|
||||||
typedef enum {
|
|
||||||
CLS_READ_ONLY = 0,
|
|
||||||
CLS_WRITE_ONLY = 1,
|
|
||||||
CLS_READ_WRITE = 2,
|
|
||||||
CLS_NONE = 3
|
|
||||||
} CLS_ACCESS_QUALIFIERS;
|
|
||||||
|
|
||||||
// Table 14
|
|
||||||
typedef enum {
|
|
||||||
CLS_ARG_CONST = 1,
|
|
||||||
CLS_ARG_RESTRICT = 2,
|
|
||||||
CLS_ARG_VOLATILE = 4,
|
|
||||||
CLS_ARG_NONE = 0,
|
|
||||||
CLS_ARG_MASK = 0xf,
|
|
||||||
CLS_ARG_PIPE = 8
|
|
||||||
} CLS_ARGTYPE_QUALIFIERS;
|
|
||||||
|
|
||||||
static const char* SPIR_TRIPLE_32BIT = "spir-unknown-unknown";
|
|
||||||
static const char* SPIR_TRIPLE_64BIT = "spir64-unknown-unknown";
|
|
||||||
static const char* SPIR_DATA_LAYOUT_32BIT = "p:32:32:32-i1:8:8-i8:8:8"
|
|
||||||
"-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16"
|
|
||||||
"-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
|
|
||||||
"-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024";
|
|
||||||
static const char* SPIR_DATA_LAYOUT_64BIT = "p:64:64:64-i1:8:8-i8:8:8"
|
|
||||||
"-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16"
|
|
||||||
"-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
|
|
||||||
"-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024";
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif // __SPIR_H
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 - 2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -271,7 +276,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_DEVICE_EXTENSIONS 0x1030
|
#define CL_DEVICE_EXTENSIONS 0x1030
|
||||||
#define CL_DEVICE_PLATFORM 0x1031
|
#define CL_DEVICE_PLATFORM 0x1031
|
||||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||||
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
|
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
||||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
|
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
||||||
@@ -559,7 +564,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
||||||
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
||||||
|
|
||||||
/* cl_kernel_arg_type_qualifer */
|
/* cl_kernel_arg_type_qualifier */
|
||||||
#define CL_KERNEL_ARG_TYPE_NONE 0
|
#define CL_KERNEL_ARG_TYPE_NONE 0
|
||||||
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
||||||
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
||||||
|
|||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -33,8 +38,8 @@
|
|||||||
* Bruce Merry, February 2013.
|
* Bruce Merry, February 2013.
|
||||||
* Tom Deakin and Simon McIntosh-Smith, July 2013
|
* Tom Deakin and Simon McIntosh-Smith, July 2013
|
||||||
*
|
*
|
||||||
* \version 1.2.8
|
* \version 1.2.9
|
||||||
* \date October 2015
|
* \date December 2015
|
||||||
*
|
*
|
||||||
* Optional extension support
|
* Optional extension support
|
||||||
*
|
*
|
||||||
@@ -221,9 +226,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__) || defined(__MACOSX)
|
#if defined(__ANDROID__) || defined(linux) || defined(__APPLE__) || defined(__MACOSX)
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
#endif // __linux__
|
#endif // linux
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@@ -481,7 +486,7 @@ typedef std::string STRING_CLASS;
|
|||||||
* re-define the string class to match the std::string
|
* re-define the string class to match the std::string
|
||||||
* interface by defining STRING_CLASS
|
* interface by defining STRING_CLASS
|
||||||
*/
|
*/
|
||||||
class CL_EXT_PREFIX__VERSION_1_1_DEPRECATED string CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
class CL_EXT_PREFIX__VERSION_1_1_DEPRECATED string
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
::size_t size_;
|
::size_t size_;
|
||||||
@@ -647,7 +652,7 @@ public:
|
|||||||
* or "" if empty/unset.
|
* or "" if empty/unset.
|
||||||
*/
|
*/
|
||||||
const char * c_str(void) const { return (str_) ? str_ : "";}
|
const char * c_str(void) const { return (str_) ? str_ : "";}
|
||||||
};
|
} CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||||
typedef cl::string STRING_CLASS;
|
typedef cl::string STRING_CLASS;
|
||||||
#endif // #elif !defined(__USE_DEV_STRING)
|
#endif // #elif !defined(__USE_DEV_STRING)
|
||||||
|
|
||||||
@@ -725,7 +730,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void push_back (const T& x)
|
void push_back (const T& x)
|
||||||
{
|
{
|
||||||
if (size() < N) {
|
if (size() < N) {
|
||||||
new (&data_[size_]) T(x);
|
new (&data_[size_]) T(x);
|
||||||
size_++;
|
size_++;
|
||||||
} else {
|
} else {
|
||||||
@@ -746,7 +751,7 @@ public:
|
|||||||
detail::errHandler(CL_MEM_OBJECT_ALLOCATION_FAILURE, __VECTOR_CAPACITY_ERR);
|
detail::errHandler(CL_MEM_OBJECT_ALLOCATION_FAILURE, __VECTOR_CAPACITY_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Constructs with a value copied from another.
|
/*! \brief Constructs with a value copied from another.
|
||||||
*
|
*
|
||||||
* \param vec the vector to copy.
|
* \param vec the vector to copy.
|
||||||
@@ -754,7 +759,7 @@ public:
|
|||||||
vector(const vector<T, N>& vec) :
|
vector(const vector<T, N>& vec) :
|
||||||
size_(vec.size_)
|
size_(vec.size_)
|
||||||
{
|
{
|
||||||
if (size_ != 0) {
|
if (size_ != 0) {
|
||||||
assign(vec.begin(), vec.end());
|
assign(vec.begin(), vec.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -791,7 +796,7 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1062,13 +1067,13 @@ namespace detail {
|
|||||||
return comparand;
|
return comparand;
|
||||||
#elif _MSC_VER
|
#elif _MSC_VER
|
||||||
return (int)(_InterlockedCompareExchange(
|
return (int)(_InterlockedCompareExchange(
|
||||||
(volatile long*)dest,
|
(volatile long*)dest,
|
||||||
(long)exchange,
|
(long)exchange,
|
||||||
(long)comparand));
|
(long)comparand));
|
||||||
#else // !_MSC_VER && !CL_HPP_CPP11_ATOMICS_SUPPORTED
|
#else // !_MSC_VER && !CL_HPP_CPP11_ATOMICS_SUPPORTED
|
||||||
return (__sync_val_compare_and_swap(
|
return (__sync_val_compare_and_swap(
|
||||||
dest,
|
dest,
|
||||||
comparand,
|
comparand,
|
||||||
exchange));
|
exchange));
|
||||||
#endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED
|
#endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED
|
||||||
}
|
}
|
||||||
@@ -1213,7 +1218,7 @@ inline cl_int getInfoHelper(Func f, cl_uint name, STRING_CLASS* param, long)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* value = (char*) alloca(required);
|
char* value = (char*)alloca(required);
|
||||||
err = f(name, required, value, NULL);
|
err = f(name, required, value, NULL);
|
||||||
if (err != CL_SUCCESS) {
|
if (err != CL_SUCCESS) {
|
||||||
return err;
|
return err;
|
||||||
@@ -1226,7 +1231,7 @@ inline cl_int getInfoHelper(Func f, cl_uint name, STRING_CLASS* param, long)
|
|||||||
cl_int err = f(name, 0, NULL, &required);
|
cl_int err = f(name, 0, NULL, &required);
|
||||||
if (err != CL_SUCCESS) {
|
if (err != CL_SUCCESS) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
// std::string has a constant data member
|
// std::string has a constant data member
|
||||||
// a char vector does not
|
// a char vector does not
|
||||||
@@ -1814,9 +1819,9 @@ public:
|
|||||||
Wrapper<cl_type>& operator = (const Wrapper<cl_type>& rhs)
|
Wrapper<cl_type>& operator = (const Wrapper<cl_type>& rhs)
|
||||||
{
|
{
|
||||||
if (this != &rhs) {
|
if (this != &rhs) {
|
||||||
if (object_ != NULL) { detail::errHandler(release(), __RELEASE_ERR); }
|
if (object_ != NULL) { detail::errHandler(release(), __RELEASE_ERR); }
|
||||||
object_ = rhs.object_;
|
object_ = rhs.object_;
|
||||||
if (object_ != NULL) { detail::errHandler(retain(), __RETAIN_ERR); }
|
if (object_ != NULL) { detail::errHandler(retain(), __RETAIN_ERR); }
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -1916,10 +1921,10 @@ public:
|
|||||||
Wrapper<cl_type>& operator = (const Wrapper<cl_type>& rhs)
|
Wrapper<cl_type>& operator = (const Wrapper<cl_type>& rhs)
|
||||||
{
|
{
|
||||||
if (this != &rhs) {
|
if (this != &rhs) {
|
||||||
if (object_ != NULL) { detail::errHandler(release(), __RELEASE_ERR); }
|
if (object_ != NULL) { detail::errHandler(release(), __RELEASE_ERR); }
|
||||||
object_ = rhs.object_;
|
object_ = rhs.object_;
|
||||||
referenceCountable_ = rhs.referenceCountable_;
|
referenceCountable_ = rhs.referenceCountable_;
|
||||||
if (object_ != NULL) { detail::errHandler(retain(), __RETAIN_ERR); }
|
if (object_ != NULL) { detail::errHandler(retain(), __RETAIN_ERR); }
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -2040,9 +2045,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Device& operator = (const cl_device_id& rhs)
|
Device& operator = (const cl_device_id& rhs)
|
||||||
{
|
{
|
||||||
detail::Wrapper<cl_type>::operator=(rhs);
|
detail::Wrapper<cl_type>::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -2399,12 +2404,12 @@ public:
|
|||||||
|
|
||||||
if (err != CL_SUCCESS) {
|
if (err != CL_SUCCESS) {
|
||||||
detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
|
detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
|
||||||
if (errResult != NULL) {
|
if (errResult != NULL) {
|
||||||
*errResult = err;
|
*errResult = err;
|
||||||
}
|
}
|
||||||
return Platform();
|
return Platform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return Platform(ids[0]);
|
return Platform(ids[0]);
|
||||||
}
|
}
|
||||||
@@ -2542,7 +2547,7 @@ public:
|
|||||||
cl_int error;
|
cl_int error;
|
||||||
|
|
||||||
#if !defined(__APPLE__) && !defined(__MACOS)
|
#if !defined(__APPLE__) && !defined(__MACOS)
|
||||||
cl_context_properties prop[4] = {CL_CONTEXT_PLATFORM, 0, 0, 0 };
|
cl_context_properties prop[4] = {CL_CONTEXT_PLATFORM, 0, 0, 0 };
|
||||||
|
|
||||||
if (properties == NULL) {
|
if (properties == NULL) {
|
||||||
// Get a valid platform ID as we cannot send in a blank one
|
// Get a valid platform ID as we cannot send in a blank one
|
||||||
@@ -2553,8 +2558,8 @@ public:
|
|||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
*err = error;
|
*err = error;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the platforms we found for a device of our specified type
|
// Check the platforms we found for a device of our specified type
|
||||||
cl_context_properties platform_id = 0;
|
cl_context_properties platform_id = 0;
|
||||||
@@ -2751,31 +2756,31 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
cl_int err = ::clGetSupportedImageFormats(
|
cl_int err = ::clGetSupportedImageFormats(
|
||||||
object_,
|
object_,
|
||||||
flags,
|
flags,
|
||||||
type,
|
type,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
&numEntries);
|
&numEntries);
|
||||||
if (err != CL_SUCCESS) {
|
if (err != CL_SUCCESS) {
|
||||||
return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
|
return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numEntries > 0) {
|
if (numEntries > 0) {
|
||||||
ImageFormat* value = (ImageFormat*)
|
ImageFormat* value = (ImageFormat*)
|
||||||
alloca(numEntries * sizeof(ImageFormat));
|
alloca(numEntries * sizeof(ImageFormat));
|
||||||
err = ::clGetSupportedImageFormats(
|
err = ::clGetSupportedImageFormats(
|
||||||
object_,
|
object_,
|
||||||
flags,
|
flags,
|
||||||
type,
|
type,
|
||||||
numEntries,
|
numEntries,
|
||||||
(cl_image_format*) value,
|
(cl_image_format*)value,
|
||||||
NULL);
|
NULL);
|
||||||
if (err != CL_SUCCESS) {
|
if (err != CL_SUCCESS) {
|
||||||
return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
|
return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
formats->assign(&value[0], &value[numEntries]);
|
formats->assign(&value[0], &value[numEntries]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
formats->clear();
|
formats->clear();
|
||||||
@@ -3027,15 +3032,15 @@ public:
|
|||||||
__CL_EXPLICIT_CONSTRUCTORS Memory(const cl_mem& memory) : detail::Wrapper<cl_type>(memory) { }
|
__CL_EXPLICIT_CONSTRUCTORS Memory(const cl_mem& memory) : detail::Wrapper<cl_type>(memory) { }
|
||||||
|
|
||||||
/*! \brief Assignment operator from cl_mem - takes ownership.
|
/*! \brief Assignment operator from cl_mem - takes ownership.
|
||||||
*
|
*
|
||||||
* This effectively transfers ownership of a refcount on the rhs and calls
|
* This effectively transfers ownership of a refcount on the rhs and calls
|
||||||
* clReleaseMemObject() on the value previously held by this instance.
|
* clReleaseMemObject() on the value previously held by this instance.
|
||||||
*/
|
*/
|
||||||
Memory& operator = (const cl_mem& rhs)
|
Memory& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
detail::Wrapper<cl_type>::operator=(rhs);
|
detail::Wrapper<cl_type>::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3274,9 +3279,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Buffer& operator = (const cl_mem& rhs)
|
Buffer& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Memory::operator=(rhs);
|
Memory::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3291,7 +3296,7 @@ public:
|
|||||||
Memory::operator=(buf);
|
Memory::operator=(buf);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED)
|
#if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED)
|
||||||
/*! \brief Move constructor to forward move to the superclass correctly.
|
/*! \brief Move constructor to forward move to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3409,9 +3414,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
BufferD3D10& operator = (const cl_mem& rhs)
|
BufferD3D10& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Buffer::operator=(rhs);
|
Buffer::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3430,7 +3435,7 @@ public:
|
|||||||
#if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED)
|
#if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED)
|
||||||
/*! \brief Move constructor to forward move to the superclass correctly.
|
/*! \brief Move constructor to forward move to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
*/
|
*/
|
||||||
BufferD3D10(BufferD3D10&& buf) CL_HPP_NOEXCEPT : Buffer(std::move(buf)) {}
|
BufferD3D10(BufferD3D10&& buf) CL_HPP_NOEXCEPT : Buffer(std::move(buf)) {}
|
||||||
|
|
||||||
/*! \brief Move assignment to forward move to the superclass correctly.
|
/*! \brief Move assignment to forward move to the superclass correctly.
|
||||||
@@ -3506,9 +3511,9 @@ public:
|
|||||||
|
|
||||||
/*! \brief Copy assignment to forward copy to the superclass correctly.
|
/*! \brief Copy assignment to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
*/
|
*/
|
||||||
BufferGL& operator = (const BufferGL &buf)
|
BufferGL& operator = (const BufferGL &buf)
|
||||||
{
|
{
|
||||||
Buffer::operator=(buf);
|
Buffer::operator=(buf);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -3516,12 +3521,12 @@ public:
|
|||||||
#if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED)
|
#if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED)
|
||||||
/*! \brief Move constructor to forward move to the superclass correctly.
|
/*! \brief Move constructor to forward move to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
*/
|
*/
|
||||||
BufferGL(BufferGL&& buf) CL_HPP_NOEXCEPT : Buffer(std::move(buf)) {}
|
BufferGL(BufferGL&& buf) CL_HPP_NOEXCEPT : Buffer(std::move(buf)) {}
|
||||||
|
|
||||||
/*! \brief Move assignment to forward move to the superclass correctly.
|
/*! \brief Move assignment to forward move to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
*/
|
*/
|
||||||
BufferGL& operator = (BufferGL &&buf)
|
BufferGL& operator = (BufferGL &&buf)
|
||||||
{
|
{
|
||||||
Buffer::operator=(std::move(buf));
|
Buffer::operator=(std::move(buf));
|
||||||
@@ -3564,9 +3569,9 @@ protected:
|
|||||||
*/
|
*/
|
||||||
Image& operator = (const cl_mem& rhs)
|
Image& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Memory::operator=(rhs);
|
Memory::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3681,9 +3686,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Image1D& operator = (const cl_mem& rhs)
|
Image1D& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3758,9 +3763,9 @@ public:
|
|||||||
|
|
||||||
Image1DBuffer& operator = (const cl_mem& rhs)
|
Image1DBuffer& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3839,9 +3844,9 @@ public:
|
|||||||
|
|
||||||
Image1DArray& operator = (const cl_mem& rhs)
|
Image1DArray& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -3969,9 +3974,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Image2D& operator = (const cl_mem& rhs)
|
Image2D& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4062,9 +4067,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Image2DGL& operator = (const cl_mem& rhs)
|
Image2DGL& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image2D::operator=(rhs);
|
Image2D::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4149,9 +4154,9 @@ public:
|
|||||||
|
|
||||||
Image2DArray& operator = (const cl_mem& rhs)
|
Image2DArray& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4283,9 +4288,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Image3D& operator = (const cl_mem& rhs)
|
Image3D& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4373,9 +4378,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Image3DGL& operator = (const cl_mem& rhs)
|
Image3DGL& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image3D::operator=(rhs);
|
Image3D::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4448,9 +4453,9 @@ public:
|
|||||||
|
|
||||||
ImageGL& operator = (const cl_mem& rhs)
|
ImageGL& operator = (const cl_mem& rhs)
|
||||||
{
|
{
|
||||||
Image::operator=(rhs);
|
Image::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4663,15 +4668,15 @@ public:
|
|||||||
__CL_EXPLICIT_CONSTRUCTORS Sampler(const cl_sampler& sampler) : detail::Wrapper<cl_type>(sampler) { }
|
__CL_EXPLICIT_CONSTRUCTORS Sampler(const cl_sampler& sampler) : detail::Wrapper<cl_type>(sampler) { }
|
||||||
|
|
||||||
/*! \brief Assignment operator from cl_sampler - takes ownership.
|
/*! \brief Assignment operator from cl_sampler - takes ownership.
|
||||||
*
|
*
|
||||||
* This effectively transfers ownership of a refcount on the rhs and calls
|
* This effectively transfers ownership of a refcount on the rhs and calls
|
||||||
* clReleaseSampler() on the value previously held by this instance.
|
* clReleaseSampler() on the value previously held by this instance.
|
||||||
*/
|
*/
|
||||||
Sampler& operator = (const cl_sampler& rhs)
|
Sampler& operator = (const cl_sampler& rhs)
|
||||||
{
|
{
|
||||||
detail::Wrapper<cl_type>::operator=(rhs);
|
detail::Wrapper<cl_type>::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -4857,15 +4862,15 @@ public:
|
|||||||
__CL_EXPLICIT_CONSTRUCTORS Kernel(const cl_kernel& kernel) : detail::Wrapper<cl_type>(kernel) { }
|
__CL_EXPLICIT_CONSTRUCTORS Kernel(const cl_kernel& kernel) : detail::Wrapper<cl_type>(kernel) { }
|
||||||
|
|
||||||
/*! \brief Assignment operator from cl_kernel - takes ownership.
|
/*! \brief Assignment operator from cl_kernel - takes ownership.
|
||||||
*
|
*
|
||||||
* This effectively transfers ownership of a refcount on the rhs and calls
|
* This effectively transfers ownership of a refcount on the rhs and calls
|
||||||
* clReleaseKernel() on the value previously held by this instance.
|
* clReleaseKernel() on the value previously held by this instance.
|
||||||
*/
|
*/
|
||||||
Kernel& operator = (const cl_kernel& rhs)
|
Kernel& operator = (const cl_kernel& rhs)
|
||||||
{
|
{
|
||||||
detail::Wrapper<cl_type>::operator=(rhs);
|
detail::Wrapper<cl_type>::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -5198,9 +5203,9 @@ public:
|
|||||||
|
|
||||||
Program& operator = (const cl_program& rhs)
|
Program& operator = (const cl_program& rhs)
|
||||||
{
|
{
|
||||||
detail::Wrapper<cl_type>::operator=(rhs);
|
detail::Wrapper<cl_type>::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
/*! \brief Copy constructor to forward copy to the superclass correctly.
|
||||||
* Required for MSVC.
|
* Required for MSVC.
|
||||||
@@ -5273,7 +5278,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CL_VERSION_1_2)
|
#if defined(CL_VERSION_1_2)
|
||||||
cl_int compile(
|
cl_int compile(
|
||||||
const char* options = NULL,
|
const char* options = NULL,
|
||||||
void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL,
|
void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL,
|
||||||
void* data = NULL) const
|
void* data = NULL) const
|
||||||
@@ -5284,9 +5289,9 @@ public:
|
|||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
options,
|
options,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
notifyFptr,
|
notifyFptr,
|
||||||
data),
|
data),
|
||||||
__COMPILE_PROGRAM_ERR);
|
__COMPILE_PROGRAM_ERR);
|
||||||
@@ -5805,7 +5810,7 @@ public:
|
|||||||
::size_t buffer_slice_pitch,
|
::size_t buffer_slice_pitch,
|
||||||
::size_t host_row_pitch,
|
::size_t host_row_pitch,
|
||||||
::size_t host_slice_pitch,
|
::size_t host_slice_pitch,
|
||||||
void *ptr,
|
const void *ptr,
|
||||||
const VECTOR_CLASS<Event>* events = NULL,
|
const VECTOR_CLASS<Event>* events = NULL,
|
||||||
Event* event = NULL) const
|
Event* event = NULL) const
|
||||||
{
|
{
|
||||||
@@ -5942,7 +5947,7 @@ public:
|
|||||||
const size_t<3>& region,
|
const size_t<3>& region,
|
||||||
::size_t row_pitch,
|
::size_t row_pitch,
|
||||||
::size_t slice_pitch,
|
::size_t slice_pitch,
|
||||||
void* ptr,
|
const void* ptr,
|
||||||
const VECTOR_CLASS<Event>* events = NULL,
|
const VECTOR_CLASS<Event>* events = NULL,
|
||||||
Event* event = NULL) const
|
Event* event = NULL) const
|
||||||
{
|
{
|
||||||
@@ -6237,7 +6242,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
cl_int enqueueMarkerWithWaitList(
|
cl_int enqueueMarkerWithWaitList(
|
||||||
const VECTOR_CLASS<Event> *events = 0,
|
const VECTOR_CLASS<Event> *events = 0,
|
||||||
Event *event = 0)
|
Event *event = 0) const
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
cl_int err = detail::errHandler(
|
cl_int err = detail::errHandler(
|
||||||
@@ -6267,7 +6272,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
cl_int enqueueBarrierWithWaitList(
|
cl_int enqueueBarrierWithWaitList(
|
||||||
const VECTOR_CLASS<Event> *events = 0,
|
const VECTOR_CLASS<Event> *events = 0,
|
||||||
Event *event = 0)
|
Event *event = 0) const
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
cl_int err = detail::errHandler(
|
cl_int err = detail::errHandler(
|
||||||
@@ -6293,7 +6298,7 @@ public:
|
|||||||
cl_mem_migration_flags flags,
|
cl_mem_migration_flags flags,
|
||||||
const VECTOR_CLASS<Event>* events = NULL,
|
const VECTOR_CLASS<Event>* events = NULL,
|
||||||
Event* event = NULL
|
Event* event = NULL
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
|
|
||||||
@@ -6962,7 +6967,7 @@ inline cl_int enqueueWriteBufferRect(
|
|||||||
::size_t buffer_slice_pitch,
|
::size_t buffer_slice_pitch,
|
||||||
::size_t host_row_pitch,
|
::size_t host_row_pitch,
|
||||||
::size_t host_slice_pitch,
|
::size_t host_slice_pitch,
|
||||||
void *ptr,
|
const void *ptr,
|
||||||
const VECTOR_CLASS<Event>* events = NULL,
|
const VECTOR_CLASS<Event>* events = NULL,
|
||||||
Event* event = NULL)
|
Event* event = NULL)
|
||||||
{
|
{
|
||||||
@@ -7060,7 +7065,7 @@ inline cl_int enqueueWriteImage(
|
|||||||
const size_t<3>& region,
|
const size_t<3>& region,
|
||||||
::size_t row_pitch,
|
::size_t row_pitch,
|
||||||
::size_t slice_pitch,
|
::size_t slice_pitch,
|
||||||
void* ptr,
|
const void* ptr,
|
||||||
const VECTOR_CLASS<Event>* events = NULL,
|
const VECTOR_CLASS<Event>* events = NULL,
|
||||||
Event* event = NULL)
|
Event* event = NULL)
|
||||||
{
|
{
|
||||||
@@ -7399,6 +7404,7 @@ template <
|
|||||||
typename T20, typename T21, typename T22, typename T23,
|
typename T20, typename T21, typename T22, typename T23,
|
||||||
typename T24, typename T25, typename T26, typename T27,
|
typename T24, typename T25, typename T26, typename T27,
|
||||||
typename T28, typename T29, typename T30, typename T31
|
typename T28, typename T29, typename T30, typename T31
|
||||||
|
|
||||||
>
|
>
|
||||||
class KernelFunctorGlobal
|
class KernelFunctorGlobal
|
||||||
{
|
{
|
||||||
@@ -7452,6 +7458,7 @@ public:
|
|||||||
T29 t29 = NullType(),
|
T29 t29 = NullType(),
|
||||||
T30 t30 = NullType(),
|
T30 t30 = NullType(),
|
||||||
T31 t31 = NullType()
|
T31 t31 = NullType()
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Event event;
|
Event event;
|
||||||
@@ -7487,6 +7494,7 @@ public:
|
|||||||
SetArg<29, T29>::set(kernel_, t29);
|
SetArg<29, T29>::set(kernel_, t29);
|
||||||
SetArg<30, T30>::set(kernel_, t30);
|
SetArg<30, T30>::set(kernel_, t30);
|
||||||
SetArg<31, T31>::set(kernel_, t31);
|
SetArg<31, T31>::set(kernel_, t31);
|
||||||
|
|
||||||
|
|
||||||
args.queue_.enqueueNDRangeKernel(
|
args.queue_.enqueueNDRangeKernel(
|
||||||
kernel_,
|
kernel_,
|
||||||
@@ -12777,6 +12785,7 @@ template <
|
|||||||
typename T27 = detail::NullType, typename T28 = detail::NullType,
|
typename T27 = detail::NullType, typename T28 = detail::NullType,
|
||||||
typename T29 = detail::NullType, typename T30 = detail::NullType,
|
typename T29 = detail::NullType, typename T30 = detail::NullType,
|
||||||
typename T31 = detail::NullType
|
typename T31 = detail::NullType
|
||||||
|
|
||||||
>
|
>
|
||||||
struct make_kernel :
|
struct make_kernel :
|
||||||
public detail::functionImplementation_<
|
public detail::functionImplementation_<
|
||||||
@@ -12788,11 +12797,12 @@ struct make_kernel :
|
|||||||
T20, T21, T22, T23,
|
T20, T21, T22, T23,
|
||||||
T24, T25, T26, T27,
|
T24, T25, T26, T27,
|
||||||
T28, T29, T30, T31
|
T28, T29, T30, T31
|
||||||
|
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef detail::KernelFunctorGlobal<
|
typedef detail::KernelFunctorGlobal<
|
||||||
T0, T1, T2, T3,
|
T0, T1, T2, T3,
|
||||||
T4, T5, T6, T7,
|
T4, T5, T6, T7,
|
||||||
T8, T9, T10, T11,
|
T8, T9, T10, T11,
|
||||||
T12, T13, T14, T15,
|
T12, T13, T14, T15,
|
||||||
@@ -12800,6 +12810,7 @@ public:
|
|||||||
T20, T21, T22, T23,
|
T20, T21, T22, T23,
|
||||||
T24, T25, T26, T27,
|
T24, T25, T26, T27,
|
||||||
T28, T29, T30, T31
|
T28, T29, T30, T31
|
||||||
|
|
||||||
> FunctorType;
|
> FunctorType;
|
||||||
|
|
||||||
make_kernel(
|
make_kernel(
|
||||||
@@ -12815,6 +12826,7 @@ public:
|
|||||||
T20, T21, T22, T23,
|
T20, T21, T22, T23,
|
||||||
T24, T25, T26, T27,
|
T24, T25, T26, T27,
|
||||||
T28, T29, T30, T31
|
T28, T29, T30, T31
|
||||||
|
|
||||||
>(
|
>(
|
||||||
FunctorType(program, name, err))
|
FunctorType(program, name, err))
|
||||||
{}
|
{}
|
||||||
@@ -12830,6 +12842,7 @@ public:
|
|||||||
T20, T21, T22, T23,
|
T20, T21, T22, T23,
|
||||||
T24, T25, T26, T27,
|
T24, T25, T26, T27,
|
||||||
T28, T29, T30, T31
|
T28, T29, T30, T31
|
||||||
|
|
||||||
>(
|
>(
|
||||||
FunctorType(kernel))
|
FunctorType(kernel))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
* Copyright (c) 2008-2016 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -23,20 +28,21 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
*
|
*
|
||||||
* \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33),
|
* \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33),
|
||||||
* OpenCL 1.2 (rev 15) and OpenCL 2.0 (rev 29)
|
* OpenCL 1.2 (rev 15) and OpenCL 2.0 (rev 29)
|
||||||
* \author Lee Howes and Bruce Merry
|
* \author Lee Howes and Bruce Merry
|
||||||
*
|
*
|
||||||
* Derived from the OpenCL 1.x C++ bindings written by
|
* Derived from the OpenCL 1.x C++ bindings written by
|
||||||
* Benedict R. Gaster, Laurent Morichetti and Lee Howes
|
* Benedict R. Gaster, Laurent Morichetti and Lee Howes
|
||||||
* With additions and fixes from:
|
* With additions and fixes from:
|
||||||
* Brian Cole, March 3rd 2010 and April 2012
|
* Brian Cole, March 3rd 2010 and April 2012
|
||||||
* Matt Gruenke, April 2012.
|
* Matt Gruenke, April 2012.
|
||||||
* Bruce Merry, February 2013.
|
* Bruce Merry, February 2013.
|
||||||
* Tom Deakin and Simon McIntosh-Smith, July 2013
|
* Tom Deakin and Simon McIntosh-Smith, July 2013
|
||||||
*
|
* James Price, 2015-
|
||||||
* \version 2.0.7
|
*
|
||||||
* \date 2015-10-05
|
* \version 2.0.10
|
||||||
|
* \date 2016-07-20
|
||||||
*
|
*
|
||||||
* Optional extension support
|
* Optional extension support
|
||||||
*
|
*
|
||||||
@@ -46,6 +52,20 @@
|
|||||||
* #define CL_HPP_USE_DX_INTEROP
|
* #define CL_HPP_USE_DX_INTEROP
|
||||||
* cl_khr_sub_groups
|
* cl_khr_sub_groups
|
||||||
* #define CL_HPP_USE_CL_SUB_GROUPS_KHR
|
* #define CL_HPP_USE_CL_SUB_GROUPS_KHR
|
||||||
|
* cl_khr_image2d_from_buffer
|
||||||
|
* #define CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR
|
||||||
|
*
|
||||||
|
* Doxygen documentation for this header is available here:
|
||||||
|
*
|
||||||
|
* http://khronosgroup.github.io/OpenCL-CLHPP/
|
||||||
|
*
|
||||||
|
* The latest version of this header can be found on the GitHub releases page:
|
||||||
|
*
|
||||||
|
* https://github.com/KhronosGroup/OpenCL-CLHPP/releases
|
||||||
|
*
|
||||||
|
* Bugs and patches can be submitted to the GitHub repository:
|
||||||
|
*
|
||||||
|
* https://github.com/KhronosGroup/OpenCL-CLHPP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \mainpage
|
/*! \mainpage
|
||||||
@@ -56,7 +76,7 @@
|
|||||||
* The interface is contained with a single C++ header file \em cl2.hpp and all
|
* The interface is contained with a single C++ header file \em cl2.hpp and all
|
||||||
* definitions are contained within the namespace \em cl. There is no additional
|
* definitions are contained within the namespace \em cl. There is no additional
|
||||||
* requirement to include \em cl.h and to use either the C++ or original C
|
* requirement to include \em cl.h and to use either the C++ or original C
|
||||||
* bindings; it is enough to simply include \em cl.hpp.
|
* bindings; it is enough to simply include \em cl2.hpp.
|
||||||
*
|
*
|
||||||
* The bindings themselves are lightweight and correspond closely to the
|
* The bindings themselves are lightweight and correspond closely to the
|
||||||
* underlying C API. Using the C++ bindings introduces no additional execution
|
* underlying C API. Using the C++ bindings introduces no additional execution
|
||||||
@@ -128,41 +148,64 @@
|
|||||||
*
|
*
|
||||||
* \section parameterization Parameters
|
* \section parameterization Parameters
|
||||||
* This header may be parameterized by a set of preprocessor macros.
|
* This header may be parameterized by a set of preprocessor macros.
|
||||||
* CL_HPP_TARGET_OPENCL_VERSION
|
*
|
||||||
* - Defines the target OpenCL runtime version to build the header against.
|
* - CL_HPP_TARGET_OPENCL_VERSION
|
||||||
* Defaults to 200, representing OpenCL 2.0.
|
*
|
||||||
* CL_HPP_NO_STD_STRING
|
* Defines the target OpenCL runtime version to build the header
|
||||||
* - Do not use the standard library string class.
|
* against. Defaults to 200, representing OpenCL 2.0.
|
||||||
* cl::string is not defined and may be defined by the user before
|
*
|
||||||
* cl2.hpp is included.
|
* - CL_HPP_NO_STD_STRING
|
||||||
* CL_HPP_NO_STD_VECTOR
|
*
|
||||||
* - Do not use the standard library vector class.
|
* Do not use the standard library string class. cl::string is not
|
||||||
* cl::vector is not defined and may be defined by the user before
|
* defined and may be defined by the user before cl2.hpp is
|
||||||
* cl2.hpp is included.
|
* included.
|
||||||
* CL_HPP_NO_STD_ARRAY
|
*
|
||||||
* - Do not use the standard library array class.
|
* - CL_HPP_NO_STD_VECTOR
|
||||||
* cl::array is not defined and may be defined by the user before
|
*
|
||||||
* cl2.hpp is included.
|
* Do not use the standard library vector class. cl::vector is not
|
||||||
* CL_HPP_NO_STD_UNIQUE_PTR
|
* defined and may be defined by the user before cl2.hpp is
|
||||||
* - Do not use the standard library unique_ptr class.
|
* included.
|
||||||
* cl::pointer and the cl::allocate_pointer function are not defined
|
*
|
||||||
* and may be defined by the user before cl2.hpp is included.
|
* - CL_HPP_NO_STD_ARRAY
|
||||||
* CL_HPP_ENABLE_DEVICE_FISSION
|
*
|
||||||
* - Enables device fission for OpenCL 1.2 platforms
|
* Do not use the standard library array class. cl::array is not
|
||||||
* CL_HPP_ENABLE_EXCEPTIONS
|
* defined and may be defined by the user before cl2.hpp is
|
||||||
* - Enable exceptions for use in the C++ bindings header.
|
* included.
|
||||||
* This is the preferred error handling mechanism but is not required.
|
*
|
||||||
* CL_HPP_ENABLE_SIZE_T_COMPATIBILITY
|
* - CL_HPP_NO_STD_UNIQUE_PTR
|
||||||
* - Backward compatibility option to support cl.hpp-style size_t class.
|
*
|
||||||
* Replaces the updated std::array derived version and removal of size_t
|
* Do not use the standard library unique_ptr class. cl::pointer and
|
||||||
* from the namespace. Note that in this case the new size_t class
|
* the cl::allocate_pointer functions are not defined and may be
|
||||||
* is placed in the cl::compatibility namespace and thus requires
|
* defined by the user before cl2.hpp is included.
|
||||||
* an additional using declaration for direct backward compatibility.
|
*
|
||||||
* CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY
|
* - CL_HPP_ENABLE_DEVICE_FISSION
|
||||||
* - Enable older vector of pairs interface for construction of programs.
|
*
|
||||||
* CL_HPP_CL_1_2_DEFAULT_BUILD
|
* Enables device fission for OpenCL 1.2 platforms.
|
||||||
* - Default to OpenCL C 1.2 compilation rather than OpenCL C 2.0
|
*
|
||||||
* - applies to use of cl::Program construction and other program build variants.
|
* - CL_HPP_ENABLE_EXCEPTIONS
|
||||||
|
*
|
||||||
|
* Enable exceptions for use in the C++ bindings header. This is the
|
||||||
|
* preferred error handling mechanism but is not required.
|
||||||
|
*
|
||||||
|
* - CL_HPP_ENABLE_SIZE_T_COMPATIBILITY
|
||||||
|
*
|
||||||
|
* Backward compatibility option to support cl.hpp-style size_t
|
||||||
|
* class. Replaces the updated std::array derived version and
|
||||||
|
* removal of size_t from the namespace. Note that in this case the
|
||||||
|
* new size_t class is placed in the cl::compatibility namespace and
|
||||||
|
* thus requires an additional using declaration for direct backward
|
||||||
|
* compatibility.
|
||||||
|
*
|
||||||
|
* - CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY
|
||||||
|
*
|
||||||
|
* Enable older vector of pairs interface for construction of
|
||||||
|
* programs.
|
||||||
|
*
|
||||||
|
* - CL_HPP_CL_1_2_DEFAULT_BUILD
|
||||||
|
*
|
||||||
|
* Default to OpenCL C 1.2 compilation rather than OpenCL C 2.0
|
||||||
|
* applies to use of cl::Program construction and other program
|
||||||
|
* build variants.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \section example Example
|
* \section example Example
|
||||||
@@ -171,19 +214,19 @@
|
|||||||
* bindings, including support for the optional exception feature and
|
* bindings, including support for the optional exception feature and
|
||||||
* also the supplied vector and string classes, see following sections for
|
* also the supplied vector and string classes, see following sections for
|
||||||
* decriptions of these features.
|
* decriptions of these features.
|
||||||
*
|
*
|
||||||
* \code
|
* \code
|
||||||
#define CL_HPP_ENABLE_EXCEPTIONS
|
#define CL_HPP_ENABLE_EXCEPTIONS
|
||||||
#define CL_HPP_TARGET_OPENCL_VERSION 200
|
#define CL_HPP_TARGET_OPENCL_VERSION 200
|
||||||
|
|
||||||
#include <CL/cl2.hpp>
|
#include <CL/cl2.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
const int numElements = 32;
|
const int numElements = 32;
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Filter for a 2.0 platform and set it as the default
|
// Filter for a 2.0 platform and set it as the default
|
||||||
@@ -206,35 +249,45 @@
|
|||||||
std::cout << "Error setting default platform.";
|
std::cout << "Error setting default platform.";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string kernel1{
|
// Use C++11 raw string literals for kernel source code
|
||||||
"global int globalA;"
|
std::string kernel1{R"CLC(
|
||||||
"kernel void updateGlobal(){"
|
global int globalA;
|
||||||
" globalA = 75;"
|
kernel void updateGlobal()
|
||||||
"}"};
|
{
|
||||||
std::string kernel2{
|
globalA = 75;
|
||||||
"typedef struct { global int *bar; } Foo; kernel void vectorAdd(global const Foo* aNum, global const int *inputA, global const int *inputB, global int *output, int val, write_only pipe int outPipe, queue_t childQueue){"
|
}
|
||||||
" output[get_global_id(0)] = inputA[get_global_id(0)] + inputB[get_global_id(0)] + val + *(aNum->bar);"
|
)CLC"};
|
||||||
" write_pipe(outPipe, &val);"
|
std::string kernel2{R"CLC(
|
||||||
" queue_t default_queue = get_default_queue(); "
|
typedef struct { global int *bar; } Foo;
|
||||||
" ndrange_t ndrange = ndrange_1D(get_global_size(0)/2, get_global_size(0)/2); "
|
kernel void vectorAdd(global const Foo* aNum, global const int *inputA, global const int *inputB,
|
||||||
// Have a child kernel write into third quarter of output
|
global int *output, int val, write_only pipe int outPipe, queue_t childQueue)
|
||||||
" enqueue_kernel(default_queue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange, "
|
{
|
||||||
" ^{"
|
output[get_global_id(0)] = inputA[get_global_id(0)] + inputB[get_global_id(0)] + val + *(aNum->bar);
|
||||||
" output[get_global_size(0)*2 + get_global_id(0)] = inputA[get_global_size(0)*2+get_global_id(0)] + inputB[get_global_size(0)*2+get_global_id(0)] + globalA;"
|
write_pipe(outPipe, &val);
|
||||||
" });"
|
queue_t default_queue = get_default_queue();
|
||||||
// Have a child kernel write into last quarter of output
|
ndrange_t ndrange = ndrange_1D(get_global_size(0)/2, get_global_size(0)/2);
|
||||||
" enqueue_kernel(childQueue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange, "
|
|
||||||
" ^{"
|
// Have a child kernel write into third quarter of output
|
||||||
" output[get_global_size(0)*3 + get_global_id(0)] = inputA[get_global_size(0)*3 + get_global_id(0)] + inputB[get_global_size(0)*3 + get_global_id(0)] + globalA + 2;"
|
enqueue_kernel(default_queue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange,
|
||||||
" });"
|
^{
|
||||||
"}" };
|
output[get_global_size(0)*2 + get_global_id(0)] =
|
||||||
|
inputA[get_global_size(0)*2 + get_global_id(0)] + inputB[get_global_size(0)*2 + get_global_id(0)] + globalA;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Have a child kernel write into last quarter of output
|
||||||
|
enqueue_kernel(childQueue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange,
|
||||||
|
^{
|
||||||
|
output[get_global_size(0)*3 + get_global_id(0)] =
|
||||||
|
inputA[get_global_size(0)*3 + get_global_id(0)] + inputB[get_global_size(0)*3 + get_global_id(0)] + globalA + 2;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)CLC"};
|
||||||
|
|
||||||
// New simpler string interface style
|
// New simpler string interface style
|
||||||
std::vector<std::string> programStrings {kernel1, kernel2};
|
std::vector<std::string> programStrings {kernel1, kernel2};
|
||||||
|
|
||||||
cl::Program vectorAddProgram(
|
cl::Program vectorAddProgram(programStrings);
|
||||||
programStrings);
|
|
||||||
try {
|
try {
|
||||||
vectorAddProgram.build("-cl-std=CL2.0");
|
vectorAddProgram.build("-cl-std=CL2.0");
|
||||||
}
|
}
|
||||||
@@ -245,7 +298,7 @@
|
|||||||
for (auto &pair : buildInfo) {
|
for (auto &pair : buildInfo) {
|
||||||
std::cerr << pair.second << std::endl << std::endl;
|
std::cerr << pair.second << std::endl << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,17 +311,17 @@
|
|||||||
program2Kernel(
|
program2Kernel(
|
||||||
cl::EnqueueArgs(
|
cl::EnqueueArgs(
|
||||||
cl::NDRange(1)));
|
cl::NDRange(1)));
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
// SVM allocations
|
// SVM allocations
|
||||||
|
|
||||||
cl::pointer<int> anSVMInt = cl::allocate_svm<int, cl::SVMTraitCoarse<>>();
|
auto anSVMInt = cl::allocate_svm<int, cl::SVMTraitCoarse<>>();
|
||||||
*anSVMInt = 5;
|
*anSVMInt = 5;
|
||||||
cl::SVMAllocator<int, cl::SVMTraitCoarse<cl::SVMTraitReadOnly<>>> svmAllocReadOnly;
|
cl::SVMAllocator<Foo, cl::SVMTraitCoarse<cl::SVMTraitReadOnly<>>> svmAllocReadOnly;
|
||||||
auto fooPointer = cl::allocate_pointer<Foo>(svmAllocReadOnly);
|
auto fooPointer = cl::allocate_pointer<Foo>(svmAllocReadOnly);
|
||||||
fooPointer->bar = anSVMInt.get();
|
fooPointer->bar = anSVMInt.get();
|
||||||
cl::SVMAllocator<int, cl::SVMTraitCoarse<>> svmAlloc;
|
cl::SVMAllocator<int, cl::SVMTraitCoarse<>> svmAlloc;
|
||||||
std::vector<int, cl::SVMAllocator<int, cl::SVMTraitCoarse<>>> inputA(numElements, 1, svmAlloc);
|
std::vector<int, cl::SVMAllocator<int, cl::SVMTraitCoarse<>>> inputA(numElements, 1, svmAlloc);
|
||||||
cl::coarse_svm_vector<int> inputB(numElements, 2, svmAlloc);
|
cl::coarse_svm_vector<int> inputB(numElements, 2, svmAlloc);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -278,7 +331,7 @@
|
|||||||
std::vector<int> output(numElements, 0xdeadbeef);
|
std::vector<int> output(numElements, 0xdeadbeef);
|
||||||
cl::Buffer outputBuffer(begin(output), end(output), false);
|
cl::Buffer outputBuffer(begin(output), end(output), false);
|
||||||
cl::Pipe aPipe(sizeof(cl_int), numElements / 2);
|
cl::Pipe aPipe(sizeof(cl_int), numElements / 2);
|
||||||
|
|
||||||
// Default command queue, also passed in as a parameter
|
// Default command queue, also passed in as a parameter
|
||||||
cl::DeviceCommandQueue defaultDeviceQueue = cl::DeviceCommandQueue::makeDefault(
|
cl::DeviceCommandQueue defaultDeviceQueue = cl::DeviceCommandQueue::makeDefault(
|
||||||
cl::Context::getDefault(), cl::Device::getDefault());
|
cl::Context::getDefault(), cl::Device::getDefault());
|
||||||
@@ -333,7 +386,7 @@
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*
|
*
|
||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -889,14 +942,12 @@ inline cl_int getInfoHelper(Func f, cl_uint name, vector<vector<unsigned char>>*
|
|||||||
size_type numBinaries = param->size();
|
size_type numBinaries = param->size();
|
||||||
vector<unsigned char*> binariesPointers(numBinaries);
|
vector<unsigned char*> binariesPointers(numBinaries);
|
||||||
|
|
||||||
size_type totalSize = 0;
|
|
||||||
for (size_type i = 0; i < numBinaries; ++i)
|
for (size_type i = 0; i < numBinaries; ++i)
|
||||||
{
|
{
|
||||||
binariesPointers[i] = (*param)[i].data();
|
binariesPointers[i] = (*param)[i].data();
|
||||||
totalSize += (*param)[i].size();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cl_int err = f(name, totalSize, binariesPointers.data(), NULL);
|
cl_int err = f(name, numBinaries * sizeof(unsigned char*), binariesPointers.data(), NULL);
|
||||||
|
|
||||||
if (err != CL_SUCCESS) {
|
if (err != CL_SUCCESS) {
|
||||||
return err;
|
return err;
|
||||||
@@ -1139,9 +1190,6 @@ inline cl_int getInfoHelper(Func f, cl_uint name, T* param, int, typename T::cl_
|
|||||||
F(cl_image_info, CL_IMAGE_WIDTH, size_type) \
|
F(cl_image_info, CL_IMAGE_WIDTH, size_type) \
|
||||||
F(cl_image_info, CL_IMAGE_HEIGHT, size_type) \
|
F(cl_image_info, CL_IMAGE_HEIGHT, size_type) \
|
||||||
F(cl_image_info, CL_IMAGE_DEPTH, size_type) \
|
F(cl_image_info, CL_IMAGE_DEPTH, size_type) \
|
||||||
F(cl_image_info, CL_IMAGE_ARRAY_SIZE, size_type) \
|
|
||||||
F(cl_image_info, CL_IMAGE_NUM_MIP_LEVELS, cl_uint) \
|
|
||||||
F(cl_image_info, CL_IMAGE_NUM_SAMPLES, cl_uint) \
|
|
||||||
\
|
\
|
||||||
F(cl_sampler_info, CL_SAMPLER_REFERENCE_COUNT, cl_uint) \
|
F(cl_sampler_info, CL_SAMPLER_REFERENCE_COUNT, cl_uint) \
|
||||||
F(cl_sampler_info, CL_SAMPLER_CONTEXT, cl::Context) \
|
F(cl_sampler_info, CL_SAMPLER_CONTEXT, cl::Context) \
|
||||||
@@ -1219,7 +1267,11 @@ inline cl_int getInfoHelper(Func f, cl_uint name, T* param, int, typename T::cl_
|
|||||||
F(cl_device_info, CL_DEVICE_REFERENCE_COUNT, cl_uint) \
|
F(cl_device_info, CL_DEVICE_REFERENCE_COUNT, cl_uint) \
|
||||||
F(cl_device_info, CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, size_type) \
|
F(cl_device_info, CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, size_type) \
|
||||||
F(cl_device_info, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, cl_device_affinity_domain) \
|
F(cl_device_info, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, cl_device_affinity_domain) \
|
||||||
F(cl_device_info, CL_DEVICE_BUILT_IN_KERNELS, string)
|
F(cl_device_info, CL_DEVICE_BUILT_IN_KERNELS, string) \
|
||||||
|
\
|
||||||
|
F(cl_image_info, CL_IMAGE_ARRAY_SIZE, size_type) \
|
||||||
|
F(cl_image_info, CL_IMAGE_NUM_MIP_LEVELS, cl_uint) \
|
||||||
|
F(cl_image_info, CL_IMAGE_NUM_SAMPLES, cl_uint)
|
||||||
|
|
||||||
#define CL_HPP_PARAM_NAME_INFO_2_0_(F) \
|
#define CL_HPP_PARAM_NAME_INFO_2_0_(F) \
|
||||||
F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, cl_command_queue_properties) \
|
F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, cl_command_queue_properties) \
|
||||||
@@ -1531,6 +1583,7 @@ struct ReferenceHandler<cl_event>
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#if CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120
|
||||||
// Extracts version number with major in the upper 16 bits, minor in the lower 16
|
// Extracts version number with major in the upper 16 bits, minor in the lower 16
|
||||||
static cl_uint getVersion(const vector<char> &versionInfo)
|
static cl_uint getVersion(const vector<char> &versionInfo)
|
||||||
{
|
{
|
||||||
@@ -1551,12 +1604,11 @@ static cl_uint getVersion(const vector<char> &versionInfo)
|
|||||||
return (highVersion << 16) | lowVersion;
|
return (highVersion << 16) | lowVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120
|
|
||||||
static cl_uint getPlatformVersion(cl_platform_id platform)
|
static cl_uint getPlatformVersion(cl_platform_id platform)
|
||||||
{
|
{
|
||||||
size_type size = 0;
|
size_type size = 0;
|
||||||
clGetPlatformInfo(platform, CL_PLATFORM_VERSION, 0, NULL, &size);
|
clGetPlatformInfo(platform, CL_PLATFORM_VERSION, 0, NULL, &size);
|
||||||
|
|
||||||
vector<char> versionInfo(size);
|
vector<char> versionInfo(size);
|
||||||
clGetPlatformInfo(platform, CL_PLATFORM_VERSION, size, versionInfo.data(), &size);
|
clGetPlatformInfo(platform, CL_PLATFORM_VERSION, size, versionInfo.data(), &size);
|
||||||
return getVersion(versionInfo);
|
return getVersion(versionInfo);
|
||||||
@@ -3411,7 +3463,7 @@ public:
|
|||||||
context_(),
|
context_(),
|
||||||
SVMTrait::getSVMMemFlags(),
|
SVMTrait::getSVMMemFlags(),
|
||||||
size*sizeof(T),
|
size*sizeof(T),
|
||||||
sizeof(T));
|
0);
|
||||||
pointer retValue = reinterpret_cast<pointer>(
|
pointer retValue = reinterpret_cast<pointer>(
|
||||||
voidPointer);
|
voidPointer);
|
||||||
#if defined(CL_HPP_ENABLE_EXCEPTIONS)
|
#if defined(CL_HPP_ENABLE_EXCEPTIONS)
|
||||||
@@ -3447,7 +3499,7 @@ public:
|
|||||||
{
|
{
|
||||||
size_type maxSize = std::numeric_limits<size_type>::max() / sizeof(T);
|
size_type maxSize = std::numeric_limits<size_type>::max() / sizeof(T);
|
||||||
|
|
||||||
for (Device &d : context_.getInfo<CL_CONTEXT_DEVICES>()) {
|
for (const Device &d : context_.getInfo<CL_CONTEXT_DEVICES>()) {
|
||||||
maxSize = std::min(
|
maxSize = std::min(
|
||||||
maxSize,
|
maxSize,
|
||||||
static_cast<size_type>(d.getInfo<CL_DEVICE_MAX_MEM_ALLOC_SIZE>()));
|
static_cast<size_type>(d.getInfo<CL_DEVICE_MAX_MEM_ALLOC_SIZE>()));
|
||||||
@@ -3534,7 +3586,7 @@ template <class T, class Alloc, class... Args>
|
|||||||
cl::pointer<T, detail::Deleter<Alloc>> allocate_pointer(const Alloc &alloc_, Args&&... args)
|
cl::pointer<T, detail::Deleter<Alloc>> allocate_pointer(const Alloc &alloc_, Args&&... args)
|
||||||
{
|
{
|
||||||
Alloc alloc(alloc_);
|
Alloc alloc(alloc_);
|
||||||
static const size_t copies = 1;
|
static const size_type copies = 1;
|
||||||
|
|
||||||
// Ensure that creation of the management block and the
|
// Ensure that creation of the management block and the
|
||||||
// object are dealt with separately such that we only provide a deleter
|
// object are dealt with separately such that we only provide a deleter
|
||||||
@@ -4542,7 +4594,7 @@ public:
|
|||||||
#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 120
|
#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 120
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CL_HPP_TARGET_OPENCL_VERSION >= 200
|
#if CL_HPP_TARGET_OPENCL_VERSION >= 200 || defined(CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR)
|
||||||
/*! \brief Constructs a 2D Image from a buffer.
|
/*! \brief Constructs a 2D Image from a buffer.
|
||||||
* \note This will share storage with the underlying buffer.
|
* \note This will share storage with the underlying buffer.
|
||||||
*
|
*
|
||||||
@@ -4583,7 +4635,7 @@ public:
|
|||||||
*err = error;
|
*err = error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //#if CL_HPP_TARGET_OPENCL_VERSION >= 200
|
#endif //#if CL_HPP_TARGET_OPENCL_VERSION >= 200 || defined(CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR)
|
||||||
|
|
||||||
#if CL_HPP_TARGET_OPENCL_VERSION >= 200
|
#if CL_HPP_TARGET_OPENCL_VERSION >= 200
|
||||||
/*! \brief Constructs a 2D Image from an image.
|
/*! \brief Constructs a 2D Image from an image.
|
||||||
@@ -6369,7 +6421,7 @@ public:
|
|||||||
return devInfo;
|
return devInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cl::Device d : devs) {
|
for (const cl::Device &d : devs) {
|
||||||
typename detail::param_traits<
|
typename detail::param_traits<
|
||||||
detail::cl_program_build_info, name>::param_type param;
|
detail::cl_program_build_info, name>::param_type param;
|
||||||
result = getBuildInfo(d, name, ¶m);
|
result = getBuildInfo(d, name, ¶m);
|
||||||
@@ -6560,7 +6612,7 @@ enum class QueueProperties : cl_command_queue_properties
|
|||||||
OutOfOrder = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE,
|
OutOfOrder = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
QueueProperties operator|(QueueProperties lhs, QueueProperties rhs)
|
inline QueueProperties operator|(QueueProperties lhs, QueueProperties rhs)
|
||||||
{
|
{
|
||||||
return static_cast<QueueProperties>(static_cast<cl_command_queue_properties>(lhs) | static_cast<cl_command_queue_properties>(rhs));
|
return static_cast<QueueProperties>(static_cast<cl_command_queue_properties>(lhs) | static_cast<cl_command_queue_properties>(rhs));
|
||||||
}
|
}
|
||||||
@@ -7103,7 +7155,7 @@ public:
|
|||||||
size_type buffer_slice_pitch,
|
size_type buffer_slice_pitch,
|
||||||
size_type host_row_pitch,
|
size_type host_row_pitch,
|
||||||
size_type host_slice_pitch,
|
size_type host_slice_pitch,
|
||||||
void *ptr,
|
const void *ptr,
|
||||||
const vector<Event>* events = NULL,
|
const vector<Event>* events = NULL,
|
||||||
Event* event = NULL) const
|
Event* event = NULL) const
|
||||||
{
|
{
|
||||||
@@ -7251,7 +7303,7 @@ public:
|
|||||||
const array<size_type, 3>& region,
|
const array<size_type, 3>& region,
|
||||||
size_type row_pitch,
|
size_type row_pitch,
|
||||||
size_type slice_pitch,
|
size_type slice_pitch,
|
||||||
void* ptr,
|
const void* ptr,
|
||||||
const vector<Event>* events = NULL,
|
const vector<Event>* events = NULL,
|
||||||
Event* event = NULL) const
|
Event* event = NULL) const
|
||||||
{
|
{
|
||||||
@@ -7726,7 +7778,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
cl_int enqueueMarkerWithWaitList(
|
cl_int enqueueMarkerWithWaitList(
|
||||||
const vector<Event> *events = 0,
|
const vector<Event> *events = 0,
|
||||||
Event *event = 0)
|
Event *event = 0) const
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
cl_int err = detail::errHandler(
|
cl_int err = detail::errHandler(
|
||||||
@@ -7756,7 +7808,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
cl_int enqueueBarrierWithWaitList(
|
cl_int enqueueBarrierWithWaitList(
|
||||||
const vector<Event> *events = 0,
|
const vector<Event> *events = 0,
|
||||||
Event *event = 0)
|
Event *event = 0) const
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
cl_int err = detail::errHandler(
|
cl_int err = detail::errHandler(
|
||||||
@@ -7782,7 +7834,7 @@ public:
|
|||||||
cl_mem_migration_flags flags,
|
cl_mem_migration_flags flags,
|
||||||
const vector<Event>* events = NULL,
|
const vector<Event>* events = NULL,
|
||||||
Event* event = NULL
|
Event* event = NULL
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
|
|
||||||
@@ -7841,7 +7893,7 @@ public:
|
|||||||
CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int enqueueTask(
|
CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int enqueueTask(
|
||||||
const Kernel& kernel,
|
const Kernel& kernel,
|
||||||
const vector<Event>* events = NULL,
|
const vector<Event>* events = NULL,
|
||||||
Event* event = NULL) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED const
|
Event* event = NULL) const CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||||
{
|
{
|
||||||
cl_event tmp;
|
cl_event tmp;
|
||||||
cl_int err = detail::errHandler(
|
cl_int err = detail::errHandler(
|
||||||
@@ -8083,7 +8135,7 @@ enum class DeviceQueueProperties : cl_command_queue_properties
|
|||||||
Profiling = CL_QUEUE_PROFILING_ENABLE,
|
Profiling = CL_QUEUE_PROFILING_ENABLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
DeviceQueueProperties operator|(DeviceQueueProperties lhs, DeviceQueueProperties rhs)
|
inline DeviceQueueProperties operator|(DeviceQueueProperties lhs, DeviceQueueProperties rhs)
|
||||||
{
|
{
|
||||||
return static_cast<DeviceQueueProperties>(static_cast<cl_command_queue_properties>(lhs) | static_cast<cl_command_queue_properties>(rhs));
|
return static_cast<DeviceQueueProperties>(static_cast<cl_command_queue_properties>(lhs) | static_cast<cl_command_queue_properties>(rhs));
|
||||||
}
|
}
|
||||||
@@ -8869,7 +8921,7 @@ inline cl_int enqueueWriteBufferRect(
|
|||||||
size_type buffer_slice_pitch,
|
size_type buffer_slice_pitch,
|
||||||
size_type host_row_pitch,
|
size_type host_row_pitch,
|
||||||
size_type host_slice_pitch,
|
size_type host_slice_pitch,
|
||||||
void *ptr,
|
const void *ptr,
|
||||||
const vector<Event>* events = NULL,
|
const vector<Event>* events = NULL,
|
||||||
Event* event = NULL)
|
Event* event = NULL)
|
||||||
{
|
{
|
||||||
@@ -8967,7 +9019,7 @@ inline cl_int enqueueWriteImage(
|
|||||||
const array<size_type, 3>& region,
|
const array<size_type, 3>& region,
|
||||||
size_type row_pitch,
|
size_type row_pitch,
|
||||||
size_type slice_pitch,
|
size_type slice_pitch,
|
||||||
void* ptr,
|
const void* ptr,
|
||||||
const vector<Event>* events = NULL,
|
const vector<Event>* events = NULL,
|
||||||
Event* event = NULL)
|
Event* event = NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -28,8 +33,6 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
#include <CL/cl.h>
|
#include <CL/cl.h>
|
||||||
#include <EGL/egl.h>
|
|
||||||
#include <EGL/eglext.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -21,7 +26,7 @@
|
|||||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* $Revision: 14835 $ on $Date: 2011-05-26 11:32:00 -0700 (Thu, 26 May 2011) $ */
|
/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
|
||||||
|
|
||||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||||
/* (OpenGL, D3D) dependencies. */
|
/* (OpenGL, D3D) dependencies. */
|
||||||
@@ -149,6 +154,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* conte
|
|||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extension: cl_khr_spir
|
* Extension: cl_khr_spir
|
||||||
*
|
*
|
||||||
@@ -159,6 +165,25 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /
|
|||||||
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_2_0
|
||||||
|
/*********************************
|
||||||
|
* cl_khr_il_program extension
|
||||||
|
*********************************/
|
||||||
|
#define cl_khr_il_program 1
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||||
|
clCreateProgramWithILKHR(cl_context /* context */,
|
||||||
|
const void * /* strings */,
|
||||||
|
size_t /* lengths */,
|
||||||
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_program
|
||||||
|
( CL_API_CALL * clCreateProgramWithILKHR_fn)(cl_context /* context */,
|
||||||
|
const void * /* strings */,
|
||||||
|
size_t /* lengths */,
|
||||||
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_2_0 */
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
* cl_nv_device_attribute_query extension *
|
* cl_nv_device_attribute_query extension *
|
||||||
@@ -210,198 +235,11 @@ typedef union
|
|||||||
|
|
||||||
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
||||||
|
|
||||||
// <amd_internal>
|
|
||||||
/***************************
|
|
||||||
* cl_amd_command_intercept *
|
|
||||||
***************************/
|
|
||||||
#define CL_CONTEXT_COMMAND_INTERCEPT_CALLBACK_AMD 0x403D
|
|
||||||
#define CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD (1ull << 63)
|
|
||||||
|
|
||||||
typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|
||||||
|
|
||||||
/**************************
|
|
||||||
* cl_amd_command_queue_info *
|
|
||||||
**************************/
|
|
||||||
#define CL_QUEUE_THREAD_HANDLE_AMD 0x403E
|
|
||||||
|
|
||||||
/* cl_kernel_exec_info for DVR DOPP texture support */
|
|
||||||
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
|
||||||
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
|
||||||
|
|
||||||
/***************************************
|
|
||||||
* cl-gl depth buffer interop extension *
|
|
||||||
****************************************/
|
|
||||||
|
|
||||||
#define CL_UNORM_INT24 0x10DF
|
|
||||||
#define CL_GL_NUM_SAMPLES 0x2012
|
|
||||||
// </amd_internal>
|
|
||||||
|
|
||||||
/**************************
|
/**************************
|
||||||
* cl_amd_offline_devices *
|
* cl_amd_offline_devices *
|
||||||
**************************/
|
**************************/
|
||||||
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
||||||
|
|
||||||
/*********************************
|
|
||||||
* cl_arm_printf extension
|
|
||||||
*********************************/
|
|
||||||
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
|
||||||
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_1
|
|
||||||
/***********************************
|
|
||||||
* cl_ext_device_fission extension *
|
|
||||||
***********************************/
|
|
||||||
#define cl_ext_device_fission 1
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
|
||||||
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
|
||||||
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef cl_ulong cl_device_partition_property_ext;
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clCreateSubDevicesEXT( cl_device_id /*in_device*/,
|
|
||||||
const cl_device_partition_property_ext * /* properties */,
|
|
||||||
cl_uint /*num_entries*/,
|
|
||||||
cl_device_id * /*out_devices*/,
|
|
||||||
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
|
||||||
( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/,
|
|
||||||
const cl_device_partition_property_ext * /* properties */,
|
|
||||||
cl_uint /*num_entries*/,
|
|
||||||
cl_device_id * /*out_devices*/,
|
|
||||||
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
/* cl_device_partition_property_ext */
|
|
||||||
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
|
||||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
|
||||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
|
||||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
|
||||||
|
|
||||||
/* clDeviceGetInfo selectors */
|
|
||||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
|
||||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
|
||||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
|
||||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
|
||||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
|
||||||
|
|
||||||
/* clGetImageInfo enum */
|
|
||||||
#define CL_IMAGE_BYTE_PITCH_AMD 0x4059
|
|
||||||
|
|
||||||
/* error codes */
|
|
||||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
|
||||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
|
||||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
|
||||||
|
|
||||||
/* CL_AFFINITY_DOMAINs */
|
|
||||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
|
||||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
|
||||||
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
|
||||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
|
||||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
|
||||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
|
||||||
/* cl_device_partition_property_ext list terminators */
|
|
||||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
|
||||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
|
||||||
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
|
||||||
|
|
||||||
/*********************************
|
|
||||||
* cl_qcom_ext_host_ptr extension
|
|
||||||
*********************************/
|
|
||||||
|
|
||||||
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
|
||||||
|
|
||||||
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
|
||||||
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
|
||||||
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
|
||||||
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
|
||||||
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
|
||||||
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
|
||||||
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
|
||||||
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
|
||||||
|
|
||||||
typedef cl_uint cl_image_pitch_info_qcom;
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clGetDeviceImageInfoQCOM(cl_device_id device,
|
|
||||||
size_t image_width,
|
|
||||||
size_t image_height,
|
|
||||||
const cl_image_format *image_format,
|
|
||||||
cl_image_pitch_info_qcom param_name,
|
|
||||||
size_t param_value_size,
|
|
||||||
void *param_value,
|
|
||||||
size_t *param_value_size_ret);
|
|
||||||
|
|
||||||
typedef struct _cl_mem_ext_host_ptr
|
|
||||||
{
|
|
||||||
/* Type of external memory allocation. */
|
|
||||||
/* Legal values will be defined in layered extensions. */
|
|
||||||
cl_uint allocation_type;
|
|
||||||
|
|
||||||
/* Host cache policy for this external memory allocation. */
|
|
||||||
cl_uint host_cache_policy;
|
|
||||||
|
|
||||||
} cl_mem_ext_host_ptr;
|
|
||||||
|
|
||||||
/*********************************
|
|
||||||
* cl_qcom_ion_host_ptr extension
|
|
||||||
*********************************/
|
|
||||||
|
|
||||||
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
|
||||||
|
|
||||||
typedef struct _cl_mem_ion_host_ptr
|
|
||||||
{
|
|
||||||
/* Type of external memory allocation. */
|
|
||||||
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
|
||||||
cl_mem_ext_host_ptr ext_host_ptr;
|
|
||||||
|
|
||||||
/* ION file descriptor */
|
|
||||||
int ion_filedesc;
|
|
||||||
|
|
||||||
/* Host pointer to the ION allocated memory */
|
|
||||||
void* ion_hostptr;
|
|
||||||
|
|
||||||
} cl_mem_ion_host_ptr;
|
|
||||||
|
|
||||||
// <amd_internal>
|
|
||||||
/*************************
|
|
||||||
* cl_amd_object_metadata *
|
|
||||||
**************************/
|
|
||||||
#define cl_amd_object_metadata 1
|
|
||||||
|
|
||||||
typedef size_t cl_key_amd;
|
|
||||||
|
|
||||||
#define CL_INVALID_OBJECT_AMD 0x403A
|
|
||||||
#define CL_INVALID_KEY_AMD 0x403B
|
|
||||||
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
|
||||||
cl_platform_id /* platform */,
|
|
||||||
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
|
||||||
void * /* object */,
|
|
||||||
cl_key_amd /* key */,
|
|
||||||
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
|
||||||
void * /* object */,
|
|
||||||
cl_key_amd /* key */,
|
|
||||||
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
// </amd_internal>
|
|
||||||
|
|
||||||
#endif /* CL_VERSION_1_1 */
|
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_2
|
|
||||||
/********************************
|
/********************************
|
||||||
* cl_amd_bus_addressable_memory *
|
* cl_amd_bus_addressable_memory *
|
||||||
********************************/
|
********************************/
|
||||||
@@ -446,9 +284,7 @@ typedef CL_API_ENTRY cl_int
|
|||||||
cl_uint /*num_events*/,
|
cl_uint /*num_events*/,
|
||||||
const cl_event * /*event_list*/,
|
const cl_event * /*event_list*/,
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
#endif /* CL_VERSION_1_2 */
|
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_2
|
|
||||||
/**********************
|
/**********************
|
||||||
* cl_amd_liquid_flash *
|
* cl_amd_liquid_flash *
|
||||||
***********************/
|
***********************/
|
||||||
@@ -532,61 +368,423 @@ typedef CL_API_ENTRY cl_int
|
|||||||
const cl_event* /*event_wait_list*/,
|
const cl_event* /*event_wait_list*/,
|
||||||
cl_event* /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
cl_event* /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
// <amd_internal>
|
||||||
|
/***************************
|
||||||
|
* cl_amd_command_intercept *
|
||||||
|
***************************/
|
||||||
|
#define CL_CONTEXT_COMMAND_INTERCEPT_CALLBACK_AMD 0x403D
|
||||||
|
#define CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD (1ull << 63)
|
||||||
|
|
||||||
|
typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
||||||
|
|
||||||
|
/**************************
|
||||||
|
* cl_amd_command_queue_info *
|
||||||
|
**************************/
|
||||||
|
#define CL_QUEUE_THREAD_HANDLE_AMD 0x403E
|
||||||
|
|
||||||
|
/* cl_kernel_exec_info for DVR DOPP texture support */
|
||||||
|
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
||||||
|
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
||||||
|
|
||||||
|
/*************************
|
||||||
|
* cl_amd_object_metadata *
|
||||||
|
**************************/
|
||||||
|
#define cl_amd_object_metadata 1
|
||||||
|
|
||||||
|
typedef size_t cl_key_amd;
|
||||||
|
|
||||||
|
#define CL_INVALID_OBJECT_AMD 0x403A
|
||||||
|
#define CL_INVALID_KEY_AMD 0x403B
|
||||||
|
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
||||||
|
cl_platform_id /* platform */,
|
||||||
|
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
// </amd_internal>
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_arm_printf extension
|
||||||
|
*********************************/
|
||||||
|
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||||
|
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_1
|
||||||
|
/***********************************
|
||||||
|
* cl_ext_device_fission extension *
|
||||||
|
***********************************/
|
||||||
|
#define cl_ext_device_fission 1
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef cl_ulong cl_device_partition_property_ext;
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clCreateSubDevicesEXT( cl_device_id /*in_device*/,
|
||||||
|
const cl_device_partition_property_ext * /* properties */,
|
||||||
|
cl_uint /*num_entries*/,
|
||||||
|
cl_device_id * /*out_devices*/,
|
||||||
|
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/,
|
||||||
|
const cl_device_partition_property_ext * /* properties */,
|
||||||
|
cl_uint /*num_entries*/,
|
||||||
|
cl_device_id * /*out_devices*/,
|
||||||
|
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
/* cl_device_partition_property_ext */
|
||||||
|
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||||
|
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||||
|
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||||
|
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||||
|
|
||||||
|
/* clDeviceGetInfo selectors */
|
||||||
|
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||||
|
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||||
|
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||||
|
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||||
|
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||||
|
|
||||||
|
/* clGetImageInfo enum */
|
||||||
|
#define CL_IMAGE_BYTE_PITCH_AMD 0x4059
|
||||||
|
|
||||||
|
/* error codes */
|
||||||
|
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||||
|
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||||
|
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||||
|
|
||||||
|
/* CL_AFFINITY_DOMAINs */
|
||||||
|
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||||
|
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||||
|
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||||
|
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||||
|
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||||
|
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||||
|
|
||||||
|
/* cl_device_partition_property_ext list terminators */
|
||||||
|
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
|
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
|
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_qcom_ext_host_ptr extension
|
||||||
|
*********************************/
|
||||||
|
|
||||||
|
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||||
|
|
||||||
|
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||||
|
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
||||||
|
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
||||||
|
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
||||||
|
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
||||||
|
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
||||||
|
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
||||||
|
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
||||||
|
|
||||||
|
typedef cl_uint cl_image_pitch_info_qcom;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetDeviceImageInfoQCOM(cl_device_id device,
|
||||||
|
size_t image_width,
|
||||||
|
size_t image_height,
|
||||||
|
const cl_image_format *image_format,
|
||||||
|
cl_image_pitch_info_qcom param_name,
|
||||||
|
size_t param_value_size,
|
||||||
|
void *param_value,
|
||||||
|
size_t *param_value_size_ret);
|
||||||
|
|
||||||
|
typedef struct _cl_mem_ext_host_ptr
|
||||||
|
{
|
||||||
|
/* Type of external memory allocation. */
|
||||||
|
/* Legal values will be defined in layered extensions. */
|
||||||
|
cl_uint allocation_type;
|
||||||
|
|
||||||
|
/* Host cache policy for this external memory allocation. */
|
||||||
|
cl_uint host_cache_policy;
|
||||||
|
|
||||||
|
} cl_mem_ext_host_ptr;
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_qcom_ion_host_ptr extension
|
||||||
|
*********************************/
|
||||||
|
|
||||||
|
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
||||||
|
|
||||||
|
typedef struct _cl_mem_ion_host_ptr
|
||||||
|
{
|
||||||
|
/* Type of external memory allocation. */
|
||||||
|
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||||
|
cl_mem_ext_host_ptr ext_host_ptr;
|
||||||
|
|
||||||
|
/* ION file descriptor */
|
||||||
|
int ion_filedesc;
|
||||||
|
|
||||||
|
/* Host pointer to the ION allocated memory */
|
||||||
|
void* ion_hostptr;
|
||||||
|
|
||||||
|
} cl_mem_ion_host_ptr;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_1 */
|
||||||
|
|
||||||
|
#if defined(CL_VERSION_1_2)
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_img_yuv_image extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
/* Image formats used in clCreateImage */
|
||||||
|
#define CL_NV21_IMG 0x40D0
|
||||||
|
#define CL_YV12_IMG 0x40D1
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_img_cached_allocations extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
/* Flag values used by clCreteBuffer */
|
||||||
|
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||||
|
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_img_use_gralloc_ptr extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
/* Flag values used by clCreteBuffer */
|
||||||
|
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||||
|
|
||||||
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||||
|
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||||
|
|
||||||
|
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||||
|
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
#endif /* CL_VERSION_1_2 */
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
|
|
||||||
#ifdef CL_VERSION_2_0
|
#ifdef CL_VERSION_2_0
|
||||||
/*********************************
|
/*********************************
|
||||||
* cl_khr_sub_groups extension
|
* cl_khr_subgroups extension
|
||||||
*********************************/
|
*********************************/
|
||||||
#define cl_khr_sub_groups 1
|
#define cl_khr_subgroups 1
|
||||||
|
|
||||||
typedef cl_uint cl_kernel_sub_group_info;
|
typedef cl_uint cl_kernel_sub_group_info;
|
||||||
|
|
||||||
/* cl_khr_sub_group_info */
|
/* cl_kernel_sub_group_info */
|
||||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clGetKernelSubGroupInfoKHR(cl_kernel /* in_kernel */,
|
clGetKernelSubGroupInfoKHR(cl_kernel /* in_kernel */,
|
||||||
cl_device_id /*in_device*/,
|
cl_device_id /*in_device*/,
|
||||||
cl_kernel_sub_group_info /* param_name */,
|
cl_kernel_sub_group_info /* param_name */,
|
||||||
size_t /*input_value_size*/,
|
size_t /*input_value_size*/,
|
||||||
const void * /*input_value*/,
|
const void * /*input_value*/,
|
||||||
size_t /*param_value_size*/,
|
size_t /*param_value_size*/,
|
||||||
void* /*param_value*/,
|
void* /*param_value*/,
|
||||||
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
|
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
typedef CL_API_ENTRY cl_int
|
||||||
( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */,
|
( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */,
|
||||||
cl_device_id /*in_device*/,
|
cl_device_id /*in_device*/,
|
||||||
cl_kernel_sub_group_info /* param_name */,
|
cl_kernel_sub_group_info /* param_name */,
|
||||||
size_t /*input_value_size*/,
|
size_t /*input_value_size*/,
|
||||||
const void * /*input_value*/,
|
const void * /*input_value*/,
|
||||||
size_t /*param_value_size*/,
|
size_t /*param_value_size*/,
|
||||||
void* /*param_value*/,
|
void* /*param_value*/,
|
||||||
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
|
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
|
||||||
#endif /* CL_VERSION_2_0 */
|
#endif /* CL_VERSION_2_0 */
|
||||||
#ifdef CL_VERSION_2_0
|
|
||||||
/*********************************
|
|
||||||
* cl_khr_il_program extension
|
|
||||||
*********************************/
|
|
||||||
#define cl_khr_il_program 1
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
|
||||||
clCreateProgramWithILKHR(cl_context /* context */,
|
|
||||||
const void * /* strings */,
|
|
||||||
size_t /* lengths */,
|
|
||||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_program
|
/******************************************
|
||||||
( CL_API_CALL * clCreateProgramWithILKHR_fn)(cl_context /* context */,
|
* cl_arm_shared_virtual_memory extension *
|
||||||
const void * /* strings */,
|
******************************************/
|
||||||
size_t /* lengths */,
|
|
||||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0;
|
|
||||||
|
|
||||||
#endif /* CL_VERSION_2_0 */
|
#ifdef CL_VERSION_1_2
|
||||||
|
|
||||||
|
/* Used by clGetDeviceInfo */
|
||||||
|
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||||
|
|
||||||
|
/* Used by clGetMemObjectInfo */
|
||||||
|
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||||
|
|
||||||
|
/* Used by clSetKernelExecInfoARM: */
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||||
|
|
||||||
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||||
|
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||||
|
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||||
|
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||||
|
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||||
|
|
||||||
|
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||||
|
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||||
|
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||||
|
|
||||||
|
/* Flag values used by clSVMAllocARM: */
|
||||||
|
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||||
|
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||||
|
|
||||||
|
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||||
|
typedef cl_uint cl_kernel_exec_info_arm;
|
||||||
|
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void * CL_API_CALL
|
||||||
|
clSVMAllocARM(cl_context /* context */,
|
||||||
|
cl_svm_mem_flags_arm /* flags */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* alignment */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void CL_API_CALL
|
||||||
|
clSVMFreeARM(cl_context /* context */,
|
||||||
|
void * /* svm_pointer */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMFreeARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void * /* user_data */),
|
||||||
|
void * /* user_data */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemcpyARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_copy */,
|
||||||
|
void * /* dst_ptr */,
|
||||||
|
const void * /* src_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemFillARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
const void * /* pattern */,
|
||||||
|
size_t /* pattern_size */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMapARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_map */,
|
||||||
|
cl_map_flags /* flags */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMUnmapARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelArgSVMPointerARM(cl_kernel /* kernel */,
|
||||||
|
cl_uint /* arg_index */,
|
||||||
|
const void * /* arg_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelExecInfoARM(cl_kernel /* kernel */,
|
||||||
|
cl_kernel_exec_info_arm /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
const void * /* param_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* cl_arm_import_memory extension *
|
||||||
|
**********************************/
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_0
|
||||||
|
|
||||||
|
typedef intptr_t cl_import_properties_arm;
|
||||||
|
|
||||||
|
/* Default and valid proporties name for cl_arm_import_memory */
|
||||||
|
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||||
|
|
||||||
|
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||||
|
|
||||||
|
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||||
|
|
||||||
|
/* Secure DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_SECURE_ARM 0x40B5
|
||||||
|
|
||||||
|
/* This extension adds a new function that allows for direct memory import into
|
||||||
|
* OpenCL via the clImportMemoryARM function.
|
||||||
|
*
|
||||||
|
* Memory imported through this interface will be mapped into the device's page
|
||||||
|
* tables directly, providing zero copy access. It will never fall back to copy
|
||||||
|
* operations and aliased buffers.
|
||||||
|
*
|
||||||
|
* Types of memory supported for import are specified as additional extension
|
||||||
|
* strings.
|
||||||
|
*
|
||||||
|
* This extension produces cl_mem allocations which are compatible with all other
|
||||||
|
* users of cl_mem in the standard API.
|
||||||
|
*
|
||||||
|
* This extension maps pages with the same properties as the normal buffer creation
|
||||||
|
* function clCreateBuffer.
|
||||||
|
*/
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clImportMemoryARM( cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
const cl_import_properties_arm *properties,
|
||||||
|
void *memory,
|
||||||
|
size_t size,
|
||||||
|
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_0 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008 - 2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -21,7 +26,7 @@
|
|||||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
|
|
||||||
/* $Revision: 14829 $ on $Date: 2011-05-26 08:22:50 -0700 (Thu, 26 May 2011) $ */
|
/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
|
||||||
|
|
||||||
#ifndef __CL_PLATFORM_H
|
#ifndef __CL_PLATFORM_H
|
||||||
#define __CL_PLATFORM_H
|
#define __CL_PLATFORM_H
|
||||||
@@ -35,7 +40,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32)
|
||||||
#define CL_API_ENTRY
|
#define CL_API_ENTRY
|
||||||
#define CL_API_CALL __stdcall
|
#define CL_API_CALL __stdcall
|
||||||
#define CL_CALLBACK __stdcall
|
#define CL_CALLBACK __stdcall
|
||||||
@@ -85,10 +90,6 @@ extern "C" {
|
|||||||
#define CL_EXT_SUFFIX__VERSION_1_2
|
#define CL_EXT_SUFFIX__VERSION_1_2
|
||||||
#define CL_API_SUFFIX__VERSION_2_0
|
#define CL_API_SUFFIX__VERSION_2_0
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_0
|
#define CL_EXT_SUFFIX__VERSION_2_0
|
||||||
#define CL_API_SUFFIX__VERSION_2_1
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_1
|
|
||||||
#define CL_API_SUFFIX__VERSION_2_2
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_2
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||||
@@ -114,7 +115,7 @@ extern "C" {
|
|||||||
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED __attribute__((deprecated))
|
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED __attribute__((deprecated))
|
||||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
#elif _WIN32
|
#elif defined(_WIN32)
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||||
@@ -192,7 +193,18 @@ typedef double cl_double;
|
|||||||
#define CL_FLT_RADIX 2
|
#define CL_FLT_RADIX 2
|
||||||
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
|
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
|
||||||
#define CL_FLT_MIN 1.175494350822287507969e-38f
|
#define CL_FLT_MIN 1.175494350822287507969e-38f
|
||||||
#define CL_FLT_EPSILON 0.00000011920928955078125f
|
#define CL_FLT_EPSILON 1.1920928955078125e-7f
|
||||||
|
|
||||||
|
#define CL_HALF_DIG 3
|
||||||
|
#define CL_HALF_MANT_DIG 11
|
||||||
|
#define CL_HALF_MAX_10_EXP +4
|
||||||
|
#define CL_HALF_MAX_EXP +16
|
||||||
|
#define CL_HALF_MIN_10_EXP -4
|
||||||
|
#define CL_HALF_MIN_EXP -13
|
||||||
|
#define CL_HALF_RADIX 2
|
||||||
|
#define CL_HALF_MAX 65504.0f
|
||||||
|
#define CL_HALF_MIN 6.103515625e-05f
|
||||||
|
#define CL_HALF_EPSILON 9.765625e-04f
|
||||||
|
|
||||||
#define CL_DBL_DIG 15
|
#define CL_DBL_DIG 15
|
||||||
#define CL_DBL_MANT_DIG 53
|
#define CL_DBL_MANT_DIG 53
|
||||||
@@ -201,37 +213,37 @@ typedef double cl_double;
|
|||||||
#define CL_DBL_MIN_10_EXP -307
|
#define CL_DBL_MIN_10_EXP -307
|
||||||
#define CL_DBL_MIN_EXP -1021
|
#define CL_DBL_MIN_EXP -1021
|
||||||
#define CL_DBL_RADIX 2
|
#define CL_DBL_RADIX 2
|
||||||
#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
|
#define CL_DBL_MAX 1.7976931348623158e+308
|
||||||
#define CL_DBL_MIN 2.225073858507201383090e-308
|
#define CL_DBL_MIN 2.225073858507201383090e-308
|
||||||
#define CL_DBL_EPSILON 2.220446049250313080847e-16
|
#define CL_DBL_EPSILON 2.220446049250313080847e-16
|
||||||
|
|
||||||
#define CL_M_E 2.718281828459045090796
|
#define CL_M_E 2.7182818284590452354
|
||||||
#define CL_M_LOG2E 1.442695040888963387005
|
#define CL_M_LOG2E 1.4426950408889634074
|
||||||
#define CL_M_LOG10E 0.434294481903251816668
|
#define CL_M_LOG10E 0.43429448190325182765
|
||||||
#define CL_M_LN2 0.693147180559945286227
|
#define CL_M_LN2 0.69314718055994530942
|
||||||
#define CL_M_LN10 2.302585092994045901094
|
#define CL_M_LN10 2.30258509299404568402
|
||||||
#define CL_M_PI 3.141592653589793115998
|
#define CL_M_PI 3.14159265358979323846
|
||||||
#define CL_M_PI_2 1.570796326794896557999
|
#define CL_M_PI_2 1.57079632679489661923
|
||||||
#define CL_M_PI_4 0.785398163397448278999
|
#define CL_M_PI_4 0.78539816339744830962
|
||||||
#define CL_M_1_PI 0.318309886183790691216
|
#define CL_M_1_PI 0.31830988618379067154
|
||||||
#define CL_M_2_PI 0.636619772367581382433
|
#define CL_M_2_PI 0.63661977236758134308
|
||||||
#define CL_M_2_SQRTPI 1.128379167095512558561
|
#define CL_M_2_SQRTPI 1.12837916709551257390
|
||||||
#define CL_M_SQRT2 1.414213562373095145475
|
#define CL_M_SQRT2 1.41421356237309504880
|
||||||
#define CL_M_SQRT1_2 0.707106781186547572737
|
#define CL_M_SQRT1_2 0.70710678118654752440
|
||||||
|
|
||||||
#define CL_M_E_F 2.71828174591064f
|
#define CL_M_E_F 2.718281828f
|
||||||
#define CL_M_LOG2E_F 1.44269502162933f
|
#define CL_M_LOG2E_F 1.442695041f
|
||||||
#define CL_M_LOG10E_F 0.43429449200630f
|
#define CL_M_LOG10E_F 0.434294482f
|
||||||
#define CL_M_LN2_F 0.69314718246460f
|
#define CL_M_LN2_F 0.693147181f
|
||||||
#define CL_M_LN10_F 2.30258512496948f
|
#define CL_M_LN10_F 2.302585093f
|
||||||
#define CL_M_PI_F 3.14159274101257f
|
#define CL_M_PI_F 3.141592654f
|
||||||
#define CL_M_PI_2_F 1.57079637050629f
|
#define CL_M_PI_2_F 1.570796327f
|
||||||
#define CL_M_PI_4_F 0.78539818525314f
|
#define CL_M_PI_4_F 0.785398163f
|
||||||
#define CL_M_1_PI_F 0.31830987334251f
|
#define CL_M_1_PI_F 0.318309886f
|
||||||
#define CL_M_2_PI_F 0.63661974668503f
|
#define CL_M_2_PI_F 0.636619772f
|
||||||
#define CL_M_2_SQRTPI_F 1.12837922573090f
|
#define CL_M_2_SQRTPI_F 1.128379167f
|
||||||
#define CL_M_SQRT2_F 1.41421353816986f
|
#define CL_M_SQRT2_F 1.414213562f
|
||||||
#define CL_M_SQRT1_2_F 0.70710676908493f
|
#define CL_M_SQRT1_2_F 0.707106781f
|
||||||
|
|
||||||
#define CL_NAN (CL_INFINITY - CL_INFINITY)
|
#define CL_NAN (CL_INFINITY - CL_INFINITY)
|
||||||
#define CL_HUGE_VALF ((cl_float) 1e50)
|
#define CL_HUGE_VALF ((cl_float) 1e50)
|
||||||
@@ -281,9 +293,20 @@ typedef double cl_double __attribute__((aligned(8)));
|
|||||||
#define CL_FLT_MIN_10_EXP -37
|
#define CL_FLT_MIN_10_EXP -37
|
||||||
#define CL_FLT_MIN_EXP -125
|
#define CL_FLT_MIN_EXP -125
|
||||||
#define CL_FLT_RADIX 2
|
#define CL_FLT_RADIX 2
|
||||||
#define CL_FLT_MAX 0x1.fffffep127f
|
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
|
||||||
#define CL_FLT_MIN 0x1.0p-126f
|
#define CL_FLT_MIN 1.175494350822287507969e-38f
|
||||||
#define CL_FLT_EPSILON 0x1.0p-23f
|
#define CL_FLT_EPSILON 1.1920928955078125e-7f
|
||||||
|
|
||||||
|
#define CL_HALF_DIG 3
|
||||||
|
#define CL_HALF_MANT_DIG 11
|
||||||
|
#define CL_HALF_MAX_10_EXP +4
|
||||||
|
#define CL_HALF_MAX_EXP +16
|
||||||
|
#define CL_HALF_MIN_10_EXP -4
|
||||||
|
#define CL_HALF_MIN_EXP -13
|
||||||
|
#define CL_HALF_RADIX 2
|
||||||
|
#define CL_HALF_MAX 65504.0f
|
||||||
|
#define CL_HALF_MIN 6.103515625e-05f
|
||||||
|
#define CL_HALF_EPSILON 9.765625e-04f
|
||||||
|
|
||||||
#define CL_DBL_DIG 15
|
#define CL_DBL_DIG 15
|
||||||
#define CL_DBL_MANT_DIG 53
|
#define CL_DBL_MANT_DIG 53
|
||||||
@@ -292,37 +315,37 @@ typedef double cl_double __attribute__((aligned(8)));
|
|||||||
#define CL_DBL_MIN_10_EXP -307
|
#define CL_DBL_MIN_10_EXP -307
|
||||||
#define CL_DBL_MIN_EXP -1021
|
#define CL_DBL_MIN_EXP -1021
|
||||||
#define CL_DBL_RADIX 2
|
#define CL_DBL_RADIX 2
|
||||||
#define CL_DBL_MAX 0x1.fffffffffffffp1023
|
#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
|
||||||
#define CL_DBL_MIN 0x1.0p-1022
|
#define CL_DBL_MIN 2.225073858507201383090e-308
|
||||||
#define CL_DBL_EPSILON 0x1.0p-52
|
#define CL_DBL_EPSILON 2.220446049250313080847e-16
|
||||||
|
|
||||||
#define CL_M_E 2.718281828459045090796
|
#define CL_M_E 2.7182818284590452354
|
||||||
#define CL_M_LOG2E 1.442695040888963387005
|
#define CL_M_LOG2E 1.4426950408889634074
|
||||||
#define CL_M_LOG10E 0.434294481903251816668
|
#define CL_M_LOG10E 0.43429448190325182765
|
||||||
#define CL_M_LN2 0.693147180559945286227
|
#define CL_M_LN2 0.69314718055994530942
|
||||||
#define CL_M_LN10 2.302585092994045901094
|
#define CL_M_LN10 2.30258509299404568402
|
||||||
#define CL_M_PI 3.141592653589793115998
|
#define CL_M_PI 3.14159265358979323846
|
||||||
#define CL_M_PI_2 1.570796326794896557999
|
#define CL_M_PI_2 1.57079632679489661923
|
||||||
#define CL_M_PI_4 0.785398163397448278999
|
#define CL_M_PI_4 0.78539816339744830962
|
||||||
#define CL_M_1_PI 0.318309886183790691216
|
#define CL_M_1_PI 0.31830988618379067154
|
||||||
#define CL_M_2_PI 0.636619772367581382433
|
#define CL_M_2_PI 0.63661977236758134308
|
||||||
#define CL_M_2_SQRTPI 1.128379167095512558561
|
#define CL_M_2_SQRTPI 1.12837916709551257390
|
||||||
#define CL_M_SQRT2 1.414213562373095145475
|
#define CL_M_SQRT2 1.41421356237309504880
|
||||||
#define CL_M_SQRT1_2 0.707106781186547572737
|
#define CL_M_SQRT1_2 0.70710678118654752440
|
||||||
|
|
||||||
#define CL_M_E_F 2.71828174591064f
|
#define CL_M_E_F 2.718281828f
|
||||||
#define CL_M_LOG2E_F 1.44269502162933f
|
#define CL_M_LOG2E_F 1.442695041f
|
||||||
#define CL_M_LOG10E_F 0.43429449200630f
|
#define CL_M_LOG10E_F 0.434294482f
|
||||||
#define CL_M_LN2_F 0.69314718246460f
|
#define CL_M_LN2_F 0.693147181f
|
||||||
#define CL_M_LN10_F 2.30258512496948f
|
#define CL_M_LN10_F 2.302585093f
|
||||||
#define CL_M_PI_F 3.14159274101257f
|
#define CL_M_PI_F 3.141592654f
|
||||||
#define CL_M_PI_2_F 1.57079637050629f
|
#define CL_M_PI_2_F 1.570796327f
|
||||||
#define CL_M_PI_4_F 0.78539818525314f
|
#define CL_M_PI_4_F 0.785398163f
|
||||||
#define CL_M_1_PI_F 0.31830987334251f
|
#define CL_M_1_PI_F 0.318309886f
|
||||||
#define CL_M_2_PI_F 0.63661974668503f
|
#define CL_M_2_PI_F 0.636619772f
|
||||||
#define CL_M_2_SQRTPI_F 1.12837922573090f
|
#define CL_M_2_SQRTPI_F 1.128379167f
|
||||||
#define CL_M_SQRT2_F 1.41421353816986f
|
#define CL_M_SQRT2_F 1.414213562f
|
||||||
#define CL_M_SQRT1_2_F 0.70710676908493f
|
#define CL_M_SQRT1_2_F 0.707106781f
|
||||||
|
|
||||||
#if defined( __GNUC__ )
|
#if defined( __GNUC__ )
|
||||||
#define CL_HUGE_VALF __builtin_huge_valf()
|
#define CL_HUGE_VALF __builtin_huge_valf()
|
||||||
@@ -387,7 +410,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
#else
|
#else
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef float __cl_float4 __attribute__((vector_size(16)));
|
typedef float __cl_float4 __attribute__((vector_size(16)));
|
||||||
#else
|
#else
|
||||||
typedef __m128 __cl_float4;
|
typedef __m128 __cl_float4;
|
||||||
@@ -401,7 +424,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
#else
|
#else
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
|
typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
|
||||||
typedef cl_char __cl_char16 __attribute__((vector_size(16)));
|
typedef cl_char __cl_char16 __attribute__((vector_size(16)));
|
||||||
typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
|
typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
|
||||||
@@ -435,7 +458,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
|
|
||||||
#if defined( __MMX__ )
|
#if defined( __MMX__ )
|
||||||
#include <mmintrin.h>
|
#include <mmintrin.h>
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
|
typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
|
||||||
typedef cl_char __cl_char8 __attribute__((vector_size(8)));
|
typedef cl_char __cl_char8 __attribute__((vector_size(8)));
|
||||||
typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
|
typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
|
||||||
@@ -473,7 +496,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
#else
|
#else
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef cl_float __cl_float8 __attribute__((vector_size(32)));
|
typedef cl_float __cl_float8 __attribute__((vector_size(32)));
|
||||||
typedef cl_double __cl_double4 __attribute__((vector_size(32)));
|
typedef cl_double __cl_double4 __attribute__((vector_size(32)));
|
||||||
#else
|
#else
|
||||||
@@ -485,25 +508,30 @@ typedef unsigned int cl_GLenum;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define capabilities for anonymous struct members. */
|
/* Define capabilities for anonymous struct members. */
|
||||||
#if (defined( __GNUC__ ) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
|
#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||||
#define __CL_HAS_ANON_STRUCT__ 1
|
|
||||||
#define __CL_ANON_STRUCT__ __extension__
|
|
||||||
#elif defined( _WIN32) && (_MSC_VER >= 1500)
|
|
||||||
/* Microsoft Developer Studio 2008 supports anonymous structs, but
|
|
||||||
* complains by default. */
|
|
||||||
#define __CL_HAS_ANON_STRUCT__ 1
|
#define __CL_HAS_ANON_STRUCT__ 1
|
||||||
#define __CL_ANON_STRUCT__
|
#define __CL_ANON_STRUCT__
|
||||||
|
#elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
|
||||||
|
#define __CL_HAS_ANON_STRUCT__ 1
|
||||||
|
#define __CL_ANON_STRUCT__ __extension__
|
||||||
|
#elif defined( _WIN32) && defined(_MSC_VER)
|
||||||
|
#if _MSC_VER >= 1500
|
||||||
|
/* Microsoft Developer Studio 2008 supports anonymous structs, but
|
||||||
|
* complains by default. */
|
||||||
|
#define __CL_HAS_ANON_STRUCT__ 1
|
||||||
|
#define __CL_ANON_STRUCT__
|
||||||
/* Disable warning C4201: nonstandard extension used : nameless
|
/* Disable warning C4201: nonstandard extension used : nameless
|
||||||
* struct/union */
|
* struct/union */
|
||||||
#pragma warning( push )
|
#pragma warning( push )
|
||||||
#pragma warning( disable : 4201 )
|
#pragma warning( disable : 4201 )
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define __CL_HAS_ANON_STRUCT__ 0
|
#define __CL_HAS_ANON_STRUCT__ 0
|
||||||
#define __CL_ANON_STRUCT__
|
#define __CL_ANON_STRUCT__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define alignment keys */
|
/* Define alignment keys */
|
||||||
#if (defined( __GNUC__ ) || defined( __IBMC__ ))
|
#if defined( __GNUC__ )
|
||||||
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
|
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
|
||||||
#elif defined( _WIN32) && (_MSC_VER)
|
#elif defined( _WIN32) && (_MSC_VER)
|
||||||
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
|
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
|
||||||
@@ -825,6 +853,81 @@ typedef union
|
|||||||
#endif
|
#endif
|
||||||
}cl_ushort16;
|
}cl_ushort16;
|
||||||
|
|
||||||
|
|
||||||
|
/* ---- cl_halfn ---- */
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(4) s[2];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2;
|
||||||
|
#endif
|
||||||
|
}cl_half2;
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(8) s[4];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2[2];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF4__)
|
||||||
|
__cl_half4 v4;
|
||||||
|
#endif
|
||||||
|
}cl_half4;
|
||||||
|
|
||||||
|
/* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
|
||||||
|
typedef cl_half4 cl_half3;
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(16) s[8];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2[4];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF4__)
|
||||||
|
__cl_half4 v4[2];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF8__ )
|
||||||
|
__cl_half8 v8;
|
||||||
|
#endif
|
||||||
|
}cl_half8;
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(32) s[16];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2[8];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF4__)
|
||||||
|
__cl_half4 v4[4];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF8__ )
|
||||||
|
__cl_half8 v8[2];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF16__ )
|
||||||
|
__cl_half16 v16;
|
||||||
|
#endif
|
||||||
|
}cl_half16;
|
||||||
|
|
||||||
/* ---- cl_intn ---- */
|
/* ---- cl_intn ---- */
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
@@ -1304,8 +1407,10 @@ typedef union
|
|||||||
|
|
||||||
#undef __CL_HAS_ANON_STRUCT__
|
#undef __CL_HAS_ANON_STRUCT__
|
||||||
#undef __CL_ANON_STRUCT__
|
#undef __CL_ANON_STRUCT__
|
||||||
#if defined( _WIN32) && (_MSC_VER >= 1500)
|
#if defined( _WIN32) && defined(_MSC_VER)
|
||||||
#pragma warning( pop )
|
#if _MSC_VER >=1500
|
||||||
|
#pragma warning( pop )
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __CL_PLATFORM_H */
|
#endif /* __CL_PLATFORM_H */
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012 The Khronos Group Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* NOTICE TO KHRONOS MEMBER:
|
|
||||||
*
|
|
||||||
* AMD has assigned the copyright for this object code to Khronos.
|
|
||||||
* This object code is subject to Khronos ownership rights under U.S. and
|
|
||||||
* international Copyright laws.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any Khronos Member
|
|
||||||
* obtaining a copy of this software and/or associated documentation files
|
|
||||||
* (the "Materials"), to use, copy, modify and merge the Materials in object
|
|
||||||
* form only and to publish, distribute and/or sell copies of the Materials
|
|
||||||
* solely in object code form as part of conformant OpenCL API implementations,
|
|
||||||
* subject to the following conditions:
|
|
||||||
*
|
|
||||||
* Khronos Members shall ensure that their respective ICD implementation,
|
|
||||||
* that is installed over another Khronos Members' ICD implementation, will
|
|
||||||
* continue to support all OpenCL devices (hardware and software) supported
|
|
||||||
* by the replaced ICD implementation. For the purposes of this notice, "ICD"
|
|
||||||
* shall mean a library that presents an implementation of the OpenCL API for
|
|
||||||
* the purpose routing API calls to different vendor implementation.
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Materials.
|
|
||||||
*
|
|
||||||
* KHRONOS AND AMD MAKE NO REPRESENTATION ABOUT THE SUITABILITY OF THIS
|
|
||||||
* SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
|
|
||||||
* IMPLIED WARRANTY OF ANY KIND. KHRONOS AND AMD DISCLAIM ALL WARRANTIES
|
|
||||||
* WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
* IN NO EVENT SHALL KHRONOS OR AMD BE LIABLE FOR ANY SPECIAL, INDIRECT,
|
|
||||||
* INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
|
||||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
|
||||||
* THE USE OR PERFORMANCE OF THIS SOURCE CODE.
|
|
||||||
*
|
|
||||||
* U.S. Government End Users. This source code is a "commercial item" as
|
|
||||||
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
|
|
||||||
* "commercial computer software" and "commercial computer software
|
|
||||||
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
|
|
||||||
* and is provided to the U.S. Government only as a commercial end item.
|
|
||||||
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
|
|
||||||
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
|
|
||||||
* source code with only those rights set forth herein.
|
|
||||||
*/
|
|
||||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
|
||||||
#ifndef __SPIR_H
|
|
||||||
#define __SPIR_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
// CLS is for CL SPIR.
|
|
||||||
typedef enum {
|
|
||||||
CLS_PRIVATE_AS = 0,
|
|
||||||
CLS_GLOBAL_AS = 1,
|
|
||||||
CLS_CONSTANT_AS = 2,
|
|
||||||
CLS_LOCAL_AS = 3,
|
|
||||||
CLS_GLOBAL_HOST_AS = 4,
|
|
||||||
CLS_CONSTANT_HOST_AS = 5,
|
|
||||||
CLS_REGION_AS_AMD = 16,
|
|
||||||
} CLS_ADDRESS_SPACES;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_ADDRESS_MIRRORED_REPEAT = 0,
|
|
||||||
CLS_ADDRESS_REPEAT = 1,
|
|
||||||
CLS_ADDRESS_CLAMP_TO_EDGE = 2,
|
|
||||||
CLS_ADDRESS_CLAMP = 3,
|
|
||||||
CLS_ADDRESS_NONE = 4
|
|
||||||
} CLS_ADDRESSING_MODES;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_FILTER_NEAREST = 0,
|
|
||||||
CLS_FILTER_LINEAR = 1
|
|
||||||
} CLS_FILTER_MODE;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_NORMALIZED_COORDS_TRUE = 0,
|
|
||||||
CLS_NORMALIZED_COORDS_FALSE = 1
|
|
||||||
} CLS_NORMALIZED_COORDS;
|
|
||||||
|
|
||||||
// Section 2.3
|
|
||||||
typedef enum {
|
|
||||||
CLS_READ_ONLY = 0,
|
|
||||||
CLS_WRITE_ONLY = 1,
|
|
||||||
CLS_READ_WRITE = 2,
|
|
||||||
CLS_NONE = 3
|
|
||||||
} CLS_ACCESS_QUALIFIERS;
|
|
||||||
|
|
||||||
// Table 14
|
|
||||||
typedef enum {
|
|
||||||
CLS_ARG_CONST = 1,
|
|
||||||
CLS_ARG_RESTRICT = 2,
|
|
||||||
CLS_ARG_VOLATILE = 4,
|
|
||||||
CLS_ARG_NONE = 0,
|
|
||||||
CLS_ARG_MASK = 0xf,
|
|
||||||
CLS_ARG_PIPE = 8
|
|
||||||
} CLS_ARGTYPE_QUALIFIERS;
|
|
||||||
|
|
||||||
static const char* SPIR_TRIPLE_32BIT = "spir-unknown-unknown";
|
|
||||||
static const char* SPIR_TRIPLE_64BIT = "spir64-unknown-unknown";
|
|
||||||
static const char* SPIR_DATA_LAYOUT_32BIT = "p:32:32:32-i1:8:8-i8:8:8"
|
|
||||||
"-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16"
|
|
||||||
"-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
|
|
||||||
"-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024";
|
|
||||||
static const char* SPIR_DATA_LAYOUT_64BIT = "p:64:64:64-i1:8:8-i8:8:8"
|
|
||||||
"-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16"
|
|
||||||
"-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
|
|
||||||
"-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024";
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif // __SPIR_H
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 - 2015 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -89,6 +94,7 @@ typedef cl_uint cl_kernel_arg_address_qualifier;
|
|||||||
typedef cl_uint cl_kernel_arg_access_qualifier;
|
typedef cl_uint cl_kernel_arg_access_qualifier;
|
||||||
typedef cl_bitfield cl_kernel_arg_type_qualifier;
|
typedef cl_bitfield cl_kernel_arg_type_qualifier;
|
||||||
typedef cl_uint cl_kernel_work_group_info;
|
typedef cl_uint cl_kernel_work_group_info;
|
||||||
|
typedef cl_uint cl_kernel_sub_group_info;
|
||||||
typedef cl_uint cl_event_info;
|
typedef cl_uint cl_event_info;
|
||||||
typedef cl_uint cl_command_type;
|
typedef cl_uint cl_command_type;
|
||||||
typedef cl_uint cl_profiling_info;
|
typedef cl_uint cl_profiling_info;
|
||||||
@@ -210,6 +216,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_PLATFORM_NAME 0x0902
|
#define CL_PLATFORM_NAME 0x0902
|
||||||
#define CL_PLATFORM_VENDOR 0x0903
|
#define CL_PLATFORM_VENDOR 0x0903
|
||||||
#define CL_PLATFORM_EXTENSIONS 0x0904
|
#define CL_PLATFORM_EXTENSIONS 0x0904
|
||||||
|
#define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905
|
||||||
|
|
||||||
/* cl_device_type - bitfield */
|
/* cl_device_type - bitfield */
|
||||||
#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
|
#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
|
||||||
@@ -220,98 +227,101 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
|
#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
|
||||||
|
|
||||||
/* cl_device_info */
|
/* cl_device_info */
|
||||||
#define CL_DEVICE_TYPE 0x1000
|
#define CL_DEVICE_TYPE 0x1000
|
||||||
#define CL_DEVICE_VENDOR_ID 0x1001
|
#define CL_DEVICE_VENDOR_ID 0x1001
|
||||||
#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
|
#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
|
||||||
#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
|
#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
|
||||||
#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
|
#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
|
||||||
#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
|
#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
|
||||||
#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
|
#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
|
||||||
#define CL_DEVICE_ADDRESS_BITS 0x100D
|
#define CL_DEVICE_ADDRESS_BITS 0x100D
|
||||||
#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
|
#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
|
||||||
#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
|
#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
|
||||||
#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
|
#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
|
||||||
#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
|
#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
|
||||||
#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
|
#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
|
||||||
#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
|
#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
|
||||||
#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
|
#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
|
||||||
#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
|
#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
|
||||||
#define CL_DEVICE_IMAGE_SUPPORT 0x1016
|
#define CL_DEVICE_IMAGE_SUPPORT 0x1016
|
||||||
#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
|
#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
|
||||||
#define CL_DEVICE_MAX_SAMPLERS 0x1018
|
#define CL_DEVICE_MAX_SAMPLERS 0x1018
|
||||||
#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
|
#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
|
||||||
#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
|
#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
|
||||||
#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
|
#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
|
||||||
#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
|
#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
|
||||||
#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
|
#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
|
||||||
#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
|
#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
|
||||||
#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
|
#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
|
||||||
#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
|
#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
|
||||||
#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
|
#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
|
||||||
#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
|
#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
|
||||||
#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
|
#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
|
||||||
#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
|
#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
|
||||||
#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
|
#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
|
||||||
#define CL_DEVICE_ENDIAN_LITTLE 0x1026
|
#define CL_DEVICE_ENDIAN_LITTLE 0x1026
|
||||||
#define CL_DEVICE_AVAILABLE 0x1027
|
#define CL_DEVICE_AVAILABLE 0x1027
|
||||||
#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
|
#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
|
||||||
#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
|
#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
|
||||||
#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
|
#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
|
||||||
#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
|
#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
|
||||||
#define CL_DEVICE_NAME 0x102B
|
#define CL_DEVICE_NAME 0x102B
|
||||||
#define CL_DEVICE_VENDOR 0x102C
|
#define CL_DEVICE_VENDOR 0x102C
|
||||||
#define CL_DRIVER_VERSION 0x102D
|
#define CL_DRIVER_VERSION 0x102D
|
||||||
#define CL_DEVICE_PROFILE 0x102E
|
#define CL_DEVICE_PROFILE 0x102E
|
||||||
#define CL_DEVICE_VERSION 0x102F
|
#define CL_DEVICE_VERSION 0x102F
|
||||||
#define CL_DEVICE_EXTENSIONS 0x1030
|
#define CL_DEVICE_EXTENSIONS 0x1030
|
||||||
#define CL_DEVICE_PLATFORM 0x1031
|
#define CL_DEVICE_PLATFORM 0x1031
|
||||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||||
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
|
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
||||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
|
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
|
||||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
|
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
|
||||||
#define CL_DEVICE_OPENCL_C_VERSION 0x103D
|
#define CL_DEVICE_OPENCL_C_VERSION 0x103D
|
||||||
#define CL_DEVICE_LINKER_AVAILABLE 0x103E
|
#define CL_DEVICE_LINKER_AVAILABLE 0x103E
|
||||||
#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
|
#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
|
||||||
#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
|
#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
|
||||||
#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
|
#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
|
||||||
#define CL_DEVICE_PARENT_DEVICE 0x1042
|
#define CL_DEVICE_PARENT_DEVICE 0x1042
|
||||||
#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
|
#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
|
||||||
#define CL_DEVICE_PARTITION_PROPERTIES 0x1044
|
#define CL_DEVICE_PARTITION_PROPERTIES 0x1044
|
||||||
#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
|
#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
|
||||||
#define CL_DEVICE_PARTITION_TYPE 0x1046
|
#define CL_DEVICE_PARTITION_TYPE 0x1046
|
||||||
#define CL_DEVICE_REFERENCE_COUNT 0x1047
|
#define CL_DEVICE_REFERENCE_COUNT 0x1047
|
||||||
#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
|
#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
|
||||||
#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
|
#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
|
||||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
|
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
|
||||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
|
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
|
||||||
#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
|
#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
|
||||||
#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
|
#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
|
||||||
#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
|
#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
|
||||||
#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
|
#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
|
||||||
#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
|
#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
|
||||||
#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
|
#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
|
||||||
#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
|
#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
|
||||||
#define CL_DEVICE_SVM_CAPABILITIES 0x1053
|
#define CL_DEVICE_SVM_CAPABILITIES 0x1053
|
||||||
#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
|
#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
|
||||||
#define CL_DEVICE_MAX_PIPE_ARGS 0x1055
|
#define CL_DEVICE_MAX_PIPE_ARGS 0x1055
|
||||||
#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
|
#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
|
||||||
#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
|
#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
|
||||||
#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
|
#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
|
||||||
#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
|
#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
|
||||||
#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
|
#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
|
||||||
|
#define CL_DEVICE_IL_VERSION 0x105B
|
||||||
|
#define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C
|
||||||
|
#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
|
||||||
|
|
||||||
/* cl_device_fp_config - bitfield */
|
/* cl_device_fp_config - bitfield */
|
||||||
#define CL_FP_DENORM (1 << 0)
|
#define CL_FP_DENORM (1 << 0)
|
||||||
@@ -378,6 +388,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_QUEUE_REFERENCE_COUNT 0x1092
|
#define CL_QUEUE_REFERENCE_COUNT 0x1092
|
||||||
#define CL_QUEUE_PROPERTIES 0x1093
|
#define CL_QUEUE_PROPERTIES 0x1093
|
||||||
#define CL_QUEUE_SIZE 0x1094
|
#define CL_QUEUE_SIZE 0x1094
|
||||||
|
#define CL_QUEUE_DEVICE_DEFAULT 0x1095
|
||||||
|
|
||||||
/* cl_mem_flags and cl_svm_mem_flags - bitfield */
|
/* cl_mem_flags and cl_svm_mem_flags - bitfield */
|
||||||
#define CL_MEM_READ_WRITE (1 << 0)
|
#define CL_MEM_READ_WRITE (1 << 0)
|
||||||
@@ -437,6 +448,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_HALF_FLOAT 0x10DD
|
#define CL_HALF_FLOAT 0x10DD
|
||||||
#define CL_FLOAT 0x10DE
|
#define CL_FLOAT 0x10DE
|
||||||
#define CL_UNORM_INT24 0x10DF
|
#define CL_UNORM_INT24 0x10DF
|
||||||
|
#define CL_UNORM_INT_101010_2 0x10E0
|
||||||
|
|
||||||
/* cl_mem_object_type */
|
/* cl_mem_object_type */
|
||||||
#define CL_MEM_OBJECT_BUFFER 0x10F0
|
#define CL_MEM_OBJECT_BUFFER 0x10F0
|
||||||
@@ -513,6 +525,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_PROGRAM_BINARIES 0x1166
|
#define CL_PROGRAM_BINARIES 0x1166
|
||||||
#define CL_PROGRAM_NUM_KERNELS 0x1167
|
#define CL_PROGRAM_NUM_KERNELS 0x1167
|
||||||
#define CL_PROGRAM_KERNEL_NAMES 0x1168
|
#define CL_PROGRAM_KERNEL_NAMES 0x1168
|
||||||
|
#define CL_PROGRAM_IL 0x1169
|
||||||
|
|
||||||
/* cl_program_build_info */
|
/* cl_program_build_info */
|
||||||
#define CL_PROGRAM_BUILD_STATUS 0x1181
|
#define CL_PROGRAM_BUILD_STATUS 0x1181
|
||||||
@@ -540,6 +553,8 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_KERNEL_CONTEXT 0x1193
|
#define CL_KERNEL_CONTEXT 0x1193
|
||||||
#define CL_KERNEL_PROGRAM 0x1194
|
#define CL_KERNEL_PROGRAM 0x1194
|
||||||
#define CL_KERNEL_ATTRIBUTES 0x1195
|
#define CL_KERNEL_ATTRIBUTES 0x1195
|
||||||
|
#define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9
|
||||||
|
#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA
|
||||||
|
|
||||||
/* cl_kernel_arg_info */
|
/* cl_kernel_arg_info */
|
||||||
#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
|
#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
|
||||||
@@ -560,7 +575,7 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
||||||
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
||||||
|
|
||||||
/* cl_kernel_arg_type_qualifer */
|
/* cl_kernel_arg_type_qualifier */
|
||||||
#define CL_KERNEL_ARG_TYPE_NONE 0
|
#define CL_KERNEL_ARG_TYPE_NONE 0
|
||||||
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
||||||
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
||||||
@@ -574,6 +589,11 @@ typedef struct _cl_buffer_region {
|
|||||||
#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
|
#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
|
||||||
#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
|
#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
|
||||||
#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
|
#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
|
||||||
|
|
||||||
|
/* cl_kernel_sub_group_info */
|
||||||
|
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033
|
||||||
|
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034
|
||||||
|
#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8
|
||||||
|
|
||||||
/* cl_kernel_exec_info */
|
/* cl_kernel_exec_info */
|
||||||
#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
|
#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
|
||||||
@@ -663,15 +683,6 @@ clGetDeviceInfo(cl_device_id /* device */,
|
|||||||
size_t /* param_value_size */,
|
size_t /* param_value_size */,
|
||||||
void * /* param_value */,
|
void * /* param_value */,
|
||||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clGetDeviceAndHostTimer(cl_device_id /* device */,
|
|
||||||
cl_ulong * /* device_timestamp */,
|
|
||||||
cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
|
||||||
clGetHostTimer(cl_device_id /* device */,
|
|
||||||
cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clCreateSubDevices(cl_device_id /* in_device */,
|
clCreateSubDevices(cl_device_id /* in_device */,
|
||||||
@@ -685,6 +696,21 @@ clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
|
|||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
|
clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetDefaultDeviceCommandQueue(cl_context /* context */,
|
||||||
|
cl_device_id /* device */,
|
||||||
|
cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetDeviceAndHostTimer(cl_device_id /* device */,
|
||||||
|
cl_ulong* /* device_timestamp */,
|
||||||
|
cl_ulong* /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetHostTimer(cl_device_id /* device */,
|
||||||
|
cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
|
||||||
/* Context APIs */
|
/* Context APIs */
|
||||||
extern CL_API_ENTRY cl_context CL_API_CALL
|
extern CL_API_ENTRY cl_context CL_API_CALL
|
||||||
@@ -844,13 +870,7 @@ clCreateProgramWithSource(cl_context /* context */,
|
|||||||
const char ** /* strings */,
|
const char ** /* strings */,
|
||||||
const size_t * /* lengths */,
|
const size_t * /* lengths */,
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
|
||||||
clCreateProgramWithIL(cl_context /* context */,
|
|
||||||
const void * /* strings */,
|
|
||||||
size_t /* lengths */,
|
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||||
clCreateProgramWithBinary(cl_context /* context */,
|
clCreateProgramWithBinary(cl_context /* context */,
|
||||||
cl_uint /* num_devices */,
|
cl_uint /* num_devices */,
|
||||||
@@ -867,6 +887,13 @@ clCreateProgramWithBuiltInKernels(cl_context /* context */,
|
|||||||
const char * /* kernel_names */,
|
const char * /* kernel_names */,
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||||
|
clCreateProgramWithIL(cl_context /* context */,
|
||||||
|
const void* /* il */,
|
||||||
|
size_t /* length */,
|
||||||
|
cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
|
clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
@@ -934,6 +961,10 @@ clCreateKernelsInProgram(cl_program /* program */,
|
|||||||
cl_kernel * /* kernels */,
|
cl_kernel * /* kernels */,
|
||||||
cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
|
cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_kernel CL_API_CALL
|
||||||
|
clCloneKernel(cl_kernel /* source_kernel */,
|
||||||
|
cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
|
clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
@@ -956,10 +987,6 @@ clSetKernelExecInfo(cl_kernel /* kernel */,
|
|||||||
cl_kernel_exec_info /* param_name */,
|
cl_kernel_exec_info /* param_name */,
|
||||||
size_t /* param_value_size */,
|
size_t /* param_value_size */,
|
||||||
const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
|
const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_kernel CL_API_CALL
|
|
||||||
clCloneKernel(const cl_kernel /* source_kernel */,
|
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
|
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clGetKernelInfo(cl_kernel /* kernel */,
|
clGetKernelInfo(cl_kernel /* kernel */,
|
||||||
@@ -984,6 +1011,17 @@ clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
|
|||||||
void * /* param_value */,
|
void * /* param_value */,
|
||||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetKernelSubGroupInfo(cl_kernel /* kernel */,
|
||||||
|
cl_device_id /* device */,
|
||||||
|
cl_kernel_sub_group_info /* param_name */,
|
||||||
|
size_t /* input_value_size */,
|
||||||
|
const void* /*input_value */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
void* /* param_value */,
|
||||||
|
size_t* /* param_value_size_ret */ ) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
|
||||||
/* Event Object APIs */
|
/* Event Object APIs */
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clWaitForEvents(cl_uint /* num_events */,
|
clWaitForEvents(cl_uint /* num_events */,
|
||||||
@@ -1319,16 +1357,17 @@ clEnqueueSVMUnmap(cl_command_queue /* command_queue */,
|
|||||||
cl_uint /* num_events_in_wait_list */,
|
cl_uint /* num_events_in_wait_list */,
|
||||||
const cl_event * /* event_wait_list */,
|
const cl_event * /* event_wait_list */,
|
||||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
|
||||||
|
|
||||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
clEnqueueSVMMigrateMem(cl_command_queue /* command_queue */,
|
clEnqueueSVMMigrateMem(cl_command_queue /* command_queue */,
|
||||||
cl_uint /* num_svm_pointers */,
|
cl_uint /* num_svm_pointers */,
|
||||||
const void ** /* svm_pointers */,
|
const void ** /* svm_pointers */,
|
||||||
const size_t * /* sizes */,
|
const size_t * /* sizes */,
|
||||||
cl_mem_migration_flags /* flags */,
|
cl_mem_migration_flags /* flags */,
|
||||||
cl_uint /* num_events_in_wait_list */,
|
cl_uint /* num_events_in_wait_list */,
|
||||||
const cl_event * /* event_wait_list */,
|
const cl_event * /* event_wait_list */,
|
||||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_2_1;
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_2_1;
|
||||||
|
|
||||||
|
|
||||||
/* Extension function access
|
/* Extension function access
|
||||||
*
|
*
|
||||||
@@ -1384,26 +1423,26 @@ extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
|
|||||||
clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||||
|
|
||||||
/* Deprecated OpenCL 2.0 APIs */
|
/* Deprecated OpenCL 2.0 APIs */
|
||||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_command_queue CL_API_CALL
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
|
||||||
clCreateCommandQueue(cl_context /* context */,
|
clCreateCommandQueue(cl_context /* context */,
|
||||||
cl_device_id /* device */,
|
cl_device_id /* device */,
|
||||||
cl_command_queue_properties /* properties */,
|
cl_command_queue_properties /* properties */,
|
||||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
|
||||||
|
|
||||||
|
|
||||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_sampler CL_API_CALL
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
|
||||||
clCreateSampler(cl_context /* context */,
|
clCreateSampler(cl_context /* context */,
|
||||||
cl_bool /* normalized_coords */,
|
cl_bool /* normalized_coords */,
|
||||||
cl_addressing_mode /* addressing_mode */,
|
cl_addressing_mode /* addressing_mode */,
|
||||||
cl_filter_mode /* filter_mode */,
|
cl_filter_mode /* filter_mode */,
|
||||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
|
||||||
|
|
||||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_int CL_API_CALL
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
|
||||||
clEnqueueTask(cl_command_queue /* command_queue */,
|
clEnqueueTask(cl_command_queue /* command_queue */,
|
||||||
cl_kernel /* kernel */,
|
cl_kernel /* kernel */,
|
||||||
cl_uint /* num_events_in_wait_list */,
|
cl_uint /* num_events_in_wait_list */,
|
||||||
const cl_event * /* event_wait_list */,
|
const cl_event * /* event_wait_list */,
|
||||||
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -33,7 +38,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************/
|
||||||
/* cl_khr_dx9_media_sharing */
|
/* cl_khr_dx9_media_sharing */
|
||||||
#define cl_khr_dx9_media_sharing 1
|
#define cl_khr_dx9_media_sharing 1
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -28,8 +33,6 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
#include <CL/cl.h>
|
#include <CL/cl.h>
|
||||||
#include <EGL/egl.h>
|
|
||||||
#include <EGL/eglext.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -21,7 +26,7 @@
|
|||||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* $Revision: 14835 $ on $Date: 2011-05-26 11:32:00 -0700 (Thu, 26 May 2011) $ */
|
/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
|
||||||
|
|
||||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||||
/* (OpenGL, D3D) dependencies. */
|
/* (OpenGL, D3D) dependencies. */
|
||||||
@@ -149,6 +154,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* conte
|
|||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extension: cl_khr_spir
|
* Extension: cl_khr_spir
|
||||||
*
|
*
|
||||||
@@ -200,6 +206,7 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /
|
|||||||
#define CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD 0x4049
|
#define CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD 0x4049
|
||||||
#define CL_DEVICE_GFXIP_MAJOR_AMD 0x404A
|
#define CL_DEVICE_GFXIP_MAJOR_AMD 0x404A
|
||||||
#define CL_DEVICE_GFXIP_MINOR_AMD 0x404B
|
#define CL_DEVICE_GFXIP_MINOR_AMD 0x404B
|
||||||
|
#define CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD 0x404C
|
||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
@@ -209,6 +216,139 @@ typedef union
|
|||||||
|
|
||||||
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
||||||
|
|
||||||
|
/**************************
|
||||||
|
* cl_amd_offline_devices *
|
||||||
|
**************************/
|
||||||
|
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
||||||
|
|
||||||
|
/********************************
|
||||||
|
* cl_amd_bus_addressable_memory *
|
||||||
|
********************************/
|
||||||
|
|
||||||
|
/* cl_mem flag - bitfield */
|
||||||
|
#define CL_MEM_BUS_ADDRESSABLE_AMD (1<<30)
|
||||||
|
#define CL_MEM_EXTERNAL_PHYSICAL_AMD (1<<31)
|
||||||
|
|
||||||
|
#define CL_COMMAND_WAIT_SIGNAL_AMD 0x4080
|
||||||
|
#define CL_COMMAND_WRITE_SIGNAL_AMD 0x4081
|
||||||
|
#define CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD 0x4082
|
||||||
|
|
||||||
|
typedef struct _cl_bus_address_amd
|
||||||
|
{
|
||||||
|
cl_ulong surface_bus_address;
|
||||||
|
cl_ulong marker_bus_address;
|
||||||
|
} cl_bus_address_amd;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWaitSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*mem_object*/,
|
||||||
|
cl_uint /*value*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWriteSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*mem_object*/,
|
||||||
|
cl_uint /*value*/,
|
||||||
|
cl_ulong /*offset*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueMakeBuffersResidentAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_uint /*num_mem_objs*/,
|
||||||
|
cl_mem * /*mem_objects*/,
|
||||||
|
cl_bool /*blocking_make_resident*/,
|
||||||
|
cl_bus_address_amd * /*bus_addresses*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* cl_amd_liquid_flash *
|
||||||
|
***********************/
|
||||||
|
#define cl_amd_liquid_flash 1
|
||||||
|
|
||||||
|
#define CL_COMMAND_READ_SSG_FILE_AMD 0x4083
|
||||||
|
#define CL_COMMAND_WRITE_SSG_FILE_AMD 0x4087
|
||||||
|
|
||||||
|
#define CL_INVALID_FILE_OBJECT_AMD 0x4084
|
||||||
|
|
||||||
|
typedef struct _cl_file_amd * cl_file_amd;
|
||||||
|
|
||||||
|
typedef cl_uint cl_file_flags_amd;
|
||||||
|
#define CL_FILE_READ_ONLY_AMD (1 << 0)
|
||||||
|
#define CL_FILE_WRITE_ONLY_AMD (1 << 1)
|
||||||
|
#define CL_FILE_READ_WRITE_AMD (1 << 2)
|
||||||
|
|
||||||
|
typedef cl_uint cl_file_info_amd;
|
||||||
|
#define CL_FILE_BLOCK_SIZE_AMD 0x4085
|
||||||
|
#define CL_FILE_SIZE_AMD 0x4086
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_file_amd
|
||||||
|
(CL_API_CALL * clCreateSsgFileObjectAMD_fn)(cl_context /*context*/,
|
||||||
|
cl_file_flags_amd /*flags*/,
|
||||||
|
const wchar_t * /*file_name*/,
|
||||||
|
cl_int * /*errcode_ret*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clGetSsgFileObjectInfoAMD_fn)(cl_file_amd /* file */,
|
||||||
|
cl_file_info_amd /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
void * /* param_value */,
|
||||||
|
size_t * /* param_value_size_ret */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clRetainSsgFileObjectAMD_fn)( cl_file_amd /*file*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clReleaseSsgFileObjectAMD_fn)( cl_file_amd /*file*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueReadSsgFileAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*buffer*/,
|
||||||
|
cl_bool /*blocking_write*/,
|
||||||
|
size_t /*buffer_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_file_amd /*file*/,
|
||||||
|
size_t /*file_offset*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWriteSsgFileAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*buffer*/,
|
||||||
|
cl_bool /*blocking_read*/,
|
||||||
|
size_t /*buffer_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_file_amd /*file*/,
|
||||||
|
size_t /*file_offset*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
/*************************
|
||||||
|
* cl_amd_copy_buffer_p2p *
|
||||||
|
**************************/
|
||||||
|
#define CL_DEVICE_NUM_P2P_DEVICES_AMD 0x4088
|
||||||
|
#define CL_DEVICE_P2P_DEVICES_AMD 0x4089
|
||||||
|
|
||||||
|
#define cl_amd_copy_buffer_p2p 1
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueCopyBufferP2PAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*src_buffer*/,
|
||||||
|
cl_mem /*dst_buffer*/,
|
||||||
|
size_t /*src_offset*/,
|
||||||
|
size_t /*dst_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event* /*event_wait_list*/,
|
||||||
|
cl_event* /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
// <amd_internal>
|
// <amd_internal>
|
||||||
/***************************
|
/***************************
|
||||||
* cl_amd_command_intercept *
|
* cl_amd_command_intercept *
|
||||||
@@ -227,18 +367,32 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|||||||
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
||||||
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
||||||
|
|
||||||
/***************************************
|
/*************************
|
||||||
* cl-gl depth buffer interop extension *
|
* cl_amd_object_metadata *
|
||||||
****************************************/
|
|
||||||
|
|
||||||
#define CL_UNORM_INT24 0x10DF
|
|
||||||
#define CL_GL_NUM_SAMPLES 0x2012
|
|
||||||
// </amd_internal>
|
|
||||||
|
|
||||||
/**************************
|
|
||||||
* cl_amd_offline_devices *
|
|
||||||
**************************/
|
**************************/
|
||||||
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
#define cl_amd_object_metadata 1
|
||||||
|
|
||||||
|
typedef size_t cl_key_amd;
|
||||||
|
|
||||||
|
#define CL_INVALID_OBJECT_AMD 0x403A
|
||||||
|
#define CL_INVALID_KEY_AMD 0x403B
|
||||||
|
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
||||||
|
cl_platform_id /* platform */,
|
||||||
|
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
// </amd_internal>
|
||||||
|
|
||||||
/*********************************
|
/*********************************
|
||||||
* cl_arm_printf extension
|
* cl_arm_printf extension
|
||||||
@@ -307,6 +461,7 @@ typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
|||||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||||
|
|
||||||
/* cl_device_partition_property_ext list terminators */
|
/* cl_device_partition_property_ext list terminators */
|
||||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
@@ -370,92 +525,67 @@ typedef struct _cl_mem_ion_host_ptr
|
|||||||
|
|
||||||
} cl_mem_ion_host_ptr;
|
} cl_mem_ion_host_ptr;
|
||||||
|
|
||||||
// <amd_internal>
|
|
||||||
/*************************
|
|
||||||
* cl_amd_object_metadata *
|
|
||||||
**************************/
|
|
||||||
#define cl_amd_object_metadata 1
|
|
||||||
|
|
||||||
typedef size_t cl_key_amd;
|
|
||||||
|
|
||||||
#define CL_INVALID_OBJECT_AMD 0x403A
|
|
||||||
#define CL_INVALID_KEY_AMD 0x403B
|
|
||||||
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
|
||||||
cl_platform_id /* platform */,
|
|
||||||
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
|
||||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
|
||||||
void * /* object */,
|
|
||||||
cl_key_amd /* key */,
|
|
||||||
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
|
||||||
void * /* object */,
|
|
||||||
cl_key_amd /* key */,
|
|
||||||
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
|
||||||
// </amd_internal>
|
|
||||||
|
|
||||||
#endif /* CL_VERSION_1_1 */
|
#endif /* CL_VERSION_1_1 */
|
||||||
|
|
||||||
#ifdef CL_VERSION_1_2
|
#if defined(CL_VERSION_1_2)
|
||||||
/********************************
|
|
||||||
* cl_amd_bus_addressable_memory *
|
|
||||||
********************************/
|
|
||||||
|
|
||||||
/* cl_mem flag - bitfield */
|
/******************************************
|
||||||
#define CL_MEM_BUS_ADDRESSABLE_AMD (1<<30)
|
* cl_img_yuv_image extension *
|
||||||
#define CL_MEM_EXTERNAL_PHYSICAL_AMD (1<<31)
|
******************************************/
|
||||||
|
|
||||||
#define CL_COMMAND_WAIT_SIGNAL_AMD 0x4080
|
/* Image formats used in clCreateImage */
|
||||||
#define CL_COMMAND_WRITE_SIGNAL_AMD 0x4081
|
#define CL_NV21_IMG 0x40D0
|
||||||
#define CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD 0x4082
|
#define CL_YV12_IMG 0x40D1
|
||||||
|
|
||||||
typedef struct _cl_bus_address_amd
|
/******************************************
|
||||||
{
|
* cl_img_cached_allocations extension *
|
||||||
cl_ulong surface_bus_address;
|
******************************************/
|
||||||
cl_ulong marker_bus_address;
|
|
||||||
} cl_bus_address_amd;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
/* Flag values used by clCreteBuffer */
|
||||||
(CL_API_CALL * clEnqueueWaitSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||||
cl_mem /*mem_object*/,
|
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||||
cl_uint /*value*/,
|
|
||||||
cl_uint /*num_events*/,
|
|
||||||
const cl_event * /*event_wait_list*/,
|
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
/******************************************
|
||||||
(CL_API_CALL * clEnqueueWriteSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
* cl_img_use_gralloc_ptr extension *
|
||||||
cl_mem /*mem_object*/,
|
******************************************/
|
||||||
cl_uint /*value*/,
|
|
||||||
cl_ulong /*offset*/,
|
/* Flag values used by clCreteBuffer */
|
||||||
cl_uint /*num_events*/,
|
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||||
const cl_event * /*event_list*/,
|
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||||
|
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||||
|
|
||||||
|
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||||
|
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
|
||||||
(CL_API_CALL * clEnqueueMakeBuffersResidentAMD_fn)( cl_command_queue /*command_queue*/,
|
|
||||||
cl_uint /*num_mem_objs*/,
|
|
||||||
cl_mem * /*mem_objects*/,
|
|
||||||
cl_bool /*blocking_make_resident*/,
|
|
||||||
cl_bus_address_amd * /*bus_addresses*/,
|
|
||||||
cl_uint /*num_events*/,
|
|
||||||
const cl_event * /*event_list*/,
|
|
||||||
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
|
||||||
#endif /* CL_VERSION_1_2 */
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
#ifdef CL_VERSION_2_0
|
#ifdef CL_VERSION_2_0
|
||||||
/*********************************
|
/*********************************
|
||||||
* cl_khr_sub_groups extension
|
* cl_khr_subgroups extension
|
||||||
*********************************/
|
*********************************/
|
||||||
#define cl_khr_sub_groups 1
|
#define cl_khr_subgroups 1
|
||||||
|
|
||||||
typedef cl_uint cl_kernel_sub_group_info;
|
/* cl_kernel_sub_group_info is declared in CL.h. */
|
||||||
|
|
||||||
/* cl_khr_sub_group_info */
|
/* cl_kernel_sub_group_info */
|
||||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||||
|
|
||||||
@@ -467,7 +597,7 @@ clGetKernelSubGroupInfoKHR(cl_kernel /* in_kernel */,
|
|||||||
const void * /*input_value*/,
|
const void * /*input_value*/,
|
||||||
size_t /*param_value_size*/,
|
size_t /*param_value_size*/,
|
||||||
void* /*param_value*/,
|
void* /*param_value*/,
|
||||||
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
|
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||||
|
|
||||||
typedef CL_API_ENTRY cl_int
|
typedef CL_API_ENTRY cl_int
|
||||||
( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */,
|
( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */,
|
||||||
@@ -477,7 +607,7 @@ typedef CL_API_ENTRY cl_int
|
|||||||
const void * /*input_value*/,
|
const void * /*input_value*/,
|
||||||
size_t /*param_value_size*/,
|
size_t /*param_value_size*/,
|
||||||
void* /*param_value*/,
|
void* /*param_value*/,
|
||||||
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
|
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||||
#endif /* CL_VERSION_2_0 */
|
#endif /* CL_VERSION_2_0 */
|
||||||
|
|
||||||
#ifdef CL_VERSION_2_1
|
#ifdef CL_VERSION_2_1
|
||||||
@@ -486,19 +616,192 @@ typedef CL_API_ENTRY cl_int
|
|||||||
*********************************/
|
*********************************/
|
||||||
#define cl_khr_priority_hints 1
|
#define cl_khr_priority_hints 1
|
||||||
|
|
||||||
/* cl_command_queue_properties */
|
typedef cl_uint cl_queue_priority_khr;
|
||||||
#define CL_QUEUE_PRIORITY_KHR 0x0000
|
|
||||||
#define CL_QUEUE_PRIORITY_HIGH_KHR (3 << 16)
|
|
||||||
#define CL_QUEUE_PRIORITY_MED_KHR (2 << 16)
|
|
||||||
#define CL_QUEUE_PRIORITY_LOW_KHR (1 << 16)
|
|
||||||
|
|
||||||
#define CL_QUEUE_THROTTLE_KHR 0x0000
|
/* cl_command_queue_properties */
|
||||||
#define CL_QUEUE_THROTTLE_HIGH_KHR (3 << 16)
|
#define CL_QUEUE_PRIORITY_KHR 0x1096
|
||||||
#define CL_QUEUE_THROTTLE_MED_KHR (2 << 16)
|
|
||||||
#define CL_QUEUE_THROTTLE_LOW_KHR (1 << 16)
|
/* cl_queue_priority_khr */
|
||||||
|
#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
|
||||||
|
#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
|
||||||
|
#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
|
||||||
|
|
||||||
#endif /* CL_VERSION_2_1 */
|
#endif /* CL_VERSION_2_1 */
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_2_1
|
||||||
|
/*********************************
|
||||||
|
* cl_khr_throttle_hints extension
|
||||||
|
*********************************/
|
||||||
|
#define cl_khr_throttle_hints 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_queue_throttle_khr;
|
||||||
|
|
||||||
|
/* cl_command_queue_properties */
|
||||||
|
#define CL_QUEUE_THROTTLE_KHR 0x1097
|
||||||
|
|
||||||
|
/* cl_queue_throttle_khr */
|
||||||
|
#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
|
||||||
|
#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
|
||||||
|
#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_2_1 */
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* cl_arm_import_memory extension *
|
||||||
|
**********************************/
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_0
|
||||||
|
|
||||||
|
typedef intptr_t cl_import_properties_arm;
|
||||||
|
|
||||||
|
/* Default and valid proporties name for cl_arm_import_memory */
|
||||||
|
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||||
|
|
||||||
|
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||||
|
|
||||||
|
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||||
|
|
||||||
|
/* Secure DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_SECURE_ARM 0x40B5
|
||||||
|
|
||||||
|
/* This extension adds a new function that allows for direct memory import into
|
||||||
|
* OpenCL via the clImportMemoryARM function.
|
||||||
|
*
|
||||||
|
* Memory imported through this interface will be mapped into the device's page
|
||||||
|
* tables directly, providing zero copy access. It will never fall back to copy
|
||||||
|
* operations and aliased buffers.
|
||||||
|
*
|
||||||
|
* Types of memory supported for import are specified as additional extension
|
||||||
|
* strings.
|
||||||
|
*
|
||||||
|
* This extension produces cl_mem allocations which are compatible with all other
|
||||||
|
* users of cl_mem in the standard API.
|
||||||
|
*
|
||||||
|
* This extension maps pages with the same properties as the normal buffer creation
|
||||||
|
* function clCreateBuffer.
|
||||||
|
*/
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clImportMemoryARM( cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
const cl_import_properties_arm *properties,
|
||||||
|
void *memory,
|
||||||
|
size_t size,
|
||||||
|
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_0 */
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_arm_shared_virtual_memory extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_2
|
||||||
|
|
||||||
|
/* Used by clGetDeviceInfo */
|
||||||
|
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||||
|
|
||||||
|
/* Used by clGetMemObjectInfo */
|
||||||
|
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||||
|
|
||||||
|
/* Used by clSetKernelExecInfoARM: */
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||||
|
|
||||||
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||||
|
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||||
|
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||||
|
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||||
|
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||||
|
|
||||||
|
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||||
|
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||||
|
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||||
|
|
||||||
|
/* Flag values used by clSVMAllocARM: */
|
||||||
|
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||||
|
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||||
|
|
||||||
|
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||||
|
typedef cl_uint cl_kernel_exec_info_arm;
|
||||||
|
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void * CL_API_CALL
|
||||||
|
clSVMAllocARM(cl_context /* context */,
|
||||||
|
cl_svm_mem_flags_arm /* flags */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* alignment */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void CL_API_CALL
|
||||||
|
clSVMFreeARM(cl_context /* context */,
|
||||||
|
void * /* svm_pointer */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMFreeARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void * /* user_data */),
|
||||||
|
void * /* user_data */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemcpyARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_copy */,
|
||||||
|
void * /* dst_ptr */,
|
||||||
|
const void * /* src_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemFillARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
const void * /* pattern */,
|
||||||
|
size_t /* pattern_size */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMapARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_map */,
|
||||||
|
cl_map_flags /* flags */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMUnmapARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelArgSVMPointerARM(cl_kernel /* kernel */,
|
||||||
|
cl_uint /* arg_index */,
|
||||||
|
const void * /* arg_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelExecInfoARM(cl_kernel /* kernel */,
|
||||||
|
cl_kernel_exec_info_arm /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
const void * /* param_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008 - 2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
@@ -21,7 +26,7 @@
|
|||||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
|
|
||||||
/* $Revision: 14829 $ on $Date: 2011-05-26 08:22:50 -0700 (Thu, 26 May 2011) $ */
|
/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
|
||||||
|
|
||||||
#ifndef __CL_PLATFORM_H
|
#ifndef __CL_PLATFORM_H
|
||||||
#define __CL_PLATFORM_H
|
#define __CL_PLATFORM_H
|
||||||
@@ -35,7 +40,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32)
|
||||||
#define CL_API_ENTRY
|
#define CL_API_ENTRY
|
||||||
#define CL_API_CALL __stdcall
|
#define CL_API_CALL __stdcall
|
||||||
#define CL_CALLBACK __stdcall
|
#define CL_CALLBACK __stdcall
|
||||||
@@ -45,6 +50,14 @@ extern "C" {
|
|||||||
#define CL_CALLBACK
|
#define CL_CALLBACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Deprecation flags refer to the last version of the header in which the
|
||||||
|
* feature was not deprecated.
|
||||||
|
*
|
||||||
|
* E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without
|
||||||
|
* deprecation but is deprecated in versions later than 1.1.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
|
#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
|
||||||
#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
|
#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
|
||||||
@@ -97,6 +110,14 @@ extern "C" {
|
|||||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||||
|
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#else
|
||||||
|
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED __attribute__((deprecated))
|
||||||
|
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||||
@@ -104,15 +125,7 @@ extern "C" {
|
|||||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED __attribute__((deprecated))
|
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED __attribute__((deprecated))
|
||||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(_WIN32)
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#else
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED __attribute__((deprecated))
|
|
||||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#endif
|
|
||||||
#elif _WIN32
|
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||||
@@ -129,21 +142,21 @@ extern "C" {
|
|||||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)
|
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||||
|
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#else
|
||||||
|
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED __declspec(deprecated)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||||
#else
|
#else
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED __declspec(deprecated)
|
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED __declspec(deprecated)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#else
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED __declspec(deprecated)
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||||
@@ -151,11 +164,11 @@ extern "C" {
|
|||||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||||
|
|
||||||
|
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||||
|
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||||
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||||
|
|
||||||
#define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -201,7 +214,18 @@ typedef double cl_double;
|
|||||||
#define CL_FLT_RADIX 2
|
#define CL_FLT_RADIX 2
|
||||||
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
|
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
|
||||||
#define CL_FLT_MIN 1.175494350822287507969e-38f
|
#define CL_FLT_MIN 1.175494350822287507969e-38f
|
||||||
#define CL_FLT_EPSILON 0.00000011920928955078125f
|
#define CL_FLT_EPSILON 1.1920928955078125e-7f
|
||||||
|
|
||||||
|
#define CL_HALF_DIG 3
|
||||||
|
#define CL_HALF_MANT_DIG 11
|
||||||
|
#define CL_HALF_MAX_10_EXP +4
|
||||||
|
#define CL_HALF_MAX_EXP +16
|
||||||
|
#define CL_HALF_MIN_10_EXP -4
|
||||||
|
#define CL_HALF_MIN_EXP -13
|
||||||
|
#define CL_HALF_RADIX 2
|
||||||
|
#define CL_HALF_MAX 65504.0f
|
||||||
|
#define CL_HALF_MIN 6.103515625e-05f
|
||||||
|
#define CL_HALF_EPSILON 9.765625e-04f
|
||||||
|
|
||||||
#define CL_DBL_DIG 15
|
#define CL_DBL_DIG 15
|
||||||
#define CL_DBL_MANT_DIG 53
|
#define CL_DBL_MANT_DIG 53
|
||||||
@@ -210,37 +234,37 @@ typedef double cl_double;
|
|||||||
#define CL_DBL_MIN_10_EXP -307
|
#define CL_DBL_MIN_10_EXP -307
|
||||||
#define CL_DBL_MIN_EXP -1021
|
#define CL_DBL_MIN_EXP -1021
|
||||||
#define CL_DBL_RADIX 2
|
#define CL_DBL_RADIX 2
|
||||||
#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
|
#define CL_DBL_MAX 1.7976931348623158e+308
|
||||||
#define CL_DBL_MIN 2.225073858507201383090e-308
|
#define CL_DBL_MIN 2.225073858507201383090e-308
|
||||||
#define CL_DBL_EPSILON 2.220446049250313080847e-16
|
#define CL_DBL_EPSILON 2.220446049250313080847e-16
|
||||||
|
|
||||||
#define CL_M_E 2.718281828459045090796
|
#define CL_M_E 2.7182818284590452354
|
||||||
#define CL_M_LOG2E 1.442695040888963387005
|
#define CL_M_LOG2E 1.4426950408889634074
|
||||||
#define CL_M_LOG10E 0.434294481903251816668
|
#define CL_M_LOG10E 0.43429448190325182765
|
||||||
#define CL_M_LN2 0.693147180559945286227
|
#define CL_M_LN2 0.69314718055994530942
|
||||||
#define CL_M_LN10 2.302585092994045901094
|
#define CL_M_LN10 2.30258509299404568402
|
||||||
#define CL_M_PI 3.141592653589793115998
|
#define CL_M_PI 3.14159265358979323846
|
||||||
#define CL_M_PI_2 1.570796326794896557999
|
#define CL_M_PI_2 1.57079632679489661923
|
||||||
#define CL_M_PI_4 0.785398163397448278999
|
#define CL_M_PI_4 0.78539816339744830962
|
||||||
#define CL_M_1_PI 0.318309886183790691216
|
#define CL_M_1_PI 0.31830988618379067154
|
||||||
#define CL_M_2_PI 0.636619772367581382433
|
#define CL_M_2_PI 0.63661977236758134308
|
||||||
#define CL_M_2_SQRTPI 1.128379167095512558561
|
#define CL_M_2_SQRTPI 1.12837916709551257390
|
||||||
#define CL_M_SQRT2 1.414213562373095145475
|
#define CL_M_SQRT2 1.41421356237309504880
|
||||||
#define CL_M_SQRT1_2 0.707106781186547572737
|
#define CL_M_SQRT1_2 0.70710678118654752440
|
||||||
|
|
||||||
#define CL_M_E_F 2.71828174591064f
|
#define CL_M_E_F 2.718281828f
|
||||||
#define CL_M_LOG2E_F 1.44269502162933f
|
#define CL_M_LOG2E_F 1.442695041f
|
||||||
#define CL_M_LOG10E_F 0.43429449200630f
|
#define CL_M_LOG10E_F 0.434294482f
|
||||||
#define CL_M_LN2_F 0.69314718246460f
|
#define CL_M_LN2_F 0.693147181f
|
||||||
#define CL_M_LN10_F 2.30258512496948f
|
#define CL_M_LN10_F 2.302585093f
|
||||||
#define CL_M_PI_F 3.14159274101257f
|
#define CL_M_PI_F 3.141592654f
|
||||||
#define CL_M_PI_2_F 1.57079637050629f
|
#define CL_M_PI_2_F 1.570796327f
|
||||||
#define CL_M_PI_4_F 0.78539818525314f
|
#define CL_M_PI_4_F 0.785398163f
|
||||||
#define CL_M_1_PI_F 0.31830987334251f
|
#define CL_M_1_PI_F 0.318309886f
|
||||||
#define CL_M_2_PI_F 0.63661974668503f
|
#define CL_M_2_PI_F 0.636619772f
|
||||||
#define CL_M_2_SQRTPI_F 1.12837922573090f
|
#define CL_M_2_SQRTPI_F 1.128379167f
|
||||||
#define CL_M_SQRT2_F 1.41421353816986f
|
#define CL_M_SQRT2_F 1.414213562f
|
||||||
#define CL_M_SQRT1_2_F 0.70710676908493f
|
#define CL_M_SQRT1_2_F 0.707106781f
|
||||||
|
|
||||||
#define CL_NAN (CL_INFINITY - CL_INFINITY)
|
#define CL_NAN (CL_INFINITY - CL_INFINITY)
|
||||||
#define CL_HUGE_VALF ((cl_float) 1e50)
|
#define CL_HUGE_VALF ((cl_float) 1e50)
|
||||||
@@ -290,9 +314,20 @@ typedef double cl_double __attribute__((aligned(8)));
|
|||||||
#define CL_FLT_MIN_10_EXP -37
|
#define CL_FLT_MIN_10_EXP -37
|
||||||
#define CL_FLT_MIN_EXP -125
|
#define CL_FLT_MIN_EXP -125
|
||||||
#define CL_FLT_RADIX 2
|
#define CL_FLT_RADIX 2
|
||||||
#define CL_FLT_MAX 0x1.fffffep127f
|
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
|
||||||
#define CL_FLT_MIN 0x1.0p-126f
|
#define CL_FLT_MIN 1.175494350822287507969e-38f
|
||||||
#define CL_FLT_EPSILON 0x1.0p-23f
|
#define CL_FLT_EPSILON 1.1920928955078125e-7f
|
||||||
|
|
||||||
|
#define CL_HALF_DIG 3
|
||||||
|
#define CL_HALF_MANT_DIG 11
|
||||||
|
#define CL_HALF_MAX_10_EXP +4
|
||||||
|
#define CL_HALF_MAX_EXP +16
|
||||||
|
#define CL_HALF_MIN_10_EXP -4
|
||||||
|
#define CL_HALF_MIN_EXP -13
|
||||||
|
#define CL_HALF_RADIX 2
|
||||||
|
#define CL_HALF_MAX 65504.0f
|
||||||
|
#define CL_HALF_MIN 6.103515625e-05f
|
||||||
|
#define CL_HALF_EPSILON 9.765625e-04f
|
||||||
|
|
||||||
#define CL_DBL_DIG 15
|
#define CL_DBL_DIG 15
|
||||||
#define CL_DBL_MANT_DIG 53
|
#define CL_DBL_MANT_DIG 53
|
||||||
@@ -301,37 +336,37 @@ typedef double cl_double __attribute__((aligned(8)));
|
|||||||
#define CL_DBL_MIN_10_EXP -307
|
#define CL_DBL_MIN_10_EXP -307
|
||||||
#define CL_DBL_MIN_EXP -1021
|
#define CL_DBL_MIN_EXP -1021
|
||||||
#define CL_DBL_RADIX 2
|
#define CL_DBL_RADIX 2
|
||||||
#define CL_DBL_MAX 0x1.fffffffffffffp1023
|
#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
|
||||||
#define CL_DBL_MIN 0x1.0p-1022
|
#define CL_DBL_MIN 2.225073858507201383090e-308
|
||||||
#define CL_DBL_EPSILON 0x1.0p-52
|
#define CL_DBL_EPSILON 2.220446049250313080847e-16
|
||||||
|
|
||||||
#define CL_M_E 2.718281828459045090796
|
#define CL_M_E 2.7182818284590452354
|
||||||
#define CL_M_LOG2E 1.442695040888963387005
|
#define CL_M_LOG2E 1.4426950408889634074
|
||||||
#define CL_M_LOG10E 0.434294481903251816668
|
#define CL_M_LOG10E 0.43429448190325182765
|
||||||
#define CL_M_LN2 0.693147180559945286227
|
#define CL_M_LN2 0.69314718055994530942
|
||||||
#define CL_M_LN10 2.302585092994045901094
|
#define CL_M_LN10 2.30258509299404568402
|
||||||
#define CL_M_PI 3.141592653589793115998
|
#define CL_M_PI 3.14159265358979323846
|
||||||
#define CL_M_PI_2 1.570796326794896557999
|
#define CL_M_PI_2 1.57079632679489661923
|
||||||
#define CL_M_PI_4 0.785398163397448278999
|
#define CL_M_PI_4 0.78539816339744830962
|
||||||
#define CL_M_1_PI 0.318309886183790691216
|
#define CL_M_1_PI 0.31830988618379067154
|
||||||
#define CL_M_2_PI 0.636619772367581382433
|
#define CL_M_2_PI 0.63661977236758134308
|
||||||
#define CL_M_2_SQRTPI 1.128379167095512558561
|
#define CL_M_2_SQRTPI 1.12837916709551257390
|
||||||
#define CL_M_SQRT2 1.414213562373095145475
|
#define CL_M_SQRT2 1.41421356237309504880
|
||||||
#define CL_M_SQRT1_2 0.707106781186547572737
|
#define CL_M_SQRT1_2 0.70710678118654752440
|
||||||
|
|
||||||
#define CL_M_E_F 2.71828174591064f
|
#define CL_M_E_F 2.718281828f
|
||||||
#define CL_M_LOG2E_F 1.44269502162933f
|
#define CL_M_LOG2E_F 1.442695041f
|
||||||
#define CL_M_LOG10E_F 0.43429449200630f
|
#define CL_M_LOG10E_F 0.434294482f
|
||||||
#define CL_M_LN2_F 0.69314718246460f
|
#define CL_M_LN2_F 0.693147181f
|
||||||
#define CL_M_LN10_F 2.30258512496948f
|
#define CL_M_LN10_F 2.302585093f
|
||||||
#define CL_M_PI_F 3.14159274101257f
|
#define CL_M_PI_F 3.141592654f
|
||||||
#define CL_M_PI_2_F 1.57079637050629f
|
#define CL_M_PI_2_F 1.570796327f
|
||||||
#define CL_M_PI_4_F 0.78539818525314f
|
#define CL_M_PI_4_F 0.785398163f
|
||||||
#define CL_M_1_PI_F 0.31830987334251f
|
#define CL_M_1_PI_F 0.318309886f
|
||||||
#define CL_M_2_PI_F 0.63661974668503f
|
#define CL_M_2_PI_F 0.636619772f
|
||||||
#define CL_M_2_SQRTPI_F 1.12837922573090f
|
#define CL_M_2_SQRTPI_F 1.128379167f
|
||||||
#define CL_M_SQRT2_F 1.41421353816986f
|
#define CL_M_SQRT2_F 1.414213562f
|
||||||
#define CL_M_SQRT1_2_F 0.70710676908493f
|
#define CL_M_SQRT1_2_F 0.707106781f
|
||||||
|
|
||||||
#if defined( __GNUC__ )
|
#if defined( __GNUC__ )
|
||||||
#define CL_HUGE_VALF __builtin_huge_valf()
|
#define CL_HUGE_VALF __builtin_huge_valf()
|
||||||
@@ -396,7 +431,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
#else
|
#else
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef float __cl_float4 __attribute__((vector_size(16)));
|
typedef float __cl_float4 __attribute__((vector_size(16)));
|
||||||
#else
|
#else
|
||||||
typedef __m128 __cl_float4;
|
typedef __m128 __cl_float4;
|
||||||
@@ -410,7 +445,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
#else
|
#else
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
|
typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
|
||||||
typedef cl_char __cl_char16 __attribute__((vector_size(16)));
|
typedef cl_char __cl_char16 __attribute__((vector_size(16)));
|
||||||
typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
|
typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
|
||||||
@@ -444,7 +479,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
|
|
||||||
#if defined( __MMX__ )
|
#if defined( __MMX__ )
|
||||||
#include <mmintrin.h>
|
#include <mmintrin.h>
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
|
typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
|
||||||
typedef cl_char __cl_char8 __attribute__((vector_size(8)));
|
typedef cl_char __cl_char8 __attribute__((vector_size(8)));
|
||||||
typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
|
typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
|
||||||
@@ -482,7 +517,7 @@ typedef unsigned int cl_GLenum;
|
|||||||
#else
|
#else
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined( __GNUC__ ) && !defined( __ICC )
|
#if defined( __GNUC__ )
|
||||||
typedef cl_float __cl_float8 __attribute__((vector_size(32)));
|
typedef cl_float __cl_float8 __attribute__((vector_size(32)));
|
||||||
typedef cl_double __cl_double4 __attribute__((vector_size(32)));
|
typedef cl_double __cl_double4 __attribute__((vector_size(32)));
|
||||||
#else
|
#else
|
||||||
@@ -494,25 +529,30 @@ typedef unsigned int cl_GLenum;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define capabilities for anonymous struct members. */
|
/* Define capabilities for anonymous struct members. */
|
||||||
#if (defined( __GNUC__ ) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
|
#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||||
#define __CL_HAS_ANON_STRUCT__ 1
|
|
||||||
#define __CL_ANON_STRUCT__ __extension__
|
|
||||||
#elif defined( _WIN32) && (_MSC_VER >= 1500)
|
|
||||||
/* Microsoft Developer Studio 2008 supports anonymous structs, but
|
|
||||||
* complains by default. */
|
|
||||||
#define __CL_HAS_ANON_STRUCT__ 1
|
#define __CL_HAS_ANON_STRUCT__ 1
|
||||||
#define __CL_ANON_STRUCT__
|
#define __CL_ANON_STRUCT__
|
||||||
|
#elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
|
||||||
|
#define __CL_HAS_ANON_STRUCT__ 1
|
||||||
|
#define __CL_ANON_STRUCT__ __extension__
|
||||||
|
#elif defined( _WIN32) && defined(_MSC_VER)
|
||||||
|
#if _MSC_VER >= 1500
|
||||||
|
/* Microsoft Developer Studio 2008 supports anonymous structs, but
|
||||||
|
* complains by default. */
|
||||||
|
#define __CL_HAS_ANON_STRUCT__ 1
|
||||||
|
#define __CL_ANON_STRUCT__
|
||||||
/* Disable warning C4201: nonstandard extension used : nameless
|
/* Disable warning C4201: nonstandard extension used : nameless
|
||||||
* struct/union */
|
* struct/union */
|
||||||
#pragma warning( push )
|
#pragma warning( push )
|
||||||
#pragma warning( disable : 4201 )
|
#pragma warning( disable : 4201 )
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define __CL_HAS_ANON_STRUCT__ 0
|
#define __CL_HAS_ANON_STRUCT__ 0
|
||||||
#define __CL_ANON_STRUCT__
|
#define __CL_ANON_STRUCT__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define alignment keys */
|
/* Define alignment keys */
|
||||||
#if (defined( __GNUC__ ) || defined( __IBMC__ ))
|
#if defined( __GNUC__ )
|
||||||
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
|
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
|
||||||
#elif defined( _WIN32) && (_MSC_VER)
|
#elif defined( _WIN32) && (_MSC_VER)
|
||||||
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
|
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
|
||||||
@@ -834,6 +874,81 @@ typedef union
|
|||||||
#endif
|
#endif
|
||||||
}cl_ushort16;
|
}cl_ushort16;
|
||||||
|
|
||||||
|
|
||||||
|
/* ---- cl_halfn ---- */
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(4) s[2];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2;
|
||||||
|
#endif
|
||||||
|
}cl_half2;
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(8) s[4];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2[2];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF4__)
|
||||||
|
__cl_half4 v4;
|
||||||
|
#endif
|
||||||
|
}cl_half4;
|
||||||
|
|
||||||
|
/* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
|
||||||
|
typedef cl_half4 cl_half3;
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(16) s[8];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2[4];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF4__)
|
||||||
|
__cl_half4 v4[2];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF8__ )
|
||||||
|
__cl_half8 v8;
|
||||||
|
#endif
|
||||||
|
}cl_half8;
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
cl_half CL_ALIGNED(32) s[16];
|
||||||
|
#if __CL_HAS_ANON_STRUCT__
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||||
|
__CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; };
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF2__)
|
||||||
|
__cl_half2 v2[8];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF4__)
|
||||||
|
__cl_half4 v4[4];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF8__ )
|
||||||
|
__cl_half8 v8[2];
|
||||||
|
#endif
|
||||||
|
#if defined( __CL_HALF16__ )
|
||||||
|
__cl_half16 v16;
|
||||||
|
#endif
|
||||||
|
}cl_half16;
|
||||||
|
|
||||||
/* ---- cl_intn ---- */
|
/* ---- cl_intn ---- */
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
@@ -1313,8 +1428,10 @@ typedef union
|
|||||||
|
|
||||||
#undef __CL_HAS_ANON_STRUCT__
|
#undef __CL_HAS_ANON_STRUCT__
|
||||||
#undef __CL_ANON_STRUCT__
|
#undef __CL_ANON_STRUCT__
|
||||||
#if defined( _WIN32) && (_MSC_VER >= 1500)
|
#if defined( _WIN32) && defined(_MSC_VER)
|
||||||
#pragma warning( pop )
|
#if _MSC_VER >=1500
|
||||||
|
#pragma warning( pop )
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __CL_PLATFORM_H */
|
#endif /* __CL_PLATFORM_H */
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008-2013 The Khronos Group Inc.
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and/or associated documentation files (the
|
* copy of this software and/or associated documentation files (the
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
* The above copyright notice and this permission notice shall be included
|
* The above copyright notice and this permission notice shall be included
|
||||||
* in all copies or substantial portions of the Materials.
|
* in all copies or substantial portions of the Materials.
|
||||||
*
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012 The Khronos Group Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* NOTICE TO KHRONOS MEMBER:
|
|
||||||
*
|
|
||||||
* AMD has assigned the copyright for this object code to Khronos.
|
|
||||||
* This object code is subject to Khronos ownership rights under U.S. and
|
|
||||||
* international Copyright laws.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any Khronos Member
|
|
||||||
* obtaining a copy of this software and/or associated documentation files
|
|
||||||
* (the "Materials"), to use, copy, modify and merge the Materials in object
|
|
||||||
* form only and to publish, distribute and/or sell copies of the Materials
|
|
||||||
* solely in object code form as part of conformant OpenCL API implementations,
|
|
||||||
* subject to the following conditions:
|
|
||||||
*
|
|
||||||
* Khronos Members shall ensure that their respective ICD implementation,
|
|
||||||
* that is installed over another Khronos Members' ICD implementation, will
|
|
||||||
* continue to support all OpenCL devices (hardware and software) supported
|
|
||||||
* by the replaced ICD implementation. For the purposes of this notice, "ICD"
|
|
||||||
* shall mean a library that presents an implementation of the OpenCL API for
|
|
||||||
* the purpose routing API calls to different vendor implementation.
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Materials.
|
|
||||||
*
|
|
||||||
* KHRONOS AND AMD MAKE NO REPRESENTATION ABOUT THE SUITABILITY OF THIS
|
|
||||||
* SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
|
|
||||||
* IMPLIED WARRANTY OF ANY KIND. KHRONOS AND AMD DISCLAIM ALL WARRANTIES
|
|
||||||
* WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
* IN NO EVENT SHALL KHRONOS OR AMD BE LIABLE FOR ANY SPECIAL, INDIRECT,
|
|
||||||
* INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
|
||||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
|
||||||
* THE USE OR PERFORMANCE OF THIS SOURCE CODE.
|
|
||||||
*
|
|
||||||
* U.S. Government End Users. This source code is a "commercial item" as
|
|
||||||
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
|
|
||||||
* "commercial computer software" and "commercial computer software
|
|
||||||
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
|
|
||||||
* and is provided to the U.S. Government only as a commercial end item.
|
|
||||||
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
|
|
||||||
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
|
|
||||||
* source code with only those rights set forth herein.
|
|
||||||
*/
|
|
||||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
|
||||||
#ifndef __SPIR_H
|
|
||||||
#define __SPIR_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
// CLS is for CL SPIR.
|
|
||||||
typedef enum {
|
|
||||||
CLS_PRIVATE_AS = 0,
|
|
||||||
CLS_GLOBAL_AS = 1,
|
|
||||||
CLS_CONSTANT_AS = 2,
|
|
||||||
CLS_LOCAL_AS = 3,
|
|
||||||
CLS_GLOBAL_HOST_AS = 4,
|
|
||||||
CLS_CONSTANT_HOST_AS = 5,
|
|
||||||
CLS_REGION_AS_AMD = 16,
|
|
||||||
} CLS_ADDRESS_SPACES;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_ADDRESS_MIRRORED_REPEAT = 0,
|
|
||||||
CLS_ADDRESS_REPEAT = 1,
|
|
||||||
CLS_ADDRESS_CLAMP_TO_EDGE = 2,
|
|
||||||
CLS_ADDRESS_CLAMP = 3,
|
|
||||||
CLS_ADDRESS_NONE = 4
|
|
||||||
} CLS_ADDRESSING_MODES;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_FILTER_NEAREST = 0,
|
|
||||||
CLS_FILTER_LINEAR = 1
|
|
||||||
} CLS_FILTER_MODE;
|
|
||||||
|
|
||||||
// Table 13
|
|
||||||
typedef enum {
|
|
||||||
CLS_NORMALIZED_COORDS_TRUE = 0,
|
|
||||||
CLS_NORMALIZED_COORDS_FALSE = 1
|
|
||||||
} CLS_NORMALIZED_COORDS;
|
|
||||||
|
|
||||||
// Section 2.3
|
|
||||||
typedef enum {
|
|
||||||
CLS_READ_ONLY = 0,
|
|
||||||
CLS_WRITE_ONLY = 1,
|
|
||||||
CLS_READ_WRITE = 2,
|
|
||||||
CLS_NONE = 3
|
|
||||||
} CLS_ACCESS_QUALIFIERS;
|
|
||||||
|
|
||||||
// Table 14
|
|
||||||
typedef enum {
|
|
||||||
CLS_ARG_CONST = 1,
|
|
||||||
CLS_ARG_RESTRICT = 2,
|
|
||||||
CLS_ARG_VOLATILE = 4,
|
|
||||||
CLS_ARG_NONE = 0,
|
|
||||||
CLS_ARG_MASK = 0xf,
|
|
||||||
CLS_ARG_PIPE = 8
|
|
||||||
} CLS_ARGTYPE_QUALIFIERS;
|
|
||||||
|
|
||||||
static const char* SPIR_TRIPLE_32BIT = "spir-unknown-unknown";
|
|
||||||
static const char* SPIR_TRIPLE_64BIT = "spir64-unknown-unknown";
|
|
||||||
static const char* SPIR_DATA_LAYOUT_32BIT = "p:32:32:32-i1:8:8-i8:8:8"
|
|
||||||
"-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16"
|
|
||||||
"-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
|
|
||||||
"-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024";
|
|
||||||
static const char* SPIR_DATA_LAYOUT_64BIT = "p:64:64:64-i1:8:8-i8:8:8"
|
|
||||||
"-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16"
|
|
||||||
"-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
|
|
||||||
"-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024";
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif // __SPIR_H
|
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,131 @@
|
|||||||
|
/**********************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
**********************************************************************************/
|
||||||
|
|
||||||
|
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||||
|
|
||||||
|
#ifndef __OPENCL_CL_D3D10_H
|
||||||
|
#define __OPENCL_CL_D3D10_H
|
||||||
|
|
||||||
|
#include <d3d10.h>
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#include <CL/cl_platform.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* cl_khr_d3d10_sharing */
|
||||||
|
#define cl_khr_d3d10_sharing 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_d3d10_device_source_khr;
|
||||||
|
typedef cl_uint cl_d3d10_device_set_khr;
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/* Error Codes */
|
||||||
|
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
||||||
|
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
||||||
|
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
||||||
|
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
||||||
|
|
||||||
|
/* cl_d3d10_device_source_nv */
|
||||||
|
#define CL_D3D10_DEVICE_KHR 0x4010
|
||||||
|
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
||||||
|
|
||||||
|
/* cl_d3d10_device_set_nv */
|
||||||
|
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
||||||
|
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
||||||
|
|
||||||
|
/* cl_context_info */
|
||||||
|
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
||||||
|
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
||||||
|
|
||||||
|
/* cl_mem_info */
|
||||||
|
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
||||||
|
|
||||||
|
/* cl_image_info */
|
||||||
|
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
||||||
|
|
||||||
|
/* cl_command_type */
|
||||||
|
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
||||||
|
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
|
||||||
|
cl_platform_id platform,
|
||||||
|
cl_d3d10_device_source_khr d3d_device_source,
|
||||||
|
void * d3d_object,
|
||||||
|
cl_d3d10_device_set_khr d3d_device_set,
|
||||||
|
cl_uint num_entries,
|
||||||
|
cl_device_id * devices,
|
||||||
|
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
ID3D10Buffer * resource,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
ID3D10Texture2D * resource,
|
||||||
|
UINT subresource,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
ID3D10Texture3D * resource,
|
||||||
|
UINT subresource,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_CL_D3D10_H */
|
||||||
|
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
/**********************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
**********************************************************************************/
|
||||||
|
|
||||||
|
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||||
|
|
||||||
|
#ifndef __OPENCL_CL_D3D11_H
|
||||||
|
#define __OPENCL_CL_D3D11_H
|
||||||
|
|
||||||
|
#include <d3d11.h>
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#include <CL/cl_platform.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* cl_khr_d3d11_sharing */
|
||||||
|
#define cl_khr_d3d11_sharing 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_d3d11_device_source_khr;
|
||||||
|
typedef cl_uint cl_d3d11_device_set_khr;
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/* Error Codes */
|
||||||
|
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
||||||
|
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
||||||
|
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
||||||
|
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
||||||
|
|
||||||
|
/* cl_d3d11_device_source */
|
||||||
|
#define CL_D3D11_DEVICE_KHR 0x4019
|
||||||
|
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
||||||
|
|
||||||
|
/* cl_d3d11_device_set */
|
||||||
|
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
||||||
|
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
||||||
|
|
||||||
|
/* cl_context_info */
|
||||||
|
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
||||||
|
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
||||||
|
|
||||||
|
/* cl_mem_info */
|
||||||
|
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
||||||
|
|
||||||
|
/* cl_image_info */
|
||||||
|
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
||||||
|
|
||||||
|
/* cl_command_type */
|
||||||
|
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
||||||
|
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
|
||||||
|
cl_platform_id platform,
|
||||||
|
cl_d3d11_device_source_khr d3d_device_source,
|
||||||
|
void * d3d_object,
|
||||||
|
cl_d3d11_device_set_khr d3d_device_set,
|
||||||
|
cl_uint num_entries,
|
||||||
|
cl_device_id * devices,
|
||||||
|
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
ID3D11Buffer * resource,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
ID3D11Texture2D * resource,
|
||||||
|
UINT subresource,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
ID3D11Texture3D * resource,
|
||||||
|
UINT subresource,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_CL_D3D11_H */
|
||||||
|
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
/**********************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
**********************************************************************************/
|
||||||
|
|
||||||
|
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||||
|
|
||||||
|
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||||
|
#define __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||||
|
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#include <CL/cl_platform.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* cl_khr_dx9_media_sharing */
|
||||||
|
#define cl_khr_dx9_media_sharing 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_dx9_media_adapter_type_khr;
|
||||||
|
typedef cl_uint cl_dx9_media_adapter_set_khr;
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#include <d3d9.h>
|
||||||
|
typedef struct _cl_dx9_surface_info_khr
|
||||||
|
{
|
||||||
|
IDirect3DSurface9 *resource;
|
||||||
|
HANDLE shared_handle;
|
||||||
|
} cl_dx9_surface_info_khr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/* Error Codes */
|
||||||
|
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
||||||
|
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
||||||
|
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
||||||
|
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
||||||
|
|
||||||
|
/* cl_media_adapter_type_khr */
|
||||||
|
#define CL_ADAPTER_D3D9_KHR 0x2020
|
||||||
|
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
||||||
|
#define CL_ADAPTER_DXVA_KHR 0x2022
|
||||||
|
|
||||||
|
/* cl_media_adapter_set_khr */
|
||||||
|
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
||||||
|
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
||||||
|
|
||||||
|
/* cl_context_info */
|
||||||
|
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
||||||
|
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
||||||
|
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
||||||
|
|
||||||
|
/* cl_mem_info */
|
||||||
|
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
||||||
|
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
||||||
|
|
||||||
|
/* cl_image_info */
|
||||||
|
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
||||||
|
|
||||||
|
/* cl_command_type */
|
||||||
|
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
||||||
|
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
|
||||||
|
cl_platform_id platform,
|
||||||
|
cl_uint num_media_adapters,
|
||||||
|
cl_dx9_media_adapter_type_khr * media_adapter_type,
|
||||||
|
void * media_adapters,
|
||||||
|
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||||
|
cl_uint num_entries,
|
||||||
|
cl_device_id * devices,
|
||||||
|
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
cl_dx9_media_adapter_type_khr adapter_type,
|
||||||
|
void * surface_info,
|
||||||
|
cl_uint plane,
|
||||||
|
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */
|
||||||
|
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __OPENCL_CL_EGL_H
|
||||||
|
#define __OPENCL_CL_EGL_H
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
#else
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
|
||||||
|
#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
|
||||||
|
#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
|
||||||
|
#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
|
||||||
|
|
||||||
|
/* Error type for clCreateFromEGLImageKHR */
|
||||||
|
#define CL_INVALID_EGL_OBJECT_KHR -1093
|
||||||
|
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
|
||||||
|
|
||||||
|
/* CLeglImageKHR is an opaque handle to an EGLImage */
|
||||||
|
typedef void* CLeglImageKHR;
|
||||||
|
|
||||||
|
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
|
||||||
|
typedef void* CLeglDisplayKHR;
|
||||||
|
|
||||||
|
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
|
||||||
|
typedef void* CLeglSyncKHR;
|
||||||
|
|
||||||
|
/* properties passed to clCreateFromEGLImageKHR */
|
||||||
|
typedef intptr_t cl_egl_image_properties_khr;
|
||||||
|
|
||||||
|
|
||||||
|
#define cl_khr_egl_image 1
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clCreateFromEGLImageKHR(cl_context /* context */,
|
||||||
|
CLeglDisplayKHR /* egldisplay */,
|
||||||
|
CLeglImageKHR /* eglimage */,
|
||||||
|
cl_mem_flags /* flags */,
|
||||||
|
const cl_egl_image_properties_khr * /* properties */,
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
CLeglDisplayKHR egldisplay,
|
||||||
|
CLeglImageKHR eglimage,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
const cl_egl_image_properties_khr * properties,
|
||||||
|
cl_int * errcode_ret);
|
||||||
|
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event);
|
||||||
|
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
|
||||||
|
cl_command_queue command_queue,
|
||||||
|
cl_uint num_objects,
|
||||||
|
const cl_mem * mem_objects,
|
||||||
|
cl_uint num_events_in_wait_list,
|
||||||
|
const cl_event * event_wait_list,
|
||||||
|
cl_event * event);
|
||||||
|
|
||||||
|
|
||||||
|
#define cl_khr_egl_event 1
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||||
|
clCreateEventFromEGLSyncKHR(cl_context /* context */,
|
||||||
|
CLeglSyncKHR /* sync */,
|
||||||
|
CLeglDisplayKHR /* display */,
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
|
||||||
|
cl_context context,
|
||||||
|
CLeglSyncKHR sync,
|
||||||
|
CLeglDisplayKHR display,
|
||||||
|
cl_int * errcode_ret);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_CL_EGL_H */
|
||||||
@@ -0,0 +1,821 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
|
||||||
|
|
||||||
|
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||||
|
/* (OpenGL, D3D) dependencies. */
|
||||||
|
|
||||||
|
#ifndef __CL_EXT_H
|
||||||
|
#define __CL_EXT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <OpenCL/cl.h>
|
||||||
|
#include <AvailabilityMacros.h>
|
||||||
|
#else
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||||
|
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||||
|
|
||||||
|
/* Memory object destruction
|
||||||
|
*
|
||||||
|
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
|
||||||
|
*
|
||||||
|
* Registers a user callback function that will be called when the memory object is deleted and its resources
|
||||||
|
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
|
||||||
|
* stack associated with memobj. The registered user callback functions are called in the reverse order in
|
||||||
|
* which they were registered. The user callback functions are called and then the memory object is deleted
|
||||||
|
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
|
||||||
|
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
|
||||||
|
* the storage bits for the memory object, can be reused or freed.
|
||||||
|
*
|
||||||
|
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
|
||||||
|
*
|
||||||
|
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||||
|
* before using.
|
||||||
|
*/
|
||||||
|
#define cl_APPLE_SetMemObjectDestructor 1
|
||||||
|
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */,
|
||||||
|
void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
|
||||||
|
void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
/* Context Logging Functions
|
||||||
|
*
|
||||||
|
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
|
||||||
|
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||||
|
* before using.
|
||||||
|
*
|
||||||
|
* clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger
|
||||||
|
*/
|
||||||
|
#define cl_APPLE_ContextLoggingFunctions 1
|
||||||
|
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */,
|
||||||
|
const void * /* private_info */,
|
||||||
|
size_t /* cb */,
|
||||||
|
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
|
||||||
|
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */,
|
||||||
|
const void * /* private_info */,
|
||||||
|
size_t /* cb */,
|
||||||
|
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
|
||||||
|
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */,
|
||||||
|
const void * /* private_info */,
|
||||||
|
size_t /* cb */,
|
||||||
|
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
/************************
|
||||||
|
* cl_khr_icd extension *
|
||||||
|
************************/
|
||||||
|
#define cl_khr_icd 1
|
||||||
|
|
||||||
|
/* cl_platform_info */
|
||||||
|
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||||
|
|
||||||
|
/* Additional Error Codes */
|
||||||
|
#define CL_PLATFORM_NOT_FOUND_KHR -1001
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clIcdGetPlatformIDsKHR(cl_uint /* num_entries */,
|
||||||
|
cl_platform_id * /* platforms */,
|
||||||
|
cl_uint * /* num_platforms */);
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(
|
||||||
|
cl_uint /* num_entries */,
|
||||||
|
cl_platform_id * /* platforms */,
|
||||||
|
cl_uint * /* num_platforms */);
|
||||||
|
|
||||||
|
|
||||||
|
/* Extension: cl_khr_image2D_buffer
|
||||||
|
*
|
||||||
|
* This extension allows a 2D image to be created from a cl_mem buffer without a copy.
|
||||||
|
* The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t.
|
||||||
|
* Both the sampler and sampler-less read_image built-in functions are supported for 2D images
|
||||||
|
* and 2D images created from a buffer. Similarly, the write_image built-ins are also supported
|
||||||
|
* for 2D images created from a buffer.
|
||||||
|
*
|
||||||
|
* When the 2D image from buffer is created, the client must specify the width,
|
||||||
|
* height, image format (i.e. channel order and channel data type) and optionally the row pitch
|
||||||
|
*
|
||||||
|
* The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels.
|
||||||
|
* The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*************************************
|
||||||
|
* cl_khr_initalize_memory extension *
|
||||||
|
*************************************/
|
||||||
|
|
||||||
|
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************
|
||||||
|
* cl_khr_terminate_context extension *
|
||||||
|
**************************************/
|
||||||
|
|
||||||
|
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
|
||||||
|
#define CL_CONTEXT_TERMINATE_KHR 0x2032
|
||||||
|
|
||||||
|
#define cl_khr_terminate_context 1
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extension: cl_khr_spir
|
||||||
|
*
|
||||||
|
* This extension adds support to create an OpenCL program object from a
|
||||||
|
* Standard Portable Intermediate Representation (SPIR) instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||||
|
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_nv_device_attribute_query extension *
|
||||||
|
******************************************/
|
||||||
|
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
|
||||||
|
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||||
|
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
|
||||||
|
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
|
||||||
|
#define CL_DEVICE_WARP_SIZE_NV 0x4003
|
||||||
|
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
|
||||||
|
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
|
||||||
|
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_amd_device_memory_flags *
|
||||||
|
*********************************/
|
||||||
|
#define cl_amd_device_memory_flags 1
|
||||||
|
#define CL_MEM_USE_PERSISTENT_MEM_AMD (1 << 6) // Alloc from GPU's CPU visible heap
|
||||||
|
|
||||||
|
/* cl_device_info */
|
||||||
|
#define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_amd_device_attribute_query *
|
||||||
|
*********************************/
|
||||||
|
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
|
||||||
|
#define CL_DEVICE_TOPOLOGY_AMD 0x4037
|
||||||
|
#define CL_DEVICE_BOARD_NAME_AMD 0x4038
|
||||||
|
#define CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 0x4039
|
||||||
|
#define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
|
||||||
|
#define CL_DEVICE_SIMD_WIDTH_AMD 0x4041
|
||||||
|
#define CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 0x4042
|
||||||
|
#define CL_DEVICE_WAVEFRONT_WIDTH_AMD 0x4043
|
||||||
|
#define CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD 0x4044
|
||||||
|
#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD 0x4045
|
||||||
|
#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD 0x4046
|
||||||
|
#define CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD 0x4047
|
||||||
|
#define CL_DEVICE_LOCAL_MEM_BANKS_AMD 0x4048
|
||||||
|
#define CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD 0x4049
|
||||||
|
#define CL_DEVICE_GFXIP_MAJOR_AMD 0x404A
|
||||||
|
#define CL_DEVICE_GFXIP_MINOR_AMD 0x404B
|
||||||
|
#define CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD 0x404C
|
||||||
|
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
struct { cl_uint type; cl_uint data[5]; } raw;
|
||||||
|
struct { cl_uint type; cl_uchar unused[17]; cl_uchar bus; cl_uchar device; cl_uchar function; } pcie;
|
||||||
|
} cl_device_topology_amd;
|
||||||
|
|
||||||
|
#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
||||||
|
|
||||||
|
/**************************
|
||||||
|
* cl_amd_offline_devices *
|
||||||
|
**************************/
|
||||||
|
#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
|
||||||
|
|
||||||
|
/********************************
|
||||||
|
* cl_amd_bus_addressable_memory *
|
||||||
|
********************************/
|
||||||
|
|
||||||
|
/* cl_mem flag - bitfield */
|
||||||
|
#define CL_MEM_BUS_ADDRESSABLE_AMD (1<<30)
|
||||||
|
#define CL_MEM_EXTERNAL_PHYSICAL_AMD (1<<31)
|
||||||
|
|
||||||
|
#define CL_COMMAND_WAIT_SIGNAL_AMD 0x4080
|
||||||
|
#define CL_COMMAND_WRITE_SIGNAL_AMD 0x4081
|
||||||
|
#define CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD 0x4082
|
||||||
|
|
||||||
|
typedef struct _cl_bus_address_amd
|
||||||
|
{
|
||||||
|
cl_ulong surface_bus_address;
|
||||||
|
cl_ulong marker_bus_address;
|
||||||
|
} cl_bus_address_amd;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWaitSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*mem_object*/,
|
||||||
|
cl_uint /*value*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWriteSignalAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*mem_object*/,
|
||||||
|
cl_uint /*value*/,
|
||||||
|
cl_ulong /*offset*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueMakeBuffersResidentAMD_fn)( cl_command_queue /*command_queue*/,
|
||||||
|
cl_uint /*num_mem_objs*/,
|
||||||
|
cl_mem * /*mem_objects*/,
|
||||||
|
cl_bool /*blocking_make_resident*/,
|
||||||
|
cl_bus_address_amd * /*bus_addresses*/,
|
||||||
|
cl_uint /*num_events*/,
|
||||||
|
const cl_event * /*event_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* cl_amd_liquid_flash *
|
||||||
|
***********************/
|
||||||
|
#define cl_amd_liquid_flash 1
|
||||||
|
|
||||||
|
#define CL_COMMAND_READ_SSG_FILE_AMD 0x4083
|
||||||
|
#define CL_COMMAND_WRITE_SSG_FILE_AMD 0x4087
|
||||||
|
|
||||||
|
#define CL_INVALID_FILE_OBJECT_AMD 0x4084
|
||||||
|
|
||||||
|
typedef struct _cl_file_amd * cl_file_amd;
|
||||||
|
|
||||||
|
typedef cl_uint cl_file_flags_amd;
|
||||||
|
#define CL_FILE_READ_ONLY_AMD (1 << 0)
|
||||||
|
#define CL_FILE_WRITE_ONLY_AMD (1 << 1)
|
||||||
|
#define CL_FILE_READ_WRITE_AMD (1 << 2)
|
||||||
|
|
||||||
|
typedef cl_uint cl_file_info_amd;
|
||||||
|
#define CL_FILE_BLOCK_SIZE_AMD 0x4085
|
||||||
|
#define CL_FILE_SIZE_AMD 0x4086
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_file_amd
|
||||||
|
(CL_API_CALL * clCreateSsgFileObjectAMD_fn)(cl_context /*context*/,
|
||||||
|
cl_file_flags_amd /*flags*/,
|
||||||
|
const wchar_t * /*file_name*/,
|
||||||
|
cl_int * /*errcode_ret*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clGetSsgFileObjectInfoAMD_fn)(cl_file_amd /* file */,
|
||||||
|
cl_file_info_amd /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
void * /* param_value */,
|
||||||
|
size_t * /* param_value_size_ret */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clRetainSsgFileObjectAMD_fn)( cl_file_amd /*file*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clReleaseSsgFileObjectAMD_fn)( cl_file_amd /*file*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueReadSsgFileAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*buffer*/,
|
||||||
|
cl_bool /*blocking_write*/,
|
||||||
|
size_t /*buffer_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_file_amd /*file*/,
|
||||||
|
size_t /*file_offset*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueWriteSsgFileAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*buffer*/,
|
||||||
|
cl_bool /*blocking_read*/,
|
||||||
|
size_t /*buffer_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_file_amd /*file*/,
|
||||||
|
size_t /*file_offset*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event * /*event_wait_list*/,
|
||||||
|
cl_event * /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
/*************************
|
||||||
|
* cl_amd_copy_buffer_p2p *
|
||||||
|
**************************/
|
||||||
|
#define CL_DEVICE_NUM_P2P_DEVICES_AMD 0x4088
|
||||||
|
#define CL_DEVICE_P2P_DEVICES_AMD 0x4089
|
||||||
|
|
||||||
|
#define cl_amd_copy_buffer_p2p 1
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL * clEnqueueCopyBufferP2PAMD_fn)(cl_command_queue /*command_queue*/,
|
||||||
|
cl_mem /*src_buffer*/,
|
||||||
|
cl_mem /*dst_buffer*/,
|
||||||
|
size_t /*src_offset*/,
|
||||||
|
size_t /*dst_offset*/,
|
||||||
|
size_t /*cb*/,
|
||||||
|
cl_uint /*num_events_in_wait_list*/,
|
||||||
|
const cl_event* /*event_wait_list*/,
|
||||||
|
cl_event* /*event*/) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
// <amd_internal>
|
||||||
|
/***************************
|
||||||
|
* cl_amd_command_intercept *
|
||||||
|
***************************/
|
||||||
|
#define CL_CONTEXT_COMMAND_INTERCEPT_CALLBACK_AMD 0x403D
|
||||||
|
#define CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD (1ull << 63)
|
||||||
|
|
||||||
|
typedef cl_int (CL_CALLBACK * intercept_callback_fn)(cl_event, cl_int *);
|
||||||
|
|
||||||
|
/**************************
|
||||||
|
* cl_amd_command_queue_info *
|
||||||
|
**************************/
|
||||||
|
#define CL_QUEUE_THREAD_HANDLE_AMD 0x403E
|
||||||
|
|
||||||
|
/* cl_kernel_exec_info for DVR DOPP texture support */
|
||||||
|
#define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120
|
||||||
|
#define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121
|
||||||
|
|
||||||
|
/*************************
|
||||||
|
* cl_amd_object_metadata *
|
||||||
|
**************************/
|
||||||
|
#define cl_amd_object_metadata 1
|
||||||
|
|
||||||
|
typedef size_t cl_key_amd;
|
||||||
|
|
||||||
|
#define CL_INVALID_OBJECT_AMD 0x403A
|
||||||
|
#define CL_INVALID_KEY_AMD 0x403B
|
||||||
|
#define CL_PLATFORM_MAX_KEYS_AMD 0x403C
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)(
|
||||||
|
cl_platform_id /* platform */,
|
||||||
|
void (CL_CALLBACK * /* destructor */)( void* /* old_value */),
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
||||||
|
void * /* object */,
|
||||||
|
cl_key_amd /* key */,
|
||||||
|
void * /* value */) CL_API_SUFFIX__VERSION_1_1;
|
||||||
|
// </amd_internal>
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_arm_printf extension
|
||||||
|
*********************************/
|
||||||
|
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||||
|
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_1
|
||||||
|
/***********************************
|
||||||
|
* cl_ext_device_fission extension *
|
||||||
|
***********************************/
|
||||||
|
#define cl_ext_device_fission 1
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef cl_ulong cl_device_partition_property_ext;
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clCreateSubDevicesEXT( cl_device_id /*in_device*/,
|
||||||
|
const cl_device_partition_property_ext * /* properties */,
|
||||||
|
cl_uint /*num_entries*/,
|
||||||
|
cl_device_id * /*out_devices*/,
|
||||||
|
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/,
|
||||||
|
const cl_device_partition_property_ext * /* properties */,
|
||||||
|
cl_uint /*num_entries*/,
|
||||||
|
cl_device_id * /*out_devices*/,
|
||||||
|
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
/* cl_device_partition_property_ext */
|
||||||
|
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||||
|
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||||
|
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||||
|
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||||
|
|
||||||
|
/* clDeviceGetInfo selectors */
|
||||||
|
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||||
|
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||||
|
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||||
|
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||||
|
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||||
|
|
||||||
|
/* clGetImageInfo enum */
|
||||||
|
#define CL_IMAGE_BYTE_PITCH_AMD 0x4059
|
||||||
|
|
||||||
|
/* error codes */
|
||||||
|
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||||
|
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||||
|
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||||
|
|
||||||
|
/* CL_AFFINITY_DOMAINs */
|
||||||
|
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||||
|
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||||
|
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||||
|
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||||
|
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||||
|
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||||
|
|
||||||
|
/* cl_device_partition_property_ext list terminators */
|
||||||
|
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
|
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||||
|
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_qcom_ext_host_ptr extension
|
||||||
|
*********************************/
|
||||||
|
|
||||||
|
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||||
|
|
||||||
|
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||||
|
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
||||||
|
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
||||||
|
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
||||||
|
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
||||||
|
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
||||||
|
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
||||||
|
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
||||||
|
|
||||||
|
typedef cl_uint cl_image_pitch_info_qcom;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetDeviceImageInfoQCOM(cl_device_id device,
|
||||||
|
size_t image_width,
|
||||||
|
size_t image_height,
|
||||||
|
const cl_image_format *image_format,
|
||||||
|
cl_image_pitch_info_qcom param_name,
|
||||||
|
size_t param_value_size,
|
||||||
|
void *param_value,
|
||||||
|
size_t *param_value_size_ret);
|
||||||
|
|
||||||
|
typedef struct _cl_mem_ext_host_ptr
|
||||||
|
{
|
||||||
|
/* Type of external memory allocation. */
|
||||||
|
/* Legal values will be defined in layered extensions. */
|
||||||
|
cl_uint allocation_type;
|
||||||
|
|
||||||
|
/* Host cache policy for this external memory allocation. */
|
||||||
|
cl_uint host_cache_policy;
|
||||||
|
|
||||||
|
} cl_mem_ext_host_ptr;
|
||||||
|
|
||||||
|
/*********************************
|
||||||
|
* cl_qcom_ion_host_ptr extension
|
||||||
|
*********************************/
|
||||||
|
|
||||||
|
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
||||||
|
|
||||||
|
typedef struct _cl_mem_ion_host_ptr
|
||||||
|
{
|
||||||
|
/* Type of external memory allocation. */
|
||||||
|
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||||
|
cl_mem_ext_host_ptr ext_host_ptr;
|
||||||
|
|
||||||
|
/* ION file descriptor */
|
||||||
|
int ion_filedesc;
|
||||||
|
|
||||||
|
/* Host pointer to the ION allocated memory */
|
||||||
|
void* ion_hostptr;
|
||||||
|
|
||||||
|
} cl_mem_ion_host_ptr;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_1 */
|
||||||
|
|
||||||
|
#if defined(CL_VERSION_1_2)
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_img_yuv_image extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
/* Image formats used in clCreateImage */
|
||||||
|
#define CL_NV21_IMG 0x40D0
|
||||||
|
#define CL_YV12_IMG 0x40D1
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_img_cached_allocations extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
/* Flag values used by clCreteBuffer */
|
||||||
|
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||||
|
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_img_use_gralloc_ptr extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
/* Flag values used by clCreteBuffer */
|
||||||
|
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||||
|
|
||||||
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||||
|
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||||
|
|
||||||
|
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||||
|
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_2_0
|
||||||
|
/*********************************
|
||||||
|
* cl_khr_subgroups extension
|
||||||
|
*********************************/
|
||||||
|
#define cl_khr_subgroups 1
|
||||||
|
|
||||||
|
/* cl_kernel_sub_group_info is declared in CL.h. */
|
||||||
|
|
||||||
|
/* cl_kernel_sub_group_info */
|
||||||
|
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||||
|
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetKernelSubGroupInfoKHR(cl_kernel /* in_kernel */,
|
||||||
|
cl_device_id /*in_device*/,
|
||||||
|
cl_kernel_sub_group_info /* param_name */,
|
||||||
|
size_t /*input_value_size*/,
|
||||||
|
const void * /*input_value*/,
|
||||||
|
size_t /*param_value_size*/,
|
||||||
|
void* /*param_value*/,
|
||||||
|
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int
|
||||||
|
( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */,
|
||||||
|
cl_device_id /*in_device*/,
|
||||||
|
cl_kernel_sub_group_info /* param_name */,
|
||||||
|
size_t /*input_value_size*/,
|
||||||
|
const void * /*input_value*/,
|
||||||
|
size_t /*param_value_size*/,
|
||||||
|
void* /*param_value*/,
|
||||||
|
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||||
|
#endif /* CL_VERSION_2_0 */
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_2_1
|
||||||
|
/*********************************
|
||||||
|
* cl_khr_priority_hints extension
|
||||||
|
*********************************/
|
||||||
|
#define cl_khr_priority_hints 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_queue_priority_khr;
|
||||||
|
|
||||||
|
/* cl_command_queue_properties */
|
||||||
|
#define CL_QUEUE_PRIORITY_KHR 0x1096
|
||||||
|
|
||||||
|
/* cl_queue_priority_khr */
|
||||||
|
#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
|
||||||
|
#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
|
||||||
|
#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_2_1 */
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_2_1
|
||||||
|
/*********************************
|
||||||
|
* cl_khr_throttle_hints extension
|
||||||
|
*********************************/
|
||||||
|
#define cl_khr_throttle_hints 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_queue_throttle_khr;
|
||||||
|
|
||||||
|
/* cl_command_queue_properties */
|
||||||
|
#define CL_QUEUE_THROTTLE_KHR 0x1097
|
||||||
|
|
||||||
|
/* cl_queue_throttle_khr */
|
||||||
|
#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
|
||||||
|
#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
|
||||||
|
#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_2_1 */
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_2_2
|
||||||
|
/*********************************
|
||||||
|
* cl_khr_subgroup_named_barrier
|
||||||
|
*********************************/
|
||||||
|
#define cl_khr_subgroup_named_barrier 1
|
||||||
|
|
||||||
|
/* cl_device_info */
|
||||||
|
#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_2_2 */
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* cl_arm_import_memory extension *
|
||||||
|
**********************************/
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_0
|
||||||
|
|
||||||
|
typedef intptr_t cl_import_properties_arm;
|
||||||
|
|
||||||
|
/* Default and valid proporties name for cl_arm_import_memory */
|
||||||
|
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||||
|
|
||||||
|
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||||
|
|
||||||
|
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||||
|
|
||||||
|
/* Secure DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||||
|
#define CL_IMPORT_TYPE_SECURE_ARM 0x40B5
|
||||||
|
|
||||||
|
/* This extension adds a new function that allows for direct memory import into
|
||||||
|
* OpenCL via the clImportMemoryARM function.
|
||||||
|
*
|
||||||
|
* Memory imported through this interface will be mapped into the device's page
|
||||||
|
* tables directly, providing zero copy access. It will never fall back to copy
|
||||||
|
* operations and aliased buffers.
|
||||||
|
*
|
||||||
|
* Types of memory supported for import are specified as additional extension
|
||||||
|
* strings.
|
||||||
|
*
|
||||||
|
* This extension produces cl_mem allocations which are compatible with all other
|
||||||
|
* users of cl_mem in the standard API.
|
||||||
|
*
|
||||||
|
* This extension maps pages with the same properties as the normal buffer creation
|
||||||
|
* function clCreateBuffer.
|
||||||
|
*/
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clImportMemoryARM( cl_context context,
|
||||||
|
cl_mem_flags flags,
|
||||||
|
const cl_import_properties_arm *properties,
|
||||||
|
void *memory,
|
||||||
|
size_t size,
|
||||||
|
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_0 */
|
||||||
|
|
||||||
|
/******************************************
|
||||||
|
* cl_arm_shared_virtual_memory extension *
|
||||||
|
******************************************/
|
||||||
|
|
||||||
|
#ifdef CL_VERSION_1_2
|
||||||
|
|
||||||
|
/* Used by clGetDeviceInfo */
|
||||||
|
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||||
|
|
||||||
|
/* Used by clGetMemObjectInfo */
|
||||||
|
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||||
|
|
||||||
|
/* Used by clSetKernelExecInfoARM: */
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||||
|
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||||
|
|
||||||
|
/* To be used by clGetEventInfo: */
|
||||||
|
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||||
|
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||||
|
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||||
|
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||||
|
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||||
|
|
||||||
|
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||||
|
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||||
|
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||||
|
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||||
|
|
||||||
|
/* Flag values used by clSVMAllocARM: */
|
||||||
|
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||||
|
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||||
|
|
||||||
|
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||||
|
typedef cl_uint cl_kernel_exec_info_arm;
|
||||||
|
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void * CL_API_CALL
|
||||||
|
clSVMAllocARM(cl_context /* context */,
|
||||||
|
cl_svm_mem_flags_arm /* flags */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* alignment */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY void CL_API_CALL
|
||||||
|
clSVMFreeARM(cl_context /* context */,
|
||||||
|
void * /* svm_pointer */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMFreeARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */,
|
||||||
|
cl_uint /* num_svm_pointers */,
|
||||||
|
void *[] /* svm_pointers[] */,
|
||||||
|
void * /* user_data */),
|
||||||
|
void * /* user_data */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemcpyARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_copy */,
|
||||||
|
void * /* dst_ptr */,
|
||||||
|
const void * /* src_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMemFillARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
const void * /* pattern */,
|
||||||
|
size_t /* pattern_size */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMMapARM(cl_command_queue /* command_queue */,
|
||||||
|
cl_bool /* blocking_map */,
|
||||||
|
cl_map_flags /* flags */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
size_t /* size */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueSVMUnmapARM(cl_command_queue /* command_queue */,
|
||||||
|
void * /* svm_ptr */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelArgSVMPointerARM(cl_kernel /* kernel */,
|
||||||
|
cl_uint /* arg_index */,
|
||||||
|
const void * /* arg_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clSetKernelExecInfoARM(cl_kernel /* kernel */,
|
||||||
|
cl_kernel_exec_info_arm /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
const void * /* param_value */) CL_EXT_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
#endif /* CL_VERSION_1_2 */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __CL_EXT_H */
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
/**********************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
**********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __OPENCL_CL_GL_H
|
||||||
|
#define __OPENCL_CL_GL_H
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <OpenCL/cl.h>
|
||||||
|
#else
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef cl_uint cl_gl_object_type;
|
||||||
|
typedef cl_uint cl_gl_texture_info;
|
||||||
|
typedef cl_uint cl_gl_platform_info;
|
||||||
|
typedef struct __GLsync *cl_GLsync;
|
||||||
|
|
||||||
|
/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
|
||||||
|
#define CL_GL_OBJECT_BUFFER 0x2000
|
||||||
|
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||||
|
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||||
|
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||||
|
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
|
||||||
|
#define CL_GL_OBJECT_TEXTURE1D 0x200F
|
||||||
|
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
|
||||||
|
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
|
||||||
|
|
||||||
|
/* cl_gl_texture_info */
|
||||||
|
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||||
|
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||||
|
#define CL_GL_NUM_SAMPLES 0x2012
|
||||||
|
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clCreateFromGLBuffer(cl_context /* context */,
|
||||||
|
cl_mem_flags /* flags */,
|
||||||
|
cl_GLuint /* bufobj */,
|
||||||
|
int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clCreateFromGLTexture(cl_context /* context */,
|
||||||
|
cl_mem_flags /* flags */,
|
||||||
|
cl_GLenum /* target */,
|
||||||
|
cl_GLint /* miplevel */,
|
||||||
|
cl_GLuint /* texture */,
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||||
|
clCreateFromGLRenderbuffer(cl_context /* context */,
|
||||||
|
cl_mem_flags /* flags */,
|
||||||
|
cl_GLuint /* renderbuffer */,
|
||||||
|
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetGLObjectInfo(cl_mem /* memobj */,
|
||||||
|
cl_gl_object_type * /* gl_object_type */,
|
||||||
|
cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetGLTextureInfo(cl_mem /* memobj */,
|
||||||
|
cl_gl_texture_info /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
void * /* param_value */,
|
||||||
|
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
|
||||||
|
cl_uint /* num_objects */,
|
||||||
|
const cl_mem * /* mem_objects */,
|
||||||
|
cl_uint /* num_events_in_wait_list */,
|
||||||
|
const cl_event * /* event_wait_list */,
|
||||||
|
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
|
||||||
|
/* Deprecated OpenCL 1.1 APIs */
|
||||||
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||||
|
clCreateFromGLTexture2D(cl_context /* context */,
|
||||||
|
cl_mem_flags /* flags */,
|
||||||
|
cl_GLenum /* target */,
|
||||||
|
cl_GLint /* miplevel */,
|
||||||
|
cl_GLuint /* texture */,
|
||||||
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||||
|
|
||||||
|
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||||
|
clCreateFromGLTexture3D(cl_context /* context */,
|
||||||
|
cl_mem_flags /* flags */,
|
||||||
|
cl_GLenum /* target */,
|
||||||
|
cl_GLint /* miplevel */,
|
||||||
|
cl_GLuint /* texture */,
|
||||||
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||||
|
|
||||||
|
/* cl_khr_gl_sharing extension */
|
||||||
|
|
||||||
|
#define cl_khr_gl_sharing 1
|
||||||
|
|
||||||
|
typedef cl_uint cl_gl_context_info;
|
||||||
|
|
||||||
|
/* Additional Error Codes */
|
||||||
|
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
|
||||||
|
|
||||||
|
/* cl_gl_context_info */
|
||||||
|
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
|
||||||
|
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
|
||||||
|
|
||||||
|
/* Additional cl_context_properties */
|
||||||
|
#define CL_GL_CONTEXT_KHR 0x2008
|
||||||
|
#define CL_EGL_DISPLAY_KHR 0x2009
|
||||||
|
#define CL_GLX_DISPLAY_KHR 0x200A
|
||||||
|
#define CL_WGL_HDC_KHR 0x200B
|
||||||
|
#define CL_CGL_SHAREGROUP_KHR 0x200C
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||||
|
clGetGLContextInfoKHR(const cl_context_properties * /* properties */,
|
||||||
|
cl_gl_context_info /* param_name */,
|
||||||
|
size_t /* param_value_size */,
|
||||||
|
void * /* param_value */,
|
||||||
|
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||||
|
|
||||||
|
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||||
|
const cl_context_properties * properties,
|
||||||
|
cl_gl_context_info param_name,
|
||||||
|
size_t param_value_size,
|
||||||
|
void * param_value,
|
||||||
|
size_t * param_value_size_ret);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_CL_GL_H */
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/**********************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
**********************************************************************************/
|
||||||
|
|
||||||
|
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||||
|
|
||||||
|
/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
|
||||||
|
/* OpenGL dependencies. */
|
||||||
|
|
||||||
|
#ifndef __OPENCL_CL_GL_EXT_H
|
||||||
|
#define __OPENCL_CL_GL_EXT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <OpenCL/cl_gl.h>
|
||||||
|
#else
|
||||||
|
#include <CL/cl_gl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For each extension, follow this template
|
||||||
|
* cl_VEN_extname extension */
|
||||||
|
/* #define cl_VEN_extname 1
|
||||||
|
* ... define new types, if any
|
||||||
|
* ... define new tokens, if any
|
||||||
|
* ... define new APIs, if any
|
||||||
|
*
|
||||||
|
* If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header
|
||||||
|
* This allows us to avoid having to decide whether to include GL headers or GLES here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* cl_khr_gl_event extension
|
||||||
|
* See section 9.9 in the OpenCL 1.1 spec for more information
|
||||||
|
*/
|
||||||
|
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||||
|
|
||||||
|
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||||
|
clCreateEventFromGLsyncKHR(cl_context /* context */,
|
||||||
|
cl_GLsync /* cl_GLsync */,
|
||||||
|
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_CL_GL_EXT_H */
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,59 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and/or associated documentation files (the
|
||||||
|
* "Materials"), to deal in the Materials without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
* permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||||
|
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||||
|
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||||
|
* https://www.khronos.org/registry/
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||||
|
|
||||||
|
#ifndef __OPENCL_H
|
||||||
|
#define __OPENCL_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
#include <OpenCL/cl.h>
|
||||||
|
#include <OpenCL/cl_gl.h>
|
||||||
|
#include <OpenCL/cl_gl_ext.h>
|
||||||
|
#include <OpenCL/cl_ext.h>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#include <CL/cl_gl.h>
|
||||||
|
#include <CL/cl_gl_ext.h>
|
||||||
|
#include <CL/cl_ext.h>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __OPENCL_H */
|
||||||
|
|
||||||
Reference in new issue
Block a user