OpenCL2.2 Header changes
Change-Id: I3285a8ffc7e34333feb68e925ebd460831c8e3d4
[ROCm/hip commit: a5fb06f4db]
This commit is contained in:
+1003
-636
تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
Diff را بارگزاری کن
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2019 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
|
||||
@@ -29,11 +29,7 @@
|
||||
#ifndef __OPENCL_CL_EGL_H
|
||||
#define __OPENCL_CL_EGL_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -65,69 +61,69 @@ 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;
|
||||
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);
|
||||
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;
|
||||
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);
|
||||
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;
|
||||
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);
|
||||
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;
|
||||
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);
|
||||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+447
-249
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2019 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
|
||||
@@ -26,8 +26,6 @@
|
||||
* 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. */
|
||||
|
||||
@@ -38,11 +36,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl.h>
|
||||
|
||||
/* cl_khr_fp64 extension - no extension #define since it has no functions */
|
||||
/* CL_DEVICE_DOUBLE_FP_CONFIG is defined in CL.h for OpenCL >= 120 */
|
||||
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
#endif
|
||||
|
||||
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||
@@ -52,12 +52,12 @@ extern "C" {
|
||||
*
|
||||
* 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
|
||||
* 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.
|
||||
@@ -66,9 +66,9 @@ extern "C" {
|
||||
* 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;
|
||||
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
|
||||
@@ -77,29 +77,29 @@ cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */,
|
||||
* 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
|
||||
* clLogMessagesToSystemLog forwards 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;
|
||||
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;
|
||||
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;
|
||||
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 *
|
||||
/************************
|
||||
* cl_khr_icd extension *
|
||||
************************/
|
||||
#define cl_khr_icd 1
|
||||
|
||||
@@ -110,55 +110,92 @@ extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */
|
||||
#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 */);
|
||||
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 */);
|
||||
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_il_program extension *
|
||||
*******************************/
|
||||
#define cl_khr_il_program 1
|
||||
|
||||
/* New property to clGetDeviceInfo for retrieving supported intermediate
|
||||
* languages
|
||||
*/
|
||||
|
||||
/*************************************
|
||||
* cl_khr_initalize_memory extension *
|
||||
*************************************/
|
||||
|
||||
#define CL_DEVICE_IL_VERSION_KHR 0x105B
|
||||
|
||||
/* New property to clGetProgramInfo for retrieving for retrieving the IL of a
|
||||
* program
|
||||
*/
|
||||
#define CL_PROGRAM_IL_KHR 0x1169
|
||||
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithILKHR(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
typedef CL_API_ENTRY cl_program
|
||||
(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/* Extension: cl_khr_image2d_from_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_KHR pixels.
|
||||
* The base address of the buffer must be aligned to
|
||||
* CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR pixels.
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A
|
||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_initialize_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;
|
||||
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;
|
||||
|
||||
|
||||
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
|
||||
* This extension adds support to create an OpenCL program object from a
|
||||
* Standard Portable Intermediate Representation (SPIR) instance
|
||||
*/
|
||||
|
||||
@@ -166,9 +203,30 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /
|
||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||
|
||||
|
||||
/*****************************************
|
||||
* cl_khr_create_command_queue extension *
|
||||
*****************************************/
|
||||
#define cl_khr_create_command_queue 1
|
||||
|
||||
typedef cl_bitfield cl_queue_properties_khr;
|
||||
|
||||
extern CL_API_ENTRY cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueueWithPropertiesKHR(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_command_queue
|
||||
(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/******************************************
|
||||
* 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
|
||||
@@ -190,6 +248,7 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /
|
||||
/*********************************
|
||||
* 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
|
||||
@@ -382,14 +441,6 @@ typedef CL_API_ENTRY cl_mem
|
||||
#endif
|
||||
|
||||
// <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 *
|
||||
**************************/
|
||||
@@ -426,86 +477,120 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)(
|
||||
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;
|
||||
/***********************************
|
||||
* cl_ext_device_fission extension
|
||||
***********************************/
|
||||
#define cl_ext_device_fission 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;
|
||||
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 * 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;
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) 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
|
||||
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_ext_migrate_memobject extension definitions
|
||||
***********************************/
|
||||
#define cl_ext_migrate_memobject 1
|
||||
|
||||
typedef cl_bitfield cl_mem_migration_flags_ext;
|
||||
|
||||
#define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1
|
||||
|
||||
#define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
/* 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_qcom_ext_host_ptr 1
|
||||
|
||||
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||
|
||||
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||
#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
|
||||
@@ -531,12 +616,21 @@ 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_ext_host_ptr_iocoherent extension
|
||||
********************************************/
|
||||
|
||||
/* Cache policy specifying io-coherence */
|
||||
#define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ion_host_ptr extension
|
||||
*********************************/
|
||||
@@ -551,15 +645,30 @@ typedef struct _cl_mem_ion_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_qcom_android_native_buffer_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
|
||||
|
||||
typedef struct _cl_mem_android_native_buffer_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* Virtual pointer to the android native buffer */
|
||||
void* anb_ptr;
|
||||
|
||||
} cl_mem_android_native_buffer_host_ptr;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_yuv_image extension *
|
||||
@@ -569,20 +678,23 @@ typedef struct _cl_mem_ion_host_ptr
|
||||
#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)
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#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 *
|
||||
******************************************/
|
||||
#define cl_img_use_gralloc_ptr 1
|
||||
|
||||
/* Flag values used by clCreteBuffer */
|
||||
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||
@@ -592,60 +704,75 @@ typedef struct _cl_mem_ion_host_ptr
|
||||
#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;
|
||||
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;
|
||||
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. */
|
||||
#if !defined(CL_VERSION_2_1)
|
||||
/* For OpenCL 2.1 and newer, cl_kernel_sub_group_info is declared in CL.h.
|
||||
In hindsight, there should have been a khr suffix on this type for
|
||||
the extension, but keeping it un-suffixed to maintain backwards
|
||||
compatibility. */
|
||||
typedef cl_uint cl_kernel_sub_group_info;
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
#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 */
|
||||
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;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_mipmap_image extension
|
||||
*********************************/
|
||||
|
||||
/* cl_sampler_properties */
|
||||
#define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155
|
||||
#define CL_SAMPLER_LOD_MIN_KHR 0x1156
|
||||
#define CL_SAMPLER_LOD_MAX_KHR 0x1157
|
||||
|
||||
|
||||
#ifdef CL_VERSION_2_1
|
||||
/*********************************
|
||||
* cl_khr_priority_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_priority_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_priority_khr;
|
||||
@@ -658,12 +785,12 @@ typedef cl_uint cl_queue_priority_khr;
|
||||
#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
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_throttle_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_throttle_khr;
|
||||
@@ -676,24 +803,65 @@ typedef cl_uint cl_queue_throttle_khr;
|
||||
#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
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#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_khr_extended_versioning
|
||||
*********************************/
|
||||
|
||||
#define CL_VERSION_MAJOR_BITS_KHR (10)
|
||||
#define CL_VERSION_MINOR_BITS_KHR (10)
|
||||
#define CL_VERSION_PATCH_BITS_KHR (12)
|
||||
|
||||
#define CL_VERSION_MAJOR_MASK_KHR ((1 << CL_VERSION_MAJOR_BITS_KHR) - 1)
|
||||
#define CL_VERSION_MINOR_MASK_KHR ((1 << CL_VERSION_MINOR_BITS_KHR) - 1)
|
||||
#define CL_VERSION_PATCH_MASK_KHR ((1 << CL_VERSION_PATCH_BITS_KHR) - 1)
|
||||
|
||||
#define CL_VERSION_MAJOR_KHR(version) ((version) >> (CL_VERSION_MINOR_BITS_KHR + CL_VERSION_PATCH_BITS_KHR))
|
||||
#define CL_VERSION_MINOR_KHR(version) (((version) >> CL_VERSION_PATCH_BITS_KHR) & CL_VERSION_MINOR_MASK_KHR)
|
||||
#define CL_VERSION_PATCH_KHR(version) ((version) & CL_VERSION_PATCH_MASK_KHR)
|
||||
|
||||
#define CL_MAKE_VERSION_KHR(major, minor, patch) \
|
||||
((((major) & CL_VERSION_MAJOR_MASK_KHR) << (CL_VERSION_MINOR_BITS_KHR + CL_VERSION_PATCH_BITS_KHR)) | \
|
||||
(((minor) & CL_VERSION_MINOR_MASK_KHR) << CL_VERSION_PATCH_BITS_KHR) | \
|
||||
((patch) & CL_VERSION_PATCH_MASK_KHR))
|
||||
|
||||
typedef cl_uint cl_version_khr;
|
||||
|
||||
#define CL_NAME_VERSION_MAX_NAME_SIZE_KHR 64
|
||||
|
||||
typedef struct _cl_name_version_khr
|
||||
{
|
||||
cl_version_khr version;
|
||||
char name[CL_NAME_VERSION_MAX_NAME_SIZE_KHR];
|
||||
} cl_name_version_khr;
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_NUMERIC_VERSION_KHR 0x0906
|
||||
#define CL_PLATFORM_EXTENSIONS_WITH_VERSION_KHR 0x0907
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_NUMERIC_VERSION_KHR 0x105E
|
||||
#define CL_DEVICE_OPENCL_C_NUMERIC_VERSION_KHR 0x105F
|
||||
#define CL_DEVICE_EXTENSIONS_WITH_VERSION_KHR 0x1060
|
||||
#define CL_DEVICE_ILS_WITH_VERSION_KHR 0x1061
|
||||
#define CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION_KHR 0x1062
|
||||
|
||||
|
||||
/**********************************
|
||||
* cl_arm_import_memory extension *
|
||||
**********************************/
|
||||
|
||||
#ifdef CL_VERSION_1_0
|
||||
#define cl_arm_import_memory 1
|
||||
|
||||
typedef intptr_t cl_import_properties_arm;
|
||||
|
||||
@@ -706,8 +874,17 @@ typedef intptr_t cl_import_properties_arm;
|
||||
/* 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
|
||||
/* Protected memory property */
|
||||
#define CL_IMPORT_TYPE_PROTECTED_ARM 0x40B5
|
||||
|
||||
/* Android hardware buffer type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_ANDROID_HARDWARE_BUFFER_ARM 0x41E2
|
||||
|
||||
/* Data consistency with host property */
|
||||
#define CL_IMPORT_DMA_BUF_DATA_CONSISTENCY_WITH_HOST_ARM 0x41E3
|
||||
|
||||
/* Import memory size value to indicate a size for the whole buffer */
|
||||
#define CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM SIZE_MAX
|
||||
|
||||
/* This extension adds a new function that allows for direct memory import into
|
||||
* OpenCL via the clImportMemoryARM function.
|
||||
@@ -734,13 +911,10 @@ clImportMemoryARM( cl_context context,
|
||||
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
|
||||
#define cl_arm_shared_virtual_memory 1
|
||||
|
||||
/* Used by clGetDeviceInfo */
|
||||
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||
@@ -774,76 +948,100 @@ 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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
clSetKernelArgSVMPointerARM(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif /* CL_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;
|
||||
|
||||
/********************************
|
||||
* cl_arm_get_core_id extension *
|
||||
********************************/
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
#define cl_arm_get_core_id 1
|
||||
|
||||
/* Device info property for bitfield of cores present */
|
||||
#define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF
|
||||
|
||||
#endif /* CL_VERSION_1_2 */
|
||||
|
||||
/*********************************
|
||||
* cl_arm_job_slot_selection
|
||||
*********************************/
|
||||
|
||||
#define cl_arm_job_slot_selection 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_JOB_SLOTS_ARM 0x41E0
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_JOB_SLOT_ARM 0x41E1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2019 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
|
||||
@@ -29,11 +29,7 @@
|
||||
#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" {
|
||||
@@ -49,110 +45,118 @@ typedef struct __GLsync *cl_GLsync;
|
||||
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||
#ifdef CL_VERSION_1_2
|
||||
#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
|
||||
#endif
|
||||
|
||||
/* cl_gl_texture_info */
|
||||
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_NUM_SAMPLES 0x2012
|
||||
#endif
|
||||
|
||||
|
||||
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;
|
||||
clCreateFromGLBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
#endif
|
||||
|
||||
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;
|
||||
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;
|
||||
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
|
||||
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;
|
||||
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
|
||||
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;
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2019 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
|
||||
@@ -26,11 +26,6 @@
|
||||
* 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
|
||||
|
||||
@@ -38,34 +33,17 @@
|
||||
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.
|
||||
*/
|
||||
#include <CL/cl_gl.h>
|
||||
|
||||
/*
|
||||
* cl_khr_gl_event extension
|
||||
* See section 9.9 in the OpenCL 1.1 spec for more information
|
||||
* cl_khr_gl_event extension
|
||||
*/
|
||||
#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;
|
||||
clCreateEventFromGLsyncKHR(cl_context context,
|
||||
cl_GLsync cl_GLsync,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
Diff را بارگزاری کن
@@ -1,5 +1,5 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
* Copyright (c) 2008-2018 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
|
||||
@@ -26,15 +26,10 @@
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
|
||||
|
||||
#ifndef __CL_PLATFORM_H
|
||||
#define __CL_PLATFORM_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
#include <CL/cl_version.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -58,139 +53,70 @@ extern "C" {
|
||||
* deprecation but is deprecated in versions later than 1.1.
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
#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_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
|
||||
#define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
|
||||
|
||||
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
#define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
#define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
|
||||
#else
|
||||
#warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here!
|
||||
#define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
#endif
|
||||
#define CL_EXTENSION_WEAK_LINK
|
||||
#define CL_API_SUFFIX__VERSION_1_0
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0
|
||||
#define CL_API_SUFFIX__VERSION_1_1
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1
|
||||
#define CL_API_SUFFIX__VERSION_1_2
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2
|
||||
#define CL_API_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__
|
||||
#define CL_EXT_SUFFIX_DEPRECATED __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX_DEPRECATED
|
||||
#elif defined(_WIN32)
|
||||
#define CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define CL_EXTENSION_WEAK_LINK
|
||||
#define CL_API_SUFFIX__VERSION_1_0
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0
|
||||
#define CL_API_SUFFIX__VERSION_1_1
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1
|
||||
#define CL_API_SUFFIX__VERSION_1_2
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2
|
||||
#define CL_API_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 CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
#endif
|
||||
#define CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX_DEPRECATED
|
||||
#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_1_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#endif
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
|
||||
#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 __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
|
||||
#endif
|
||||
#elif defined(_WIN32)
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated)
|
||||
#endif
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)
|
||||
#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_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 CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED CL_EXT_PREFIX_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED __declspec(deprecated)
|
||||
#endif
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
|
||||
#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
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
|
||||
|
||||
#define CL_EXT_SUFFIX__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_PREFIX__VERSION_2_0_DEPRECATED
|
||||
|
||||
#define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
|
||||
#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 CL_EXT_SUFFIX_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
|
||||
#endif
|
||||
|
||||
#if (defined (_WIN32) && defined(_MSC_VER))
|
||||
@@ -300,16 +226,16 @@ typedef double cl_double;
|
||||
/* scalar types */
|
||||
typedef int8_t cl_char;
|
||||
typedef uint8_t cl_uchar;
|
||||
typedef int16_t cl_short __attribute__((aligned(2)));
|
||||
typedef uint16_t cl_ushort __attribute__((aligned(2)));
|
||||
typedef int32_t cl_int __attribute__((aligned(4)));
|
||||
typedef uint32_t cl_uint __attribute__((aligned(4)));
|
||||
typedef int64_t cl_long __attribute__((aligned(8)));
|
||||
typedef uint64_t cl_ulong __attribute__((aligned(8)));
|
||||
typedef int16_t cl_short;
|
||||
typedef uint16_t cl_ushort;
|
||||
typedef int32_t cl_int;
|
||||
typedef uint32_t cl_uint;
|
||||
typedef int64_t cl_long;
|
||||
typedef uint64_t cl_ulong;
|
||||
|
||||
typedef uint16_t cl_half __attribute__((aligned(2)));
|
||||
typedef float cl_float __attribute__((aligned(4)));
|
||||
typedef double cl_double __attribute__((aligned(8)));
|
||||
typedef uint16_t cl_half;
|
||||
typedef float cl_float;
|
||||
typedef double cl_double;
|
||||
|
||||
/* Macro names and corresponding values defined by OpenCL */
|
||||
#define CL_CHAR_BIT 8
|
||||
@@ -397,7 +323,7 @@ typedef double cl_double __attribute__((aligned(8)));
|
||||
#define CL_HUGE_VALF ((cl_float) 1e50)
|
||||
#define CL_HUGE_VAL ((cl_double) 1e500)
|
||||
float nanf( const char * );
|
||||
#define CL_NAN nanf( "" )
|
||||
#define CL_NAN nanf( "" )
|
||||
#endif
|
||||
#define CL_MAXFLOAT CL_FLT_MAX
|
||||
#define CL_INFINITY CL_HUGE_VALF
|
||||
@@ -412,17 +338,17 @@ typedef int cl_GLint;
|
||||
typedef unsigned int cl_GLenum;
|
||||
|
||||
/*
|
||||
* Vector types
|
||||
* Vector types
|
||||
*
|
||||
* Note: OpenCL requires that all types be naturally aligned.
|
||||
* Note: OpenCL requires that all types be naturally aligned.
|
||||
* This means that vector types must be naturally aligned.
|
||||
* For example, a vector of four floats must be aligned to
|
||||
* a 16 byte boundary (calculated as 4 * the natural 4-byte
|
||||
* a 16 byte boundary (calculated as 4 * the natural 4-byte
|
||||
* alignment of the float). The alignment qualifiers here
|
||||
* will only function properly if your compiler supports them
|
||||
* and if you don't actively work to defeat them. For example,
|
||||
* in order for a cl_float4 to be 16 byte aligned in a struct,
|
||||
* the start of the struct must itself be 16-byte aligned.
|
||||
* the start of the struct must itself be 16-byte aligned.
|
||||
*
|
||||
* Maintaining proper alignment is the user's responsibility.
|
||||
*/
|
||||
@@ -430,13 +356,13 @@ typedef unsigned int cl_GLenum;
|
||||
/* Define basic vector types */
|
||||
#if defined( __VEC__ )
|
||||
#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
|
||||
typedef vector unsigned char __cl_uchar16;
|
||||
typedef vector signed char __cl_char16;
|
||||
typedef vector unsigned short __cl_ushort8;
|
||||
typedef vector signed short __cl_short8;
|
||||
typedef vector unsigned int __cl_uint4;
|
||||
typedef vector signed int __cl_int4;
|
||||
typedef vector float __cl_float4;
|
||||
typedef __vector unsigned char __cl_uchar16;
|
||||
typedef __vector signed char __cl_char16;
|
||||
typedef __vector unsigned short __cl_ushort8;
|
||||
typedef __vector signed short __cl_short8;
|
||||
typedef __vector unsigned int __cl_uint4;
|
||||
typedef __vector signed int __cl_int4;
|
||||
typedef __vector float __cl_float4;
|
||||
#define __CL_UCHAR16__ 1
|
||||
#define __CL_CHAR16__ 1
|
||||
#define __CL_USHORT8__ 1
|
||||
@@ -536,7 +462,7 @@ typedef unsigned int cl_GLenum;
|
||||
#if defined( __MINGW64__ )
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#include <immintrin.h>
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
#if defined( __GNUC__ )
|
||||
typedef cl_float __cl_float8 __attribute__((vector_size(32)));
|
||||
@@ -605,7 +531,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_char s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_char lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_CHAR2__)
|
||||
#if defined( __CL_CHAR2__)
|
||||
__cl_char2 v2;
|
||||
#endif
|
||||
}cl_char2;
|
||||
@@ -618,10 +544,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_CHAR2__)
|
||||
#if defined( __CL_CHAR2__)
|
||||
__cl_char2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_CHAR4__)
|
||||
#if defined( __CL_CHAR4__)
|
||||
__cl_char4 v4;
|
||||
#endif
|
||||
}cl_char4;
|
||||
@@ -637,10 +563,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_CHAR2__)
|
||||
#if defined( __CL_CHAR2__)
|
||||
__cl_char2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_CHAR4__)
|
||||
#if defined( __CL_CHAR4__)
|
||||
__cl_char4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_CHAR8__ )
|
||||
@@ -656,10 +582,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_CHAR2__)
|
||||
#if defined( __CL_CHAR2__)
|
||||
__cl_char2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_CHAR4__)
|
||||
#if defined( __CL_CHAR4__)
|
||||
__cl_char4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_CHAR8__ )
|
||||
@@ -680,7 +606,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; };
|
||||
#endif
|
||||
#if defined( __cl_uchar2__)
|
||||
#if defined( __cl_uchar2__)
|
||||
__cl_uchar2 v2;
|
||||
#endif
|
||||
}cl_uchar2;
|
||||
@@ -693,10 +619,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UCHAR2__)
|
||||
#if defined( __CL_UCHAR2__)
|
||||
__cl_uchar2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_UCHAR4__)
|
||||
#if defined( __CL_UCHAR4__)
|
||||
__cl_uchar4 v4;
|
||||
#endif
|
||||
}cl_uchar4;
|
||||
@@ -712,10 +638,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UCHAR2__)
|
||||
#if defined( __CL_UCHAR2__)
|
||||
__cl_uchar2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_UCHAR4__)
|
||||
#if defined( __CL_UCHAR4__)
|
||||
__cl_uchar4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_UCHAR8__ )
|
||||
@@ -731,10 +657,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UCHAR2__)
|
||||
#if defined( __CL_UCHAR2__)
|
||||
__cl_uchar2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_UCHAR4__)
|
||||
#if defined( __CL_UCHAR4__)
|
||||
__cl_uchar4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_UCHAR8__ )
|
||||
@@ -755,7 +681,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_short s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_short lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_SHORT2__)
|
||||
#if defined( __CL_SHORT2__)
|
||||
__cl_short2 v2;
|
||||
#endif
|
||||
}cl_short2;
|
||||
@@ -768,10 +694,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_SHORT2__)
|
||||
#if defined( __CL_SHORT2__)
|
||||
__cl_short2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_SHORT4__)
|
||||
#if defined( __CL_SHORT4__)
|
||||
__cl_short4 v4;
|
||||
#endif
|
||||
}cl_short4;
|
||||
@@ -787,10 +713,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_SHORT2__)
|
||||
#if defined( __CL_SHORT2__)
|
||||
__cl_short2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_SHORT4__)
|
||||
#if defined( __CL_SHORT4__)
|
||||
__cl_short4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_SHORT8__ )
|
||||
@@ -806,10 +732,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_SHORT2__)
|
||||
#if defined( __CL_SHORT2__)
|
||||
__cl_short2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_SHORT4__)
|
||||
#if defined( __CL_SHORT4__)
|
||||
__cl_short4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_SHORT8__ )
|
||||
@@ -830,7 +756,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_USHORT2__)
|
||||
#if defined( __CL_USHORT2__)
|
||||
__cl_ushort2 v2;
|
||||
#endif
|
||||
}cl_ushort2;
|
||||
@@ -843,10 +769,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_USHORT2__)
|
||||
#if defined( __CL_USHORT2__)
|
||||
__cl_ushort2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_USHORT4__)
|
||||
#if defined( __CL_USHORT4__)
|
||||
__cl_ushort4 v4;
|
||||
#endif
|
||||
}cl_ushort4;
|
||||
@@ -862,10 +788,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_USHORT2__)
|
||||
#if defined( __CL_USHORT2__)
|
||||
__cl_ushort2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_USHORT4__)
|
||||
#if defined( __CL_USHORT4__)
|
||||
__cl_ushort4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_USHORT8__ )
|
||||
@@ -881,10 +807,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_USHORT2__)
|
||||
#if defined( __CL_USHORT2__)
|
||||
__cl_ushort2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_USHORT4__)
|
||||
#if defined( __CL_USHORT4__)
|
||||
__cl_ushort4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_USHORT8__ )
|
||||
@@ -905,7 +831,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_half s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_half lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_HALF2__)
|
||||
#if defined( __CL_HALF2__)
|
||||
__cl_half2 v2;
|
||||
#endif
|
||||
}cl_half2;
|
||||
@@ -918,10 +844,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_HALF2__)
|
||||
#if defined( __CL_HALF2__)
|
||||
__cl_half2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_HALF4__)
|
||||
#if defined( __CL_HALF4__)
|
||||
__cl_half4 v4;
|
||||
#endif
|
||||
}cl_half4;
|
||||
@@ -937,10 +863,10 @@ typedef union
|
||||
__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__)
|
||||
#if defined( __CL_HALF2__)
|
||||
__cl_half2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_HALF4__)
|
||||
#if defined( __CL_HALF4__)
|
||||
__cl_half4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_HALF8__ )
|
||||
@@ -956,10 +882,10 @@ typedef union
|
||||
__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__)
|
||||
#if defined( __CL_HALF2__)
|
||||
__cl_half2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_HALF4__)
|
||||
#if defined( __CL_HALF4__)
|
||||
__cl_half4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_HALF8__ )
|
||||
@@ -979,7 +905,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_int s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_int lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_INT2__)
|
||||
#if defined( __CL_INT2__)
|
||||
__cl_int2 v2;
|
||||
#endif
|
||||
}cl_int2;
|
||||
@@ -992,10 +918,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_INT2__)
|
||||
#if defined( __CL_INT2__)
|
||||
__cl_int2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_INT4__)
|
||||
#if defined( __CL_INT4__)
|
||||
__cl_int4 v4;
|
||||
#endif
|
||||
}cl_int4;
|
||||
@@ -1011,10 +937,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_INT2__)
|
||||
#if defined( __CL_INT2__)
|
||||
__cl_int2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_INT4__)
|
||||
#if defined( __CL_INT4__)
|
||||
__cl_int4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_INT8__ )
|
||||
@@ -1030,10 +956,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_INT2__)
|
||||
#if defined( __CL_INT2__)
|
||||
__cl_int2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_INT4__)
|
||||
#if defined( __CL_INT4__)
|
||||
__cl_int4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_INT8__ )
|
||||
@@ -1054,7 +980,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UINT2__)
|
||||
#if defined( __CL_UINT2__)
|
||||
__cl_uint2 v2;
|
||||
#endif
|
||||
}cl_uint2;
|
||||
@@ -1067,10 +993,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UINT2__)
|
||||
#if defined( __CL_UINT2__)
|
||||
__cl_uint2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_UINT4__)
|
||||
#if defined( __CL_UINT4__)
|
||||
__cl_uint4 v4;
|
||||
#endif
|
||||
}cl_uint4;
|
||||
@@ -1086,10 +1012,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UINT2__)
|
||||
#if defined( __CL_UINT2__)
|
||||
__cl_uint2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_UINT4__)
|
||||
#if defined( __CL_UINT4__)
|
||||
__cl_uint4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_UINT8__ )
|
||||
@@ -1105,10 +1031,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_UINT2__)
|
||||
#if defined( __CL_UINT2__)
|
||||
__cl_uint2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_UINT4__)
|
||||
#if defined( __CL_UINT4__)
|
||||
__cl_uint4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_UINT8__ )
|
||||
@@ -1128,7 +1054,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_long s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_long lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_LONG2__)
|
||||
#if defined( __CL_LONG2__)
|
||||
__cl_long2 v2;
|
||||
#endif
|
||||
}cl_long2;
|
||||
@@ -1141,10 +1067,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_LONG2__)
|
||||
#if defined( __CL_LONG2__)
|
||||
__cl_long2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_LONG4__)
|
||||
#if defined( __CL_LONG4__)
|
||||
__cl_long4 v4;
|
||||
#endif
|
||||
}cl_long4;
|
||||
@@ -1160,10 +1086,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_LONG2__)
|
||||
#if defined( __CL_LONG2__)
|
||||
__cl_long2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_LONG4__)
|
||||
#if defined( __CL_LONG4__)
|
||||
__cl_long4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_LONG8__ )
|
||||
@@ -1179,10 +1105,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_LONG2__)
|
||||
#if defined( __CL_LONG2__)
|
||||
__cl_long2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_LONG4__)
|
||||
#if defined( __CL_LONG4__)
|
||||
__cl_long4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_LONG8__ )
|
||||
@@ -1203,7 +1129,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_ULONG2__)
|
||||
#if defined( __CL_ULONG2__)
|
||||
__cl_ulong2 v2;
|
||||
#endif
|
||||
}cl_ulong2;
|
||||
@@ -1216,10 +1142,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_ULONG2__)
|
||||
#if defined( __CL_ULONG2__)
|
||||
__cl_ulong2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_ULONG4__)
|
||||
#if defined( __CL_ULONG4__)
|
||||
__cl_ulong4 v4;
|
||||
#endif
|
||||
}cl_ulong4;
|
||||
@@ -1235,10 +1161,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_ULONG2__)
|
||||
#if defined( __CL_ULONG2__)
|
||||
__cl_ulong2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_ULONG4__)
|
||||
#if defined( __CL_ULONG4__)
|
||||
__cl_ulong4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_ULONG8__ )
|
||||
@@ -1254,10 +1180,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_ULONG2__)
|
||||
#if defined( __CL_ULONG2__)
|
||||
__cl_ulong2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_ULONG4__)
|
||||
#if defined( __CL_ULONG4__)
|
||||
__cl_ulong4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_ULONG8__ )
|
||||
@@ -1279,7 +1205,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_float s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_float lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_FLOAT2__)
|
||||
#if defined( __CL_FLOAT2__)
|
||||
__cl_float2 v2;
|
||||
#endif
|
||||
}cl_float2;
|
||||
@@ -1292,10 +1218,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_FLOAT2__)
|
||||
#if defined( __CL_FLOAT2__)
|
||||
__cl_float2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_FLOAT4__)
|
||||
#if defined( __CL_FLOAT4__)
|
||||
__cl_float4 v4;
|
||||
#endif
|
||||
}cl_float4;
|
||||
@@ -1311,10 +1237,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_FLOAT2__)
|
||||
#if defined( __CL_FLOAT2__)
|
||||
__cl_float2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_FLOAT4__)
|
||||
#if defined( __CL_FLOAT4__)
|
||||
__cl_float4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_FLOAT8__ )
|
||||
@@ -1330,10 +1256,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_FLOAT2__)
|
||||
#if defined( __CL_FLOAT2__)
|
||||
__cl_float2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_FLOAT4__)
|
||||
#if defined( __CL_FLOAT4__)
|
||||
__cl_float4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_FLOAT8__ )
|
||||
@@ -1354,7 +1280,7 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_double s0, s1; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_double lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
__cl_double2 v2;
|
||||
#endif
|
||||
}cl_double2;
|
||||
@@ -1367,10 +1293,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
__cl_double2 v2[2];
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE4__)
|
||||
#if defined( __CL_DOUBLE4__)
|
||||
__cl_double4 v4;
|
||||
#endif
|
||||
}cl_double4;
|
||||
@@ -1386,10 +1312,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
__cl_double2 v2[4];
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE4__)
|
||||
#if defined( __CL_DOUBLE4__)
|
||||
__cl_double4 v4[2];
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE8__ )
|
||||
@@ -1405,10 +1331,10 @@ typedef union
|
||||
__CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
|
||||
__CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; };
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
#if defined( __CL_DOUBLE2__)
|
||||
__cl_double2 v2[8];
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE4__)
|
||||
#if defined( __CL_DOUBLE4__)
|
||||
__cl_double4 v4[4];
|
||||
#endif
|
||||
#if defined( __CL_DOUBLE8__ )
|
||||
@@ -1419,9 +1345,9 @@ typedef union
|
||||
#endif
|
||||
}cl_double16;
|
||||
|
||||
/* Macro to facilitate debugging
|
||||
/* Macro to facilitate debugging
|
||||
* Usage:
|
||||
* Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
|
||||
* Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
|
||||
* The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
|
||||
* Each line thereafter of OpenCL C source must end with: \n\
|
||||
* The last line ends in ";
|
||||
@@ -1436,13 +1362,13 @@ typedef union
|
||||
* } \n\
|
||||
* ";
|
||||
*
|
||||
* This should correctly set up the line, (column) and file information for your source
|
||||
* This should correctly set up the line, (column) and file information for your source
|
||||
* string so you can do source level debugging.
|
||||
*/
|
||||
#define __CL_STRINGIFY( _x ) # _x
|
||||
#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
|
||||
#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
|
||||
|
||||
#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 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 __CL_VERSION_H
|
||||
#define __CL_VERSION_H
|
||||
|
||||
/* Detect which version to target */
|
||||
#if !defined(CL_TARGET_OPENCL_VERSION)
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION != 100 && \
|
||||
CL_TARGET_OPENCL_VERSION != 110 && \
|
||||
CL_TARGET_OPENCL_VERSION != 120 && \
|
||||
CL_TARGET_OPENCL_VERSION != 200 && \
|
||||
CL_TARGET_OPENCL_VERSION != 210 && \
|
||||
CL_TARGET_OPENCL_VERSION != 220
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220). Defaulting to 220 (OpenCL 2.2)")
|
||||
#undef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL Version */
|
||||
#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
|
||||
#define CL_VERSION_2_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
|
||||
#define CL_VERSION_2_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
|
||||
#define CL_VERSION_2_0 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
|
||||
#define CL_VERSION_1_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
|
||||
#define CL_VERSION_1_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
|
||||
#define CL_VERSION_1_0 1
|
||||
#endif
|
||||
|
||||
/* Allow deprecated APIs for older OpenCL versions. */
|
||||
#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#endif
|
||||
|
||||
#endif /* __CL_VERSION_H */
|
||||
@@ -35,25 +35,13 @@
|
||||
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 */
|
||||
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
/* Copyright (c) 2008-present Advanced Micro Devices, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
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 Software.
|
||||
|
||||
THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE. */
|
||||
|
||||
#include "cl_common.hpp"
|
||||
#include "vdi_common.hpp"
|
||||
#ifdef _WIN32
|
||||
#include <d3d10_1.h>
|
||||
#include "cl_d3d9_amd.hpp"
|
||||
#include "cl_d3d10_amd.hpp"
|
||||
#include "cl_d3d11_amd.hpp"
|
||||
#endif //_WIN32
|
||||
|
||||
#include <icd/loader/icd_dispatch.h>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
amd::PlatformIDS amd::PlatformID::Platform = //{ NULL };
|
||||
{amd::ICDDispatchedObject::icdVendorDispatch_};
|
||||
|
||||
static cl_int CL_API_CALL icdGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
|
||||
size_t param_value_size, void* param_value,
|
||||
size_t* param_value_size_ret) {
|
||||
return clGetPlatformInfo(NULL, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int CL_API_CALL icdGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
|
||||
cl_uint num_entries, cl_device_id* devices,
|
||||
cl_uint* num_devices) {
|
||||
return clGetDeviceIDs(NULL, device_type, num_entries, devices, num_devices);
|
||||
}
|
||||
|
||||
static cl_int CL_API_CALL icdGetDeviceInfo(cl_device_id device, cl_device_info param_name,
|
||||
size_t param_value_size, void* param_value,
|
||||
size_t* param_value_size_ret) {
|
||||
if (param_name == CL_DEVICE_PLATFORM) {
|
||||
// Return the ICD platform instead of the default NULL platform.
|
||||
cl_platform_id platform = reinterpret_cast<cl_platform_id>(&amd::PlatformID::Platform);
|
||||
return amd::clGetInfo(platform, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
return clGetDeviceInfo(device, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
cl_icd_dispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {
|
||||
{NULL /* should not get called */, icdGetPlatformInfo, icdGetDeviceIDs, icdGetDeviceInfo,
|
||||
clCreateContext, clCreateContextFromType, clRetainContext, clReleaseContext, clGetContextInfo,
|
||||
clCreateCommandQueue, clRetainCommandQueue, clReleaseCommandQueue, clGetCommandQueueInfo,
|
||||
clSetCommandQueueProperty, clCreateBuffer, clCreateImage2D, clCreateImage3D, clRetainMemObject,
|
||||
clReleaseMemObject, clGetSupportedImageFormats, clGetMemObjectInfo, clGetImageInfo,
|
||||
clCreateSampler, clRetainSampler, clReleaseSampler, clGetSamplerInfo,
|
||||
clCreateProgramWithSource, clCreateProgramWithBinary, clRetainProgram, clReleaseProgram,
|
||||
clBuildProgram, clUnloadCompiler, clGetProgramInfo, clGetProgramBuildInfo, clCreateKernel,
|
||||
clCreateKernelsInProgram, clRetainKernel, clReleaseKernel, clSetKernelArg, clGetKernelInfo,
|
||||
clGetKernelWorkGroupInfo, clWaitForEvents, clGetEventInfo, clRetainEvent, clReleaseEvent,
|
||||
clGetEventProfilingInfo, clFlush, clFinish, clEnqueueReadBuffer, clEnqueueWriteBuffer,
|
||||
clEnqueueCopyBuffer, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage,
|
||||
clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage,
|
||||
clEnqueueUnmapMemObject, clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueNativeKernel,
|
||||
clEnqueueMarker, clEnqueueWaitForEvents, clEnqueueBarrier, clGetExtensionFunctionAddress,
|
||||
clCreateFromGLBuffer, clCreateFromGLTexture2D, clCreateFromGLTexture3D,
|
||||
clCreateFromGLRenderbuffer, clGetGLObjectInfo, clGetGLTextureInfo, clEnqueueAcquireGLObjects,
|
||||
clEnqueueReleaseGLObjects, clGetGLContextInfoKHR,
|
||||
WINDOWS_SWITCH(clGetDeviceIDsFromD3D10KHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromD3D10BufferKHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromD3D10Texture2DKHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromD3D10Texture3DKHR, NULL),
|
||||
WINDOWS_SWITCH(clEnqueueAcquireD3D10ObjectsKHR, NULL),
|
||||
WINDOWS_SWITCH(clEnqueueReleaseD3D10ObjectsKHR, NULL), clSetEventCallback, clCreateSubBuffer,
|
||||
clSetMemObjectDestructorCallback, clCreateUserEvent, clSetUserEventStatus,
|
||||
clEnqueueReadBufferRect, clEnqueueWriteBufferRect, clEnqueueCopyBufferRect,
|
||||
NULL, NULL, NULL, clCreateEventFromGLsyncKHR,
|
||||
|
||||
/* OpenCL 1.2*/
|
||||
clCreateSubDevices, clRetainDevice, clReleaseDevice, clCreateImage,
|
||||
clCreateProgramWithBuiltInKernels, clCompileProgram, clLinkProgram, clUnloadPlatformCompiler,
|
||||
clGetKernelArgInfo, clEnqueueFillBuffer, clEnqueueFillImage, clEnqueueMigrateMemObjects,
|
||||
clEnqueueMarkerWithWaitList, clEnqueueBarrierWithWaitList,
|
||||
clGetExtensionFunctionAddressForPlatform, clCreateFromGLTexture,
|
||||
|
||||
WINDOWS_SWITCH(clGetDeviceIDsFromD3D11KHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromD3D11BufferKHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromD3D11Texture2DKHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromD3D11Texture3DKHR, NULL),
|
||||
WINDOWS_SWITCH(clCreateFromDX9MediaSurfaceKHR, NULL),
|
||||
WINDOWS_SWITCH(clEnqueueAcquireD3D11ObjectsKHR, NULL),
|
||||
WINDOWS_SWITCH(clEnqueueReleaseD3D11ObjectsKHR, NULL),
|
||||
|
||||
WINDOWS_SWITCH(clGetDeviceIDsFromDX9MediaAdapterKHR,
|
||||
NULL), // KHRpfn_clGetDeviceIDsFromDX9MediaAdapterKHR
|
||||
// clGetDeviceIDsFromDX9MediaAdapterKHR;
|
||||
WINDOWS_SWITCH(
|
||||
clEnqueueAcquireDX9MediaSurfacesKHR,
|
||||
NULL), // KHRpfn_clEnqueueAcquireDX9MediaSurfacesKHR clEnqueueAcquireDX9MediaSurfacesKHR;
|
||||
WINDOWS_SWITCH(
|
||||
clEnqueueReleaseDX9MediaSurfacesKHR,
|
||||
NULL), // KHRpfn_clEnqueueReleaseDX9MediaSurfacesKHR clEnqueueReleaseDX9MediaSurfacesKHR;
|
||||
|
||||
NULL,
|
||||
NULL, NULL, NULL,
|
||||
|
||||
clCreateCommandQueueWithProperties, clCreatePipe, clGetPipeInfo, clSVMAlloc, clSVMFree,
|
||||
clEnqueueSVMFree, clEnqueueSVMMemcpy, clEnqueueSVMMemFill, clEnqueueSVMMap, clEnqueueSVMUnmap,
|
||||
clCreateSamplerWithProperties, clSetKernelArgSVMPointer, clSetKernelExecInfo,
|
||||
clGetKernelSubGroupInfo,
|
||||
clCloneKernel,
|
||||
clCreateProgramWithIL,
|
||||
clEnqueueSVMMigrateMem,
|
||||
clGetDeviceAndHostTimer,
|
||||
clGetHostTimer,
|
||||
clGetKernelSubGroupInfo,
|
||||
clSetDefaultDeviceCommandQueue,
|
||||
|
||||
clSetProgramReleaseCallback,
|
||||
clSetProgramSpecializationConstant }};
|
||||
|
||||
#if defined(ATI_OS_WIN)
|
||||
#include <Shlwapi.h>
|
||||
|
||||
#pragma comment(lib, "shlwapi.lib")
|
||||
|
||||
static bool ShouldLoadPlatform() {
|
||||
// Get the OpenCL ICD registry values
|
||||
HKEY platformsKey = NULL;
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\OpenCL\\Vendors", 0, KEY_READ,
|
||||
&platformsKey) != ERROR_SUCCESS)
|
||||
return true;
|
||||
|
||||
std::vector<std::string> registryValues;
|
||||
DWORD dwIndex = 0;
|
||||
while (true) {
|
||||
char cszLibraryName[1024] = {0};
|
||||
DWORD dwLibraryNameSize = sizeof(cszLibraryName);
|
||||
DWORD dwLibraryNameType = 0;
|
||||
DWORD dwValue = 0;
|
||||
DWORD dwValueSize = sizeof(dwValue);
|
||||
|
||||
if (RegEnumValueA(platformsKey, dwIndex++, cszLibraryName, &dwLibraryNameSize, NULL,
|
||||
&dwLibraryNameType, (LPBYTE)&dwValue, &dwValueSize) != ERROR_SUCCESS)
|
||||
break;
|
||||
// Require that the value be a DWORD and equal zero
|
||||
if (dwLibraryNameType != REG_DWORD || dwValue != 0) {
|
||||
continue;
|
||||
}
|
||||
registryValues.push_back(cszLibraryName);
|
||||
}
|
||||
RegCloseKey(platformsKey);
|
||||
|
||||
HMODULE hm = NULL;
|
||||
if (!GetModuleHandleExA(
|
||||
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
||||
(LPCSTR)&ShouldLoadPlatform, &hm))
|
||||
return true;
|
||||
|
||||
char cszDllPath[1024] = {0};
|
||||
if (!GetModuleFileNameA(hm, cszDllPath, sizeof(cszDllPath))) return true;
|
||||
|
||||
// If we are loaded from the DriverStore, then there should be a registry
|
||||
// value matching our current module absolute path.
|
||||
if (std::find(registryValues.begin(), registryValues.end(), cszDllPath) == registryValues.end())
|
||||
return true;
|
||||
|
||||
LPSTR cszFileName;
|
||||
char buffer[1024] = {0};
|
||||
if (!GetFullPathNameA(cszDllPath, sizeof(buffer), buffer, &cszFileName)) return true;
|
||||
|
||||
// We found an absolute path in the registry that matched this DLL, now
|
||||
// check if there is also an entry with the same filename.
|
||||
if (std::find(registryValues.begin(), registryValues.end(), cszFileName) == registryValues.end())
|
||||
return true;
|
||||
|
||||
// Lastly, check if there is a DLL with the same name in the System folder.
|
||||
char cszSystemPath[1024] = {0};
|
||||
#if defined(ATI_BITS_32)
|
||||
if (!GetSystemWow64DirectoryA(cszSystemPath, sizeof(cszSystemPath)))
|
||||
#endif // defined(ATI_BITS_32)
|
||||
if (!GetSystemDirectoryA(cszSystemPath, sizeof(cszSystemPath))) return true;
|
||||
|
||||
std::string systemDllPath;
|
||||
systemDllPath.append(cszSystemPath).append("\\").append(cszFileName);
|
||||
if (!PathFileExistsA(systemDllPath.c_str())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If we get here, then all 3 conditions are true:
|
||||
// - An entry in the registry with an absolute path matches the current DLL
|
||||
// - An entry in the registry with a relative path matches the current DLL
|
||||
// - A DLL with the same name was found in the system directory
|
||||
//
|
||||
// We should not load this platform!
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
// If there is only one platform, load it.
|
||||
// If there is more than one platform, only load platforms that have visible devices
|
||||
// If all platforms have no devices available, only load the PAL platform
|
||||
static bool ShouldLoadPlatform() {
|
||||
bool shouldLoad = true;
|
||||
|
||||
if (!amd::Runtime::initialized()) {
|
||||
amd::Runtime::init();
|
||||
}
|
||||
const int numDevices = amd::Device::numDevices(CL_DEVICE_TYPE_GPU, false);
|
||||
|
||||
void *otherPlatform = nullptr;
|
||||
if (amd::IS_LEGACY) {
|
||||
otherPlatform = dlopen("libamdocl64.so", RTLD_LAZY);
|
||||
if (otherPlatform != nullptr) { // Present platform exists
|
||||
shouldLoad = numDevices > 0;
|
||||
}
|
||||
} else {
|
||||
otherPlatform = dlopen("libamdocl-orca64.so", RTLD_LAZY);
|
||||
if (otherPlatform != nullptr) { // Legacy platform exists
|
||||
// gcc4.8 doesn't support casting void* to a function pointer
|
||||
// Work around this by creating a typedef untill we upgrade the compiler
|
||||
typedef void*(*clGetFunctionAddress_t)(const char *);
|
||||
typedef cl_int(*clIcdGetPlatformIDs_t)(cl_uint, cl_platform_id *, cl_uint *);
|
||||
|
||||
clGetFunctionAddress_t legacyGetFunctionAddress =
|
||||
reinterpret_cast<clGetFunctionAddress_t>(dlsym(otherPlatform, "clGetExtensionFunctionAddress"));
|
||||
clIcdGetPlatformIDs_t legacyGetPlatformIDs =
|
||||
reinterpret_cast<clIcdGetPlatformIDs_t>(legacyGetFunctionAddress("clIcdGetPlatformIDsKHR"));
|
||||
|
||||
cl_uint numLegacyPlatforms = 0;
|
||||
legacyGetPlatformIDs(0, nullptr, &numLegacyPlatforms);
|
||||
|
||||
shouldLoad = (numDevices > 0) || (numLegacyPlatforms == 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (otherPlatform != nullptr) {
|
||||
dlclose(otherPlatform);
|
||||
}
|
||||
|
||||
return shouldLoad;
|
||||
}
|
||||
|
||||
#endif // defined(ATI_OS_WIN)
|
||||
|
||||
CL_API_ENTRY cl_int CL_API_CALL clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
cl_platform_id* platforms,
|
||||
cl_uint* num_platforms) {
|
||||
if (((num_entries > 0 || num_platforms == NULL) && platforms == NULL) ||
|
||||
(num_entries == 0 && platforms != NULL)) {
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
static bool shouldLoad = true;
|
||||
|
||||
static std::once_flag initOnce;
|
||||
std::call_once(initOnce, [](){ shouldLoad = ShouldLoadPlatform(); });
|
||||
|
||||
if (!shouldLoad) {
|
||||
*not_null(num_platforms) = 0;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
if (!amd::Runtime::initialized()) {
|
||||
amd::Runtime::init();
|
||||
}
|
||||
|
||||
if (num_platforms != NULL && platforms == NULL) {
|
||||
*num_platforms = 1;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
assert(platforms != NULL && "check the code above");
|
||||
*platforms = reinterpret_cast<cl_platform_id>(&amd::PlatformID::Platform);
|
||||
|
||||
*not_null(num_platforms) = 1;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
Diff را بارگزاری کن
@@ -13,7 +13,7 @@ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(CONFIG_PACKAGE_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/hip)
|
||||
|
||||
add_definitions(-D__HIP_VDI__ -D__HIP_PLATFORM_HCC__ -DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=0 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_HSA_DEVICE -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER -DUSE_PROF_API)
|
||||
add_definitions(-D__HIP_VDI__ -D__HIP_PLATFORM_HCC__ -DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=0 -DCL_TARGET_OPENCL_VERSION=220 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_HSA_DEVICE -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER -DUSE_PROF_API)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
|
||||
add_definitions(-DDEBUG)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "vdi_common.hpp"
|
||||
#include <icd/loader/icd_dispatch.h>
|
||||
|
||||
KHRicdVendorDispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {0};
|
||||
cl_icd_dispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {0};
|
||||
amd::PlatformIDS amd::PlatformID::Platform = {amd::ICDDispatchedObject::icdVendorDispatch_};
|
||||
|
||||
RUNTIME_ENTRY(cl_int, clGetDeviceIDs,
|
||||
|
||||
مرجع در شماره جدید
Block a user