SWDEV-286322 - clean up trailing white space

Change-Id: Ie47bc977e1598356b455957d96f9afa37794c1fd
This commit is contained in:
jujiang
2021-09-01 14:53:14 -04:00
parent 4790350f63
commit 422a26142d
32 changed files with 3109 additions and 3109 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ public:
UINT getDepth() const {return objDesc_.objSize_.Depth;}
size_t getElementBytes(DXGI_FORMAT dxgiFomat);
size_t getElementBytes() {return getElementBytes(objDesc_.dxgiFormat_);}
DXGI_FORMAT getDxgiFormat() {return objDesc_.dxgiFormat_;}
DXGI_FORMAT getDxgiFormat() {return objDesc_.dxgiFormat_;}
UINT getSubresource() const {return subRes_;}
const D3D10ObjDesc_t* getObjDesc() const { return &objDesc_; }
+1 -1
View File
@@ -166,7 +166,7 @@ public:
UINT getDepth() const {return objDesc_.objSize_.Depth;}
size_t getElementBytes(DXGI_FORMAT dxgiFomat, cl_uint plane);
size_t getElementBytes() {return getElementBytes(objDesc_.dxgiFormat_, plane_);}
DXGI_FORMAT getDxgiFormat() {return objDesc_.dxgiFormat_;}
DXGI_FORMAT getDxgiFormat() {return objDesc_.dxgiFormat_;}
UINT getSubresource() const {return subRes_;}
INT getPlane() const {return plane_;}
const D3D11ObjDesc_t* getObjDesc() const { return &objDesc_; }
+2 -2
View File
@@ -131,7 +131,7 @@ public:
//if the resouce is being used
if(resources_.size()) {
for(auto& it = resources_.cbegin(); it != resources_.cend(); it++) {
if( surfInfo_.resource &&
if( surfInfo_.resource &&
((*it).first.surfInfo.resource == surfInfo_.resource) &&
((*it).first.surfPlane == surfPlane_)) {
resources_.erase(it);
@@ -141,7 +141,7 @@ public:
}
}
}
static int initD3D9Object(const Context& amdContext, cl_dx9_media_adapter_type_khr adapter_type,
static int initD3D9Object(const Context& amdContext, cl_dx9_media_adapter_type_khr adapter_type,
cl_dx9_surface_info_khr* cl_surf_info, cl_uint plane, D3D9Object& obj);
cl_uint getMiscFlag(void);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -97,7 +97,7 @@ On Windows, add the "stub" ICD by adding a `REG_DWORD` value to the registry key
// For 32-bit operating systems, or 64-bit tests on a 64-bit operating system:
HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
// For 32-bit tests on a 64-bit operating system:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Khronos\OpenCL\Vendors
+4 -4
View File
@@ -43,7 +43,7 @@ void khrIcdVendorAdd(const char *libraryName)
KHRicdVendor *vendorIterator = NULL;
// require that the library name be valid
if (!libraryName)
if (!libraryName)
{
goto Done;
}
@@ -136,7 +136,7 @@ void khrIcdVendorAdd(const char *libraryName)
CL_PLATFORM_ICD_SUFFIX_KHR,
suffixSize,
suffix,
NULL);
NULL);
if (CL_SUCCESS != result)
{
free(suffix);
@@ -145,7 +145,7 @@ void khrIcdVendorAdd(const char *libraryName)
// allocate a structure for the vendor
vendor = (KHRicdVendor*)malloc(sizeof(*vendor) );
if (!vendor)
if (!vendor)
{
free(suffix);
KHR_ICD_TRACE("failed to allocate memory\n");
@@ -155,7 +155,7 @@ void khrIcdVendorAdd(const char *libraryName)
// populate vendor data
vendor->library = khrIcdOsLibraryLoad(libraryName);
if (!vendor->library)
if (!vendor->library)
{
free(suffix);
free(vendor);
+186 -186
View File
@@ -42,11 +42,11 @@ clGetPlatformIDs(cl_uint num_entries,
return CL_INVALID_VALUE;
}
// set num_platforms to 0 and set all platform pointers to NULL
if (num_platforms)
if (num_platforms)
{
*num_platforms = 0;
}
for (i = 0; i < num_entries && platforms; ++i)
for (i = 0; i < num_entries && platforms; ++i)
{
platforms[i] = NULL;
}
@@ -71,56 +71,56 @@ clGetPlatformIDs(cl_uint num_entries,
return CL_SUCCESS;
}
CL_API_ENTRY cl_int CL_API_CALL
clGetPlatformInfo(cl_platform_id platform,
CL_API_ENTRY cl_int CL_API_CALL
clGetPlatformInfo(cl_platform_id platform,
cl_platform_info param_name,
size_t param_value_size,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
// initialize the platforms (in case they have not been already)
khrIcdInitialize();
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
return platform->dispatch->clGetPlatformInfo(
platform,
param_name,
param_value_size,
param_value,
param_name,
param_value_size,
param_value,
param_value_size_ret);
}
// Device APIs
CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceIDs(cl_platform_id platform,
cl_device_type device_type,
cl_uint num_entries,
cl_device_id * devices,
cl_device_type device_type,
cl_uint num_entries,
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0
{
// initialize the platforms (in case they have not been already)
khrIcdInitialize();
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
return platform->dispatch->clGetDeviceIDs(
platform,
device_type,
num_entries,
devices,
device_type,
num_entries,
devices,
num_devices);
}
CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceInfo(
cl_device_id device,
cl_device_info param_name,
size_t param_value_size,
cl_device_info param_name,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(device, CL_INVALID_DEVICE);
return device->dispatch->clGetDeviceInfo(
device,
param_name,
param_value_size,
param_name,
param_value_size,
param_value,
param_value_size_ret);
}
@@ -147,7 +147,7 @@ clRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(device, CL_INVALID_DEVICE);
return device->dispatch->clRetainDevice(device);
}
CL_API_ENTRY cl_int CL_API_CALL
clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2
{
@@ -155,7 +155,7 @@ clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2
return device->dispatch->clReleaseDevice(device);
}
// Context APIs
// Context APIs
CL_API_ENTRY cl_context CL_API_CALL
clCreateContext(const cl_context_properties * properties,
cl_uint num_devices,
@@ -166,9 +166,9 @@ clCreateContext(const cl_context_properties * properties,
{
// initialize the platforms (in case they have not been already)
khrIcdInitialize();
if (!num_devices || !devices)
if (!num_devices || !devices)
{
if (errcode_ret)
if (errcode_ret)
{
*errcode_ret = CL_INVALID_VALUE;
}
@@ -224,32 +224,32 @@ clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0
}
CL_API_ENTRY cl_int CL_API_CALL
clGetContextInfo(cl_context context,
cl_context_info param_name,
size_t param_value_size,
void * param_value,
clGetContextInfo(cl_context context,
cl_context_info param_name,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(context, CL_INVALID_CONTEXT);
return context->dispatch->clGetContextInfo(
context,
param_name,
param_value_size,
param_value,
context,
param_name,
param_value_size,
param_value,
param_value_size_ret);
}
// Command Queue APIs
CL_API_ENTRY cl_command_queue CL_API_CALL
clCreateCommandQueue(cl_context context,
cl_device_id device,
clCreateCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue_properties properties,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
return context->dispatch->clCreateCommandQueue(
context,
device,
context,
device,
properties,
errcode_ret);
}
@@ -351,10 +351,10 @@ clGetSupportedImageFormats(cl_context context,
image_formats,
num_image_formats);
}
CL_API_ENTRY cl_int CL_API_CALL
clGetMemObjectInfo(cl_mem memobj,
cl_mem_info param_name,
cl_mem_info param_name,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
@@ -362,7 +362,7 @@ clGetMemObjectInfo(cl_mem memobj,
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(memobj, CL_INVALID_MEM_OBJECT);
return memobj->dispatch->clGetMemObjectInfo(
memobj,
param_name,
param_name,
param_value_size,
param_value,
param_value_size_ret);
@@ -370,7 +370,7 @@ clGetMemObjectInfo(cl_mem memobj,
CL_API_ENTRY cl_int CL_API_CALL
clGetImageInfo(cl_mem image,
cl_image_info param_name,
cl_image_info param_name,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
@@ -378,7 +378,7 @@ clGetImageInfo(cl_mem image,
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(image, CL_INVALID_MEM_OBJECT);
return image->dispatch->clGetImageInfo(
image,
param_name,
param_name,
param_value_size,
param_value,
param_value_size_ret);
@@ -387,16 +387,16 @@ clGetImageInfo(cl_mem image,
// Sampler APIs
CL_API_ENTRY cl_sampler CL_API_CALL
clCreateSampler(cl_context context,
cl_bool normalized_coords,
cl_addressing_mode addressing_mode,
cl_bool normalized_coords,
cl_addressing_mode addressing_mode,
cl_filter_mode filter_mode,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
return context->dispatch->clCreateSampler(
context,
normalized_coords,
addressing_mode,
normalized_coords,
addressing_mode,
filter_mode,
errcode_ret);
}
@@ -430,7 +430,7 @@ clGetSamplerInfo(cl_sampler sampler,
param_value,
param_value_size_ret);
}
// Program Object APIs
CL_API_ENTRY cl_program CL_API_CALL
clCreateProgramWithSource(cl_context context,
@@ -502,7 +502,7 @@ CL_API_ENTRY cl_int CL_API_CALL
clBuildProgram(cl_program program,
cl_uint num_devices,
const cl_device_id * device_list,
const char * options,
const char * options,
void (CL_CALLBACK *pfn_notify)(cl_program program, void * user_data),
void * user_data) CL_API_SUFFIX__VERSION_1_0
{
@@ -511,16 +511,16 @@ clBuildProgram(cl_program program,
program,
num_devices,
device_list,
options,
options,
pfn_notify,
user_data);
user_data);
}
CL_API_ENTRY cl_int CL_API_CALL
clCompileProgram(cl_program program,
cl_uint num_devices,
const cl_device_id * device_list,
const char * options,
const char * options,
cl_uint num_input_headers,
const cl_program * input_headers,
const char ** header_include_names,
@@ -532,12 +532,12 @@ clCompileProgram(cl_program program,
program,
num_devices,
device_list,
options,
options,
num_input_headers,
input_headers,
header_include_names,
pfn_notify,
user_data);
user_data);
}
CL_API_ENTRY cl_program CL_API_CALL
@@ -556,12 +556,12 @@ clLinkProgram(cl_context context,
context,
num_devices,
device_list,
options,
options,
num_input_programs,
input_programs,
pfn_notify,
user_data,
errcode_ret);
errcode_ret);
}
CL_API_ENTRY cl_int CL_API_CALL
@@ -575,7 +575,7 @@ clSetProgramSpecializationConstant(cl_program program,
program,
spec_id,
spec_size,
spec_value);
spec_value);
}
CL_API_ENTRY cl_int CL_API_CALL
@@ -587,7 +587,7 @@ clSetProgramReleaseCallback(cl_program program,
return program->dispatch->clSetProgramReleaseCallback(
program,
pfn_notify,
user_data);
user_data);
}
CL_API_ENTRY cl_int CL_API_CALL
@@ -595,7 +595,7 @@ clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2
{
// initialize the platforms (in case they have not been already)
khrIcdInitialize();
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
return platform->dispatch->clUnloadPlatformCompiler(platform);
}
@@ -632,7 +632,7 @@ clGetProgramBuildInfo(cl_program program,
param_value,
param_value_size_ret);
}
// Kernel Object APIs
CL_API_ENTRY cl_kernel CL_API_CALL
clCreateKernel(cl_program program,
@@ -745,9 +745,9 @@ CL_API_ENTRY cl_int CL_API_CALL
clWaitForEvents(cl_uint num_events,
const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0
{
if (!num_events || !event_list)
if (!num_events || !event_list)
{
return CL_INVALID_VALUE;
return CL_INVALID_VALUE;
}
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(event_list[0], CL_INVALID_EVENT);
return event_list[0]->dispatch->clWaitForEvents(
@@ -770,7 +770,7 @@ clGetEventInfo(cl_event event,
param_value,
param_value_size_ret);
}
CL_API_ENTRY cl_int CL_API_CALL
clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0
{
@@ -801,7 +801,7 @@ clGetEventProfilingInfo(cl_event event,
param_value,
param_value_size_ret);
}
// Flush and Finish APIs
CL_API_ENTRY cl_int CL_API_CALL
clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
@@ -823,7 +823,7 @@ clEnqueueReadBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
size_t offset,
size_t cb,
size_t cb,
void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
@@ -835,25 +835,25 @@ clEnqueueReadBuffer(cl_command_queue command_queue,
buffer,
blocking_read,
offset,
cb,
cb,
ptr,
num_events_in_wait_list,
event_wait_list,
event);
}
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReadBufferRect(
cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t * buffer_origin,
const size_t * host_origin,
const size_t * host_origin,
const size_t * region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
size_t host_slice_pitch,
void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
@@ -865,12 +865,12 @@ clEnqueueReadBufferRect(
buffer,
blocking_read,
buffer_origin,
host_origin,
host_origin,
region,
buffer_row_pitch,
buffer_slice_pitch,
host_row_pitch,
host_slice_pitch,
host_slice_pitch,
ptr,
num_events_in_wait_list,
event_wait_list,
@@ -878,41 +878,41 @@ clEnqueueReadBufferRect(
}
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueWriteBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
size_t offset,
size_t cb,
const void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
clEnqueueWriteBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
size_t offset,
size_t cb,
const void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueWriteBuffer(
command_queue,
buffer,
blocking_write,
offset,
cb,
ptr,
num_events_in_wait_list,
event_wait_list,
command_queue,
buffer,
blocking_write,
offset,
cb,
ptr,
num_events_in_wait_list,
event_wait_list,
event);
}
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueWriteBufferRect(
cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t * buffer_origin,
const size_t * host_origin,
const size_t * host_origin,
const size_t * region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
size_t host_slice_pitch,
const void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
@@ -924,12 +924,12 @@ clEnqueueWriteBufferRect(
buffer,
blocking_read,
buffer_origin,
host_origin,
host_origin,
region,
buffer_row_pitch,
buffer_slice_pitch,
host_row_pitch,
host_slice_pitch,
host_slice_pitch,
ptr,
num_events_in_wait_list,
event_wait_list,
@@ -938,47 +938,47 @@ clEnqueueWriteBufferRect(
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueFillBuffer(cl_command_queue command_queue,
cl_mem buffer,
const void * pattern,
size_t pattern_size,
size_t offset,
size_t cb,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_mem buffer,
const void * pattern,
size_t pattern_size,
size_t offset,
size_t cb,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueFillBuffer(
command_queue,
command_queue,
buffer,
pattern,
pattern,
pattern_size,
offset,
cb,
cb,
num_events_in_wait_list,
event_wait_list,
event);
}
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueCopyBuffer(cl_command_queue command_queue,
clEnqueueCopyBuffer(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
cl_mem dst_buffer,
size_t src_offset,
size_t dst_offset,
size_t cb,
size_t cb,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueCopyBuffer(
command_queue,
command_queue,
src_buffer,
dst_buffer,
dst_buffer,
src_offset,
dst_offset,
cb,
cb,
num_events_in_wait_list,
event_wait_list,
event);
@@ -986,12 +986,12 @@ clEnqueueCopyBuffer(cl_command_queue command_queue,
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueCopyBufferRect(
cl_command_queue command_queue,
cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
cl_mem dst_buffer,
const size_t * src_origin,
const size_t * dst_origin,
const size_t * region,
const size_t * region,
size_t src_row_pitch,
size_t src_slice_pitch,
size_t dst_row_pitch,
@@ -1002,12 +1002,12 @@ clEnqueueCopyBufferRect(
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueCopyBufferRect(
command_queue,
command_queue,
src_buffer,
dst_buffer,
dst_buffer,
src_origin,
dst_origin,
region,
region,
src_row_pitch,
src_slice_pitch,
dst_row_pitch,
@@ -1020,11 +1020,11 @@ clEnqueueCopyBufferRect(
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReadImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_read,
cl_bool blocking_read,
const size_t * origin,
const size_t * region,
size_t row_pitch,
size_t slice_pitch,
size_t slice_pitch,
void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
@@ -1034,11 +1034,11 @@ clEnqueueReadImage(cl_command_queue command_queue,
return command_queue->dispatch->clEnqueueReadImage(
command_queue,
image,
blocking_read,
blocking_read,
origin,
region,
row_pitch,
slice_pitch,
slice_pitch,
ptr,
num_events_in_wait_list,
event_wait_list,
@@ -1048,11 +1048,11 @@ clEnqueueReadImage(cl_command_queue command_queue,
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueWriteImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_write,
cl_bool blocking_write,
const size_t * origin,
const size_t * region,
size_t input_row_pitch,
size_t input_slice_pitch,
size_t input_slice_pitch,
const void * ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
@@ -1062,11 +1062,11 @@ clEnqueueWriteImage(cl_command_queue command_queue,
return command_queue->dispatch->clEnqueueWriteImage(
command_queue,
image,
blocking_write,
blocking_write,
origin,
region,
input_row_pitch,
input_slice_pitch,
input_slice_pitch,
ptr,
num_events_in_wait_list,
event_wait_list,
@@ -1077,19 +1077,19 @@ CL_API_ENTRY cl_int CL_API_CALL
clEnqueueFillImage(cl_command_queue command_queue,
cl_mem image,
const void * fill_color,
const size_t origin[3],
const size_t origin[3],
const size_t region[3],
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueFillImage(
command_queue,
image,
fill_color,
fill_color,
origin,
region,
region,
num_events_in_wait_list,
event_wait_list,
event);
@@ -1098,10 +1098,10 @@ clEnqueueFillImage(cl_command_queue command_queue,
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueCopyImage(cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_image,
cl_mem dst_image,
const size_t * src_origin,
const size_t * dst_origin,
const size_t * region,
const size_t * region,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0
@@ -1110,10 +1110,10 @@ clEnqueueCopyImage(cl_command_queue command_queue,
return command_queue->dispatch->clEnqueueCopyImage(
command_queue,
src_image,
dst_image,
dst_image,
src_origin,
dst_origin,
region,
region,
num_events_in_wait_list,
event_wait_list,
event);
@@ -1122,9 +1122,9 @@ clEnqueueCopyImage(cl_command_queue command_queue,
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_buffer,
cl_mem dst_buffer,
const size_t * src_origin,
const size_t * region,
const size_t * region,
size_t dst_offset,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
@@ -1134,9 +1134,9 @@ clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
return command_queue->dispatch->clEnqueueCopyImageToBuffer(
command_queue,
src_image,
dst_buffer,
dst_buffer,
src_origin,
region,
region,
dst_offset,
num_events_in_wait_list,
event_wait_list,
@@ -1146,10 +1146,10 @@ clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueCopyBufferToImage(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_image,
cl_mem dst_image,
size_t src_offset,
const size_t * dst_origin,
const size_t * region,
const size_t * region,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0
@@ -1158,10 +1158,10 @@ clEnqueueCopyBufferToImage(cl_command_queue command_queue,
return command_queue->dispatch->clEnqueueCopyBufferToImage(
command_queue,
src_buffer,
dst_image,
dst_image,
src_offset,
dst_origin,
region,
region,
num_events_in_wait_list,
event_wait_list,
event);
@@ -1170,7 +1170,7 @@ clEnqueueCopyBufferToImage(cl_command_queue command_queue,
CL_API_ENTRY void * CL_API_CALL
clEnqueueMapBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_map,
cl_bool blocking_map,
cl_map_flags map_flags,
size_t offset,
size_t cb,
@@ -1183,7 +1183,7 @@ clEnqueueMapBuffer(cl_command_queue command_queue,
return command_queue->dispatch->clEnqueueMapBuffer(
command_queue,
buffer,
blocking_map,
blocking_map,
map_flags,
offset,
cb,
@@ -1195,9 +1195,9 @@ clEnqueueMapBuffer(cl_command_queue command_queue,
CL_API_ENTRY void * CL_API_CALL
clEnqueueMapImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_map,
cl_map_flags map_flags,
cl_mem image,
cl_bool blocking_map,
cl_map_flags map_flags,
const size_t * origin,
const size_t * region,
size_t * image_row_pitch,
@@ -1210,9 +1210,9 @@ clEnqueueMapImage(cl_command_queue command_queue,
KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueMapImage(
command_queue,
image,
blocking_map,
map_flags,
image,
blocking_map,
map_flags,
origin,
region,
image_row_pitch,
@@ -1303,9 +1303,9 @@ clEnqueueTask(cl_command_queue command_queue,
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueNativeKernel(cl_command_queue command_queue,
void (CL_CALLBACK * user_func)(void *),
void (CL_CALLBACK * user_func)(void *),
void * args,
size_t cb_args,
size_t cb_args,
cl_uint num_mem_objects,
const cl_mem * mem_list,
const void ** args_mem_loc,
@@ -1316,9 +1316,9 @@ clEnqueueNativeKernel(cl_command_queue command_queue,
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueNativeKernel(
command_queue,
user_func,
user_func,
args,
cb_args,
cb_args,
num_mem_objects,
mem_list,
args_mem_loc,
@@ -1362,7 +1362,7 @@ clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(function_name, NULL);
// make sure the ICD is initialized
khrIcdInitialize();
khrIcdInitialize();
// return any ICD-aware extensions
@@ -1442,18 +1442,18 @@ clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
// Deprecated APIs
CL_API_ENTRY cl_int CL_API_CALL
clSetCommandQueueProperty(cl_command_queue command_queue,
cl_command_queue_properties properties,
cl_command_queue_properties properties,
cl_bool enable,
cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clSetCommandQueueProperty(
command_queue,
properties,
properties,
enable,
old_properties);
}
CL_API_ENTRY cl_int CL_API_CALL
clCreateSubDevicesEXT(
cl_device_id in_device,
@@ -1491,7 +1491,7 @@ clCreateImage2D(cl_context context,
const cl_image_format * image_format,
size_t image_width,
size_t image_height,
size_t image_row_pitch,
size_t image_row_pitch,
void * host_ptr,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
{
@@ -1502,7 +1502,7 @@ clCreateImage2D(cl_context context,
image_format,
image_width,
image_height,
image_row_pitch,
image_row_pitch,
host_ptr,
errcode_ret);
}
@@ -1511,11 +1511,11 @@ CL_API_ENTRY cl_mem CL_API_CALL
clCreateImage3D(cl_context context,
cl_mem_flags flags,
const cl_image_format * image_format,
size_t image_width,
size_t image_width,
size_t image_height,
size_t image_depth,
size_t image_row_pitch,
size_t image_slice_pitch,
size_t image_depth,
size_t image_row_pitch,
size_t image_slice_pitch,
void * host_ptr,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
{
@@ -1524,11 +1524,11 @@ clCreateImage3D(cl_context context,
context,
flags,
image_format,
image_width,
image_width,
image_height,
image_depth,
image_row_pitch,
image_slice_pitch,
image_depth,
image_row_pitch,
image_slice_pitch,
host_ptr,
errcode_ret);
}
@@ -1577,7 +1577,7 @@ clGetExtensionFunctionAddress(const char *function_name) CL_EXT_SUFFIX__VERSION_
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(function_name, NULL);
// make sure the ICD is initialized
khrIcdInitialize();
khrIcdInitialize();
function_name_length = strlen(function_name);
// return any ICD-aware extensions
@@ -1651,7 +1651,7 @@ clGetExtensionFunctionAddress(const char *function_name) CL_EXT_SUFFIX__VERSION_
{
size_t vendor_suffix_length = strlen(vendor->suffix);
if (vendor_suffix_length <= function_name_length && vendor_suffix_length > 0)
{
{
const char *function_suffix = function_name+function_name_length-vendor_suffix_length;
if (!strcmp(function_suffix, vendor->suffix) )
{
@@ -1756,7 +1756,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetGLObjectInfo(
gl_object_type,
gl_object_name);
}
CL_API_ENTRY cl_int CL_API_CALL clGetGLTextureInfo(
cl_mem memobj,
cl_gl_texture_info param_name,
@@ -1824,7 +1824,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetGLContextInfoKHR(
// determine the platform to use from the properties specified
khrIcdContextPropertiesGetPlatform(properties, &platform);
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
return platform->dispatch->clGetGLContextInfoKHR(
properties,
param_name,
@@ -1858,8 +1858,8 @@ clGetDeviceIDsFromD3D10KHR(
cl_d3d10_device_source_khr d3d_device_source,
void *d3d_object,
cl_d3d10_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id *devices,
cl_uint num_entries,
cl_device_id *devices,
cl_uint *num_devices)
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(platform, CL_INVALID_PLATFORM);
@@ -1868,17 +1868,17 @@ clGetDeviceIDsFromD3D10KHR(
d3d_device_source,
d3d_object,
d3d_device_set,
num_entries,
devices,
num_entries,
devices,
num_devices);
}
CL_API_ENTRY cl_mem CL_API_CALL
CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromD3D10BufferKHR(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer *resource,
cl_int *errcode_ret)
cl_int *errcode_ret)
{
KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
return context->dispatch->clCreateFromD3D10BufferKHR(
@@ -1905,7 +1905,7 @@ clCreateFromD3D10Texture2DKHR(
errcode_ret);
}
CL_API_ENTRY cl_mem CL_API_CALL
CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromD3D10Texture3DKHR(
cl_context context,
cl_mem_flags flags,
@@ -1919,17 +1919,17 @@ clCreateFromD3D10Texture3DKHR(
flags,
resource,
subresource,
errcode_ret);
errcode_ret);
}
CL_API_ENTRY cl_int CL_API_CALL
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireD3D10ObjectsKHR(
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_event *event)
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueAcquireD3D10ObjectsKHR(
@@ -1941,14 +1941,14 @@ clEnqueueAcquireD3D10ObjectsKHR(
event);
}
CL_API_ENTRY cl_int CL_API_CALL
CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseD3D10ObjectsKHR(
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_event *event)
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(command_queue, CL_INVALID_COMMAND_QUEUE);
return command_queue->dispatch->clEnqueueReleaseD3D10ObjectsKHR(
@@ -1957,7 +1957,7 @@ clEnqueueReleaseD3D10ObjectsKHR(
mem_objects,
num_events_in_wait_list,
event_wait_list,
event);
event);
}
/*
@@ -2109,7 +2109,7 @@ clCreateFromDX9MediaSurfaceKHR(
cl_mem_flags flags,
cl_dx9_media_adapter_type_khr adapter_type,
void * surface_info,
cl_uint plane,
cl_uint plane,
cl_int * errcode_ret)
{
KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
@@ -2118,7 +2118,7 @@ clCreateFromDX9MediaSurfaceKHR(
flags,
adapter_type,
surface_info,
plane,
plane,
errcode_ret);
}
@@ -2162,7 +2162,7 @@ clEnqueueReleaseDX9MediaSurfacesKHR(
#endif
CL_API_ENTRY cl_int CL_API_CALL
CL_API_ENTRY cl_int CL_API_CALL
clSetEventCallback(
cl_event event,
cl_int command_exec_callback_type,
@@ -2196,13 +2196,13 @@ clCreateSubBuffer(
CL_API_ENTRY cl_int CL_API_CALL
clSetMemObjectDestructorCallback(
cl_mem memobj,
void (CL_CALLBACK * pfn_notify)( cl_mem, void*),
cl_mem memobj,
void (CL_CALLBACK * pfn_notify)( cl_mem, void*),
void * user_data ) CL_API_SUFFIX__VERSION_1_1
{
KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(memobj, CL_INVALID_MEM_OBJECT);
return memobj->dispatch->clSetMemObjectDestructorCallback(
memobj,
memobj,
pfn_notify,
user_data);
}
+3 -3
View File
@@ -30,7 +30,7 @@
static pthread_once_t initialized = PTHREAD_ONCE_INIT;
/*
*
*
* Vendor enumeration functions
*
*/
@@ -52,7 +52,7 @@ void khrIcdOsVendorsEnumerate(void)
}
dir = opendir(vendorPath);
if (NULL == dir)
if (NULL == dir)
{
KHR_ICD_TRACE("Failed to open path %s, continuing\n", vendorPath);
}
@@ -150,7 +150,7 @@ void khrIcdOsVendorsEnumerateOnce(void)
}
/*
*
*
* Dynamic library loading functions
*
*/
@@ -96,12 +96,12 @@ void adapterFree(WinAdapter *pWinAdapter)
}
/*
*
*
* Vendor enumeration functions
*
*/
// go through the list of vendors in the registry and call khrIcdVendorAdd
// go through the list of vendors in the registry and call khrIcdVendorAdd
// for each vendor encountered
BOOL CALLBACK khrIcdOsVendorsEnumerate(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContext)
{
@@ -164,7 +164,7 @@ BOOL CALLBACK khrIcdOsVendorsEnumerate(PINIT_ONCE InitOnce, PVOID Parameter, PVO
break;
}
KHR_ICD_TRACE("Value %s found...\n", cszLibraryName);
// Require that the value be a DWORD and equal zero
if (REG_DWORD != dwLibraryNameType)
{
@@ -243,9 +243,9 @@ void khrIcdOsVendorsEnumerateOnce()
{
InitOnceExecuteOnce(&initialized, khrIcdOsVendorsEnumerate, NULL, NULL);
}
/*
*
*
* Dynamic library loading functions
*
*/
+12 -12
View File
@@ -88,7 +88,7 @@ clGetPlatformIDs(cl_uint num_entries ,
platforms,
num_platforms);
return_value = clIcdGetPlatformIDsKHR(num_entries, platforms, num_platforms);
test_icd_stub_log("Value returned: %d\n", return_value);
test_icd_stub_log("Value returned: %d\n", return_value);
return return_value;
}
@@ -102,11 +102,11 @@ clGetPlatformInfo(cl_platform_id platform,
cl_int ret = CL_SUCCESS;
const char *returnString = NULL;
size_t returnStringLength = 0;
/*test_icd_stub_log("clGetPlatformInfo(%p, %u, %u, %p, %p)\n",
platform,
param_name,
param_value_size,
param_value,
/*test_icd_stub_log("clGetPlatformInfo(%p, %u, %u, %p, %p)\n",
platform,
param_name,
param_value_size,
param_value,
param_value_size_ret);*/
// validate the arguments
@@ -306,13 +306,13 @@ clCreateContextFromType(const cl_context_properties * properties,
errcode_ret);
pfn_notify(NULL, NULL, 0, NULL);
test_icd_stub_log ("createcontext_callback(%p, %p, %u, %p)\n",
NULL,
NULL,
0,
test_icd_stub_log ("createcontext_callback(%p, %p, %u, %p)\n",
NULL,
NULL,
0,
NULL);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
obj);
return obj;
}
+3 -3
View File
@@ -4,7 +4,7 @@
#include "CL/cl.h"
#include "CL/cl_ext.h"
struct driverStubextFunc_st
struct driverStubextFunc_st
{
const char *name;
void *func;
@@ -12,7 +12,7 @@ struct driverStubextFunc_st
#define EXT_FUNC(name) { #name, (void*)(name) }
static struct driverStubextFunc_st clExtensions[] =
static struct driverStubextFunc_st clExtensions[] =
{
EXT_FUNC(clIcdGetPlatformIDsKHR),
};
@@ -23,7 +23,7 @@ CL_API_ENTRY void * CL_API_CALL
clGetExtensionFunctionAddress(const char *name)
{
int ii;
for (ii = 0; ii < clExtensionCount; ii++) {
if (!strcmp(name, clExtensions[ii].name)) {
return clExtensions[ii].func;
+20 -20
View File
@@ -13,14 +13,14 @@ clCreateFromGLBuffer(cl_context context ,
cl_mem_flags flags ,
cl_GLuint bufret_mem ,
int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
{
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
{
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
test_icd_stub_log("clCreateFromGLBuffer(%p, %x, %u, %p)\n",
context,
flags,
bufret_mem,
bufret_mem,
errcode_ret);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_mem);
return ret_mem;
}
@@ -33,7 +33,7 @@ clCreateFromGLTexture(cl_context context ,
cl_GLuint texture ,
cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_2
{
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
test_icd_stub_log("clCreateFromGLTexture(%p, %x, %d, %d, %u, %p)\n",
context ,
flags ,
@@ -41,7 +41,7 @@ clCreateFromGLTexture(cl_context context ,
miplevel ,
texture ,
errcode_ret );
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_mem);
return ret_mem;
}
@@ -54,7 +54,7 @@ clCreateFromGLTexture2D(cl_context context,
cl_GLuint texture,
cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
{
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
test_icd_stub_log("clCreateFromGLTexture2D(%p, %x, %d, %d, %u, %p)\n",
context,
flags,
@@ -62,7 +62,7 @@ clCreateFromGLTexture2D(cl_context context,
miplevel,
texture,
errcode_ret );
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_mem);
return ret_mem;
}
@@ -76,7 +76,7 @@ clCreateFromGLTexture3D(cl_context context,
cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
{
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
test_icd_stub_log("clCreateFromGLTexture3D(%p, %x, %d, %d, %u, %p)\n",
context,
flags,
@@ -84,7 +84,7 @@ clCreateFromGLTexture3D(cl_context context,
miplevel,
texture,
errcode_ret );
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_mem);
return ret_mem;
}
@@ -95,13 +95,13 @@ clCreateFromGLRenderbuffer(cl_context context,
cl_GLuint renderbuffer,
cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
{
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
cl_mem ret_mem = (cl_mem)(SIZE_T_MAX);
test_icd_stub_log("clCreateFromGLRenderbuffer(%p, %x, %d, %p)\n",
context,
flags,
renderbuffer,
errcode_ret);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_mem);
return ret_mem;
}
@@ -110,13 +110,13 @@ 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
{
{
cl_int ret_val = -5;
test_icd_stub_log("clGetGLObjectInfo(%p, %p, %p)\n",
memobj,
gl_object_type,
gl_object_name);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_val);
return ret_val;
}
@@ -135,7 +135,7 @@ clGetGLTextureInfo(cl_mem memobj,
param_value_size,
param_value,
param_value_size_ret );
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_val);
return ret_val;
}
@@ -157,7 +157,7 @@ clEnqueueAcquireGLObjects(cl_command_queue command_queue,
event_wait_list,
event);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_val);
return ret_val;
}
@@ -178,8 +178,8 @@ clEnqueueReleaseGLObjects(cl_command_queue command_queue,
mem_objects,
num_events_in_wait_list,
event_wait_list,
event);
test_icd_stub_log("Value returned: %p\n",
event);
test_icd_stub_log("Value returned: %p\n",
ret_val);
return ret_val;
}
@@ -199,7 +199,7 @@ clGetGLContextInfoKHR(const cl_context_properties * properties,
param_value,
param_value_size_ret);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_val);
return ret_val;
}
@@ -215,7 +215,7 @@ clCreateEventFromGLsyncKHR(cl_context context ,
context,
cl_GLsync,
errcode_ret);
test_icd_stub_log("Value returned: %p\n",
test_icd_stub_log("Value returned: %p\n",
ret_event);
return ret_event;
}
+2 -2
View File
@@ -21,7 +21,7 @@
*/
extern CL_API_ENTRY cl_int CL_API_CALL
clSetCommandQueueProperty(cl_command_queue /* command_queue */,
cl_command_queue_properties /* properties */,
cl_command_queue_properties /* properties */,
cl_bool /* enable */,
cl_command_queue_properties * /* old_properties */);
@@ -152,7 +152,7 @@ cl_int cliIcdDispatchTableCreate(CLIicdDispatchTable **outDispatchTable)
ICD_DISPATCH_TABLE_ENTRY ( /*clRetainDeviceEXT*/ NULL);
ICD_DISPATCH_TABLE_ENTRY ( /*clReleaseDevice*/NULL);
ICD_DISPATCH_TABLE_ENTRY ( clCreateEventFromGLsyncKHR);
ICD_DISPATCH_TABLE_ENTRY ( clCreateEventFromGLsyncKHR);
ICD_DISPATCH_TABLE_ENTRY ( clCreateSubDevices);
ICD_DISPATCH_TABLE_ENTRY ( clRetainDevice);
+15 -15
View File
@@ -4,40 +4,40 @@
void CL_CALLBACK createcontext_callback(const char* _a, const void* _b, size_t _c, void* _d)
{
test_icd_app_log("createcontext_callback(%p, %p, %u, %p)\n",
_a,
_b,
_c,
test_icd_app_log("createcontext_callback(%p, %p, %u, %p)\n",
_a,
_b,
_c,
_d);
}
void CL_CALLBACK setmemobjectdestructor_callback(cl_mem _a, void* _b)
{
test_icd_app_log("setmemobjectdestructor_callback(%p, %p)\n",
_a,
test_icd_app_log("setmemobjectdestructor_callback(%p, %p)\n",
_a,
_b);
}
void CL_CALLBACK program_callback(cl_program _a, void* _b)
{
test_icd_app_log("program_callback(%p, %p)\n",
_a,
test_icd_app_log("program_callback(%p, %p)\n",
_a,
_b);
}
void CL_CALLBACK setevent_callback(cl_event _a, cl_int _b, void* _c)
{
test_icd_app_log("setevent_callback(%p, %d, %p)\n",
_a,
_b,
test_icd_app_log("setevent_callback(%p, %d, %p)\n",
_a,
_b,
_c);
}
void CL_CALLBACK setprintf_callback(cl_context _a, cl_uint _b, char* _c, void* _d )
{
test_icd_app_log("setprintf_callback(%p, %u, %p, %p)\n",
_a,
_b,
_c,
test_icd_app_log("setprintf_callback(%p, %u, %p, %p)\n",
_a,
_b,
_c,
_d);
}
+1 -1
View File
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
test_icd_close_app_log();
test_icd_close_stub_log();
if (test_icd_match()) {
printf("ICD Loader Test FAILED\n");
return 1;
@@ -40,7 +40,7 @@ int test_clGetCommandQueueInfo(const struct clGetCommandQueueInfo_st *data)
data->param_value_size,
data->param_value,
data->param_value_size_ret);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
@@ -54,7 +54,7 @@ int test_cl_runtime()
for (i=0; i<NUM_ITEMS_clRetainCommandQueue; i++) {
test_clRetainCommandQueue(&clRetainCommandQueueData[i]);
}
for (i=0; i<NUM_ITEMS_clGetCommandQueueInfo; i++) {
test_clGetCommandQueueInfo(&clGetCommandQueueInfoData[i]);
}
+54 -54
View File
@@ -25,16 +25,16 @@ int test_clCreateFromGLBuffer(const struct clCreateFromGLBuffer_st* data)
test_icd_app_log("clCreateFromGLBuffer(%p, %x, %u, %p)\n",
context,
data->flags,
data->bufobj,
data->bufobj,
data->errcode_ret);
ret_mem = clCreateFromGLBuffer(context,
data->flags,
data->bufobj,
data->errcode_ret);
data->bufobj,
data->errcode_ret);
test_icd_app_log("Value returned: %p\n", ret_mem);
return 0;
}
@@ -46,21 +46,21 @@ int test_clCreateFromGLTexture(const struct clCreateFromGLTexture_st* data)
{
test_icd_app_log("clCreateFromGLTexture(%p, %x, %d, %d, %u, %p)\n",
context,
data->flags,
data->flags,
data->texture_target,
data->miplevel,
data->texture,
data->miplevel,
data->texture,
data->errcode_ret);
ret_mem = clCreateFromGLTexture(context,
data->flags,
data->flags,
data->texture_target,
data->miplevel,
data->texture,
data->miplevel,
data->texture,
data->errcode_ret);
test_icd_app_log("Value returned: %p\n", ret_mem);
return 0;
}
@@ -72,21 +72,21 @@ int test_clCreateFromGLTexture2D(const struct clCreateFromGLTexture2D_st* data)
{
test_icd_app_log("clCreateFromGLTexture2D(%p, %x, %d, %d, %u, %p)\n",
context,
data->flags,
data->flags,
data->texture_target,
data->miplevel,
data->texture,
data->miplevel,
data->texture,
data->errcode_ret);
ret_mem = clCreateFromGLTexture2D(context,
data->flags,
data->flags,
data->texture_target,
data->miplevel,
data->texture,
data->miplevel,
data->texture,
data->errcode_ret);
test_icd_app_log("Value returned: %p\n", ret_mem);
return 0;
}
@@ -95,21 +95,21 @@ struct clCreateFromGLTexture3D_st clCreateFromGLTexture3DData[NUM_ITEMS_clCreate
};
int test_clCreateFromGLTexture3D(const struct clCreateFromGLTexture3D_st* data)
{
{
test_icd_app_log("clCreateFromGLTexture3D(%p, %x, %d, %d, %u, %p)\n",
context,
data->flags,
data->texture_target,
data->miplevel,
data->texture,
data->miplevel,
data->texture,
data->errcode_ret);
ret_mem = clCreateFromGLTexture3D(context,
data->flags,
data->flags,
data->texture_target,
data->miplevel,
data->texture,
data->errcode_ret);
data->miplevel,
data->texture,
data->errcode_ret);
test_icd_app_log("Value returned: %p\n", ret_mem);
@@ -123,14 +123,14 @@ struct clCreateFromGLRenderbuffer_st clCreateFromGLRenderbufferData[NUM_ITEMS_cl
int test_clCreateFromGLRenderbuffer(const struct clCreateFromGLRenderbuffer_st* data)
{
test_icd_app_log("clCreateFromGLRenderbuffer(%p, %x, %d, %p)\n",
context,
context,
data->flags,
data->renderbuffer,
data->renderbuffer,
data->errcode_ret);
ret_mem = clCreateFromGLRenderbuffer(context,
ret_mem = clCreateFromGLRenderbuffer(context,
data->flags,
data->renderbuffer,
data->renderbuffer,
data->errcode_ret);
test_icd_app_log("Value returned: %p\n", ret_mem);
@@ -146,15 +146,15 @@ int test_clGetGLObjectInfo(const struct clGetGLObjectInfo_st* data)
{
test_icd_app_log("clGetGLObjectInfo(%p, %p, %p)\n",
buffer,
data->gl_object_type,
data->gl_object_type,
data->gl_object_name);
ret_val = clGetGLObjectInfo(buffer,
data->gl_object_type,
data->gl_object_type,
data->gl_object_name);
test_icd_app_log("Value returned: %p\n", ret_val);
return ret_val;
}
@@ -168,13 +168,13 @@ int test_clGetGLTextureInfo(const struct clGetGLTextureInfo_st* data)
test_icd_app_log("clGetGLTextureInfo(%p, %u, %u, %p, %p)\n",
buffer,
data->param_name,
data->param_value_size,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
ret_val = clGetGLTextureInfo (buffer,
data->param_name,
data->param_value_size,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
@@ -191,17 +191,17 @@ int test_clEnqueueAcquireGLObjects(const struct clEnqueueAcquireGLObjects_st* da
{
test_icd_app_log("clEnqueueAcquireGLObjects(%p, %u, %p, %u, %p, %p)\n",
command_queue,
data->num_objects,
data->num_objects,
data->mem_objects,
data->num_events_in_wait_list,
&event,
&event);
ret_val = clEnqueueAcquireGLObjects (command_queue,
data->num_objects,
data->num_objects,
data->mem_objects,
data->num_events_in_wait_list,
&event,
&event,
&event);
test_icd_app_log("Value returned: %p\n", ret_val);
@@ -217,17 +217,17 @@ int test_clEnqueueReleaseGLObjects(const struct clEnqueueReleaseGLObjects_st* da
{
test_icd_app_log("clEnqueueReleaseGLObjects(%p, %u, %p, %u, %p, %p)\n",
command_queue,
data->num_objects,
data->num_objects,
data->mem_objects,
data->num_events_in_wait_list,
&event,
&event,
&event);
ret_val = clEnqueueReleaseGLObjects (command_queue,
data->num_objects,
data->num_objects,
data->mem_objects,
data->num_events_in_wait_list,
&event,
&event,
&event);
@@ -250,8 +250,8 @@ int test_clCreateEventFromGLsyncKHR(const struct clCreateEventFromGLsyncKHR_st*
PFN_clCreateEventFromGLsyncKHR pfn_clCreateEventFromGLsyncKHR = NULL;
test_icd_app_log("clCreateEventFromGLsyncKHR(%p, %p, %p)\n",
context,
data->sync,
context,
data->sync,
data->errcode_ret);
pfn_clCreateEventFromGLsyncKHR = clGetExtensionFunctionAddress("clCreateEventFromGLsyncKHR");
@@ -260,8 +260,8 @@ int test_clCreateEventFromGLsyncKHR(const struct clCreateEventFromGLsyncKHR_st*
return 1;
}
ret_event = pfn_clCreateEventFromGLsyncKHR (context,
data->sync,
ret_event = pfn_clCreateEventFromGLsyncKHR (context,
data->sync,
data->errcode_ret);
test_icd_app_log("Value returned: %p\n", ret_event);
@@ -278,14 +278,14 @@ typedef CL_API_ENTRY cl_int
size_t /* param_value_size */,
void * /* param_value */,
size_t * /* param_value_size_ret */);
int test_clGetGLContextInfoKHR(const struct clGetGLContextInfoKHR_st* data)
{
PFN_clGetGLContextInfoKHR pfn_clGetGLContextInfoKHR = NULL;
test_icd_app_log("clGetGLContextInfoKHR(%p, %u, %u, %p, %p)\n",
context_properties,
data->param_name,
data->param_value_size,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
@@ -297,7 +297,7 @@ int test_clGetGLContextInfoKHR(const struct clGetGLContextInfoKHR_st* data)
ret_val = pfn_clGetGLContextInfoKHR(context_properties,
data->param_name,
data->param_value_size,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
@@ -309,7 +309,7 @@ int test_clGetGLContextInfoKHR(const struct clGetGLContextInfoKHR_st* data)
int test_OpenGL_share()
{
int i;
for(i=0;i<NUM_ITEMS_clCreateFromGLBuffer;i++)
test_clCreateFromGLBuffer(&clCreateFromGLBufferData[i]);
@@ -333,15 +333,15 @@ int test_OpenGL_share()
for(i=0;i<NUM_ITEMS_clEnqueueAcquireGLObjects;i++)
test_clEnqueueAcquireGLObjects(&clEnqueueAcquireGLObjectsData[i]);
for(i=0;i<NUM_ITEMS_clEnqueueReleaseGLObjects;i++)
test_clEnqueueReleaseGLObjects(&clEnqueueReleaseGLObjectsData[i]);
test_clEnqueueReleaseGLObjects(&clEnqueueReleaseGLObjectsData[i]);
for(i=0;i<NUM_ITEMS_clCreateEventFromGLsyncKHR;i++)
test_clCreateEventFromGLsyncKHR(&clCreateEventFromGLsyncKHRData[i]);
for(i=0;i<NUM_ITEMS_clGetGLContextInfoKHR;i++)
test_clGetGLContextInfoKHR(&clGetGLContextInfoKHRData[i]);
return 0;
}
@@ -25,8 +25,8 @@ cl_kernel kernel;
cl_event event;
cl_device_id devices;
cl_context_properties context_properties[3] = {
(cl_context_properties)CL_CONTEXT_PLATFORM,
0,
(cl_context_properties)CL_CONTEXT_PLATFORM,
0,
0,
};
@@ -41,7 +41,7 @@ const struct clCreateSampler_st clCreateSamplerData[NUM_ITEMS_clCreateSampler] =
};
const struct clCreateCommandQueue_st clCreateCommandQueueData[NUM_ITEMS_clCreateCommandQueue] =
{
{
{NULL, NULL, 0, NULL}
};
@@ -140,43 +140,43 @@ int test_clGetPlatformIDs(const struct clGetPlatformIDs_st* data)
size_t param_val_ret_size;
#define PLATFORM_NAME_SIZE 40
char platform_name[PLATFORM_NAME_SIZE];
cl_uint i;
cl_uint i;
#if ENABLE_MISMATCHING_PRINTS
test_icd_app_log("clGetPlatformIDs(%u, %p, %p)\n",
data->num_entries,
&platforms,
&platforms,
&num_platforms);
#endif
ret_val = clGetPlatformIDs(0,
NULL,
&num_platforms);
if (ret_val != CL_SUCCESS){
return -1;
}
all_platforms = (cl_platform_id *) malloc (num_platforms * sizeof(cl_platform_id));
ret_val = clGetPlatformIDs(num_platforms,
all_platforms,
NULL);
all_platforms,
NULL);
if (ret_val != CL_SUCCESS){
return -1;
}
for (i = 0; i < num_platforms; i++) {
ret_val = clGetPlatformInfo(all_platforms[i],
CL_PLATFORM_NAME,
PLATFORM_NAME_SIZE,
(void*)platform_name,
&param_val_ret_size );
&param_val_ret_size );
if (ret_val == CL_SUCCESS ){
if(!strcmp(platform_name, "ICD_LOADER_TEST_OPENCL_STUB")) {
platform = all_platforms[i];
platform = all_platforms[i];
}
}
}
@@ -195,15 +195,15 @@ int test_clGetDeviceIDs(const struct clGetDeviceIDs_st* data)
test_icd_app_log("clGetDeviceIDs(%p, %x, %u, %p, %p)\n",
platform,
data->device_type,
data->device_type,
data->num_entries,
&devices,
data->num_devices);
&devices,
data->num_devices);
ret_val = clGetDeviceIDs(platform,
data->device_type,
data->device_type,
data->num_entries,
&devices,
&devices,
data->num_devices);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -215,14 +215,14 @@ int test_clGetDeviceIDs(const struct clGetDeviceIDs_st* data)
int test_clCreateContext(const struct clCreateContext_st* data)
{
test_icd_app_log("clCreateContext(%p, %u, %p, %p, %p, %p)\n",
data->properties,
data->properties,
data->num_devices,
&devices,
&devices,
&createcontext_callback,
data->user_data,
data->errcode_ret);
context = clCreateContext(data->properties,
context = clCreateContext(data->properties,
data->num_devices,
&devices,
&createcontext_callback,
@@ -238,15 +238,15 @@ int test_clCreateContext(const struct clCreateContext_st* data)
int test_clCreateContextFromType(const struct clCreateContextFromType_st* data)
{
test_icd_app_log("clCreateContextFromType(%p, %x, %p, %p, %p)\n",
context_properties,
data->device_type,
context_properties,
data->device_type,
data->pfn_notify,
data->user_data,
data->errcode_ret);
context = clCreateContextFromType(context_properties,
data->device_type,
context = clCreateContextFromType(context_properties,
data->device_type,
data->pfn_notify,
data->user_data,
data->errcode_ret);
@@ -281,16 +281,16 @@ int test_clCreateBuffer(const struct clCreateBuffer_st *data)
test_icd_app_log("clCreateBuffer(%p, %x, %u, %p, %p)\n",
context,
data->flags,
data->size,
data->size,
data->host_ptr,
data->errcode_ret);
buffer = clCreateBuffer(context,
data->flags,
data->size,
data->size,
data->host_ptr,
data->errcode_ret);
clReleaseMemObjectData->memobj = buffer;
test_icd_app_log("Value returned: %p\n", buffer);
@@ -327,18 +327,18 @@ int test_clCreateImage(const struct clCreateImage_st *data)
test_icd_app_log("clCreateImage(%p, %x, %p, %p, %p, %p)\n",
context,
data->flags,
data->image_format,
data->image_format,
data->image_desc,
data->host_ptr,
data->errcode_ret);
image = clCreateImage(context,
data->flags,
data->image_format,
data->image_format,
data->image_desc,
data->host_ptr,
data->errcode_ret);
clReleaseMemObjectDataImage[0].memobj = image;
test_icd_app_log("Value returned: %p\n", image);
@@ -351,7 +351,7 @@ int test_clCreateImage2D(const struct clCreateImage2D_st *data)
test_icd_app_log("clCreateImage2D(%p, %x, %p, %u, %u, %u, %p, %p)\n",
context,
data->flags,
data->image_format,
data->image_format,
data->image_width,
data->image_height,
data->image_row_pitch,
@@ -360,16 +360,16 @@ int test_clCreateImage2D(const struct clCreateImage2D_st *data)
image = clCreateImage2D(context,
data->flags,
data->image_format,
data->image_format,
data->image_width,
data->image_height,
data->image_row_pitch,
data->host_ptr,
data->errcode_ret);
clReleaseMemObjectDataImage[0].memobj = image;
test_icd_app_log("Value returned: %p\n", image);
return 0;
}
@@ -379,7 +379,7 @@ int test_clCreateImage3D(const struct clCreateImage3D_st *data)
test_icd_app_log("clCreateImage3D(%p, %x, %p, %u, %u, %u, %u, %u, %p, %p)\n",
context,
data->flags,
data->image_format,
data->image_format,
data->image_width,
data->image_height,
data->image_depth,
@@ -390,7 +390,7 @@ int test_clCreateImage3D(const struct clCreateImage3D_st *data)
image = clCreateImage3D(context,
data->flags,
data->image_format,
data->image_format,
data->image_width,
data->image_height,
data->image_depth,
@@ -398,7 +398,7 @@ int test_clCreateImage3D(const struct clCreateImage3D_st *data)
data->image_slice_pitch,
data->host_ptr,
data->errcode_ret);
clReleaseMemObjectDataImage[0].memobj = image;
test_icd_app_log("Value returned: %p\n", image);
@@ -458,7 +458,7 @@ int test_clCreateProgramWithBinary(const struct clCreateProgramWithBinary_st *da
data->binaries,
data->binary_status,
data->errcode_ret);
program = clCreateProgramWithBinary(context,
data->num_devices,
&devices,
@@ -560,7 +560,7 @@ int test_clReleaseSampler(const struct clReleaseSampler_st *data)
ret_val = clReleaseSampler(sampler);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
}
@@ -604,7 +604,7 @@ const struct clReleaseKernel_st clReleaseKernelData[NUM_ITEMS_clReleaseKernel] =
int test_clReleaseKernel(const struct clReleaseKernel_st* data)
{
int ret_val = CL_OUT_OF_RESOURCES;
int ret_val = CL_OUT_OF_RESOURCES;
test_icd_app_log("clReleaseKernel(%p)\n", kernel);
@@ -661,10 +661,10 @@ const struct clReleaseContext_st clReleaseContextData[NUM_ITEMS_clReleaseContext
int test_clReleaseContext(const struct clReleaseContext_st* data)
{
int ret_val = CL_OUT_OF_RESOURCES;
int ret_val = CL_OUT_OF_RESOURCES;
test_icd_app_log("clReleaseContext(%p)\n", context);
ret_val = clReleaseContext(context);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -682,9 +682,9 @@ int test_clReleaseDevice(const struct clReleaseDevice_st* data)
{
int ret_val = CL_OUT_OF_RESOURCES;
test_icd_app_log("clReleaseDevice(%p)\n", devices);
ret_val = clReleaseDevice(devices);
test_icd_app_log("clReleaseDevice(%p)\n", devices);
ret_val = clReleaseDevice(devices);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -700,7 +700,7 @@ int test_create_calls()
test_clGetDeviceIDs(clGetDeviceIDsData);
test_clCreateContext(clCreateContextData);
test_clCreateContext(clCreateContextData);
test_clReleaseContext(clReleaseContextData);
@@ -66,7 +66,7 @@ int test_clGetSupportedImageFormats(const struct clGetSupportedImageFormats_st *
data->num_entries,
data->image_formats,
data->num_image_formats);
ret_val = clGetSupportedImageFormats(context,
data->flags,
data->image_type,
@@ -182,7 +182,7 @@ int test_clEnqueueReadImage(const struct clEnqueueReadImage_st *data)
command_queue,
image,
data->blocking_read,
data->origin,
data->origin,
data->region,
data->row_pitch,
data->slice_pitch,
@@ -195,11 +195,11 @@ int test_clEnqueueReadImage(const struct clEnqueueReadImage_st *data)
image,
data->blocking_read,
data->origin,
data->region,
data->row_pitch,
data->slice_pitch,
data->ptr,
data->num_events_in_wait_list,
data->region,
data->row_pitch,
data->slice_pitch,
data->ptr,
data->num_events_in_wait_list,
data->event_wait_list,
&event);
@@ -251,16 +251,16 @@ int test_clEnqueueFillImage(const struct clEnqueueFillImage_st *data)
data->origin,
data->region,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
ret_val = clEnqueueFillImage(command_queue,
image,
image,
data->fill_color,
data->origin,
data->region,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -278,7 +278,7 @@ int test_clEnqueueCopyImage(const struct clEnqueueCopyImage_st *data)
data->dst_origin,
data->region,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
ret_val = clEnqueueCopyImage(command_queue,
@@ -288,7 +288,7 @@ int test_clEnqueueCopyImage(const struct clEnqueueCopyImage_st *data)
data->dst_origin,
data->region,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -27,11 +27,11 @@ struct clRetainKernel_st clRetainKernelData[NUM_ITEMS_clRetainKernel] =
int test_clRetainKernel(const struct clRetainKernel_st* data)
{
test_icd_app_log("clRetainKernel(%p)\n", kernel);
ret_val=clRetainKernel(kernel);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
}
@@ -43,18 +43,18 @@ struct clSetKernelArg_st clSetKernelArgData[NUM_ITEMS_clSetKernelArg] =
int test_clSetKernelArg(const struct clSetKernelArg_st* data)
{
test_icd_app_log("clSetKernelArg(%p, %u, %u, %p)\n",
kernel,
data->arg_index,
kernel,
data->arg_index,
data->arg_size,
data->arg_value);
ret_val=clSetKernelArg(kernel,
data->arg_index,
ret_val=clSetKernelArg(kernel,
data->arg_index,
data->arg_size,
data->arg_value);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
}
@@ -67,19 +67,19 @@ int test_clGetKernelInfo(const struct clGetKernelInfo_st* data)
{
test_icd_app_log("clGetKernelInfo(%p, %u, %u, %p, %p)\n",
kernel,
data->param_name,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value,
data->param_value_size_ret);
ret_val=clGetKernelInfo(kernel,
data->param_name,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value,
data->param_value_size_ret);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
}
@@ -91,14 +91,14 @@ struct clGetKernelArgInfo_st clGetKernelArgInfoData[NUM_ITEMS_clGetKernelArgInfo
int test_clGetKernelArgInfo(const struct clGetKernelArgInfo_st* data)
{
test_icd_app_log("clGetKernelArgInfo(%p, %u, %u, %u, %p, %p)\n",
kernel,
kernel,
data->arg_indx,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
ret_val=clGetKernelArgInfo(kernel,
ret_val=clGetKernelArgInfo(kernel,
data->arg_indx,
data->param_name,
data->param_value_size,
@@ -118,14 +118,14 @@ struct clGetKernelWorkGroupInfo_st clGetKernelWorkGroupInfoData[NUM_ITEMS_clGetK
int test_clGetKernelWorkGroupInfo(const struct clGetKernelWorkGroupInfo_st* data)
{
test_icd_app_log("clGetKernelWorkGroupInfo(%p, %p, %u, %u, %p, %p)\n",
kernel,
kernel,
devices,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
ret_val=clGetKernelWorkGroupInfo(kernel,
ret_val=clGetKernelWorkGroupInfo(kernel,
devices,
data->param_name,
data->param_value_size,
@@ -146,7 +146,7 @@ int test_clEnqueueMigrateMemObjects(const struct clEnqueueMigrateMemObjects_st*
{
test_icd_app_log("clEnqueueMigrateMemObjects(%p, %u, %p, %x, %u, %p, %p)\n",
command_queue,
data->num_mem_objects,
data->num_mem_objects,
data->mem_objects,
data->flags,
data->num_events_in_wait_list,
@@ -154,7 +154,7 @@ int test_clEnqueueMigrateMemObjects(const struct clEnqueueMigrateMemObjects_st*
&event);
ret_val=clEnqueueMigrateMemObjects(command_queue,
data->num_mem_objects,
data->num_mem_objects,
data->mem_objects,
data->flags,
data->num_events_in_wait_list,
@@ -175,7 +175,7 @@ int test_clEnqueueNDRangeKernel(const struct clEnqueueNDRangeKernel_st* data)
{
test_icd_app_log("clEnqueueNDRangeKernel(%p, %p, %u, %p, %p, %p, %u, %p, %p)\n",
command_queue,
kernel,
kernel,
data->work_dim,
data->global_work_offset,
data->global_work_size,
@@ -185,7 +185,7 @@ int test_clEnqueueNDRangeKernel(const struct clEnqueueNDRangeKernel_st* data)
&event);
ret_val=clEnqueueNDRangeKernel(command_queue,
kernel,
kernel,
data->work_dim,
data->global_work_offset,
data->global_work_size,
@@ -194,7 +194,7 @@ int test_clEnqueueNDRangeKernel(const struct clEnqueueNDRangeKernel_st* data)
data->event_wait_list,
&event);
test_icd_app_log("Value returned: %d\n", ret_val);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
}
@@ -207,16 +207,16 @@ struct clEnqueueTask_st clEnqueueTaskData[NUM_ITEMS_clEnqueueTask] =
int test_clEnqueueTask(const struct clEnqueueTask_st* data)
{
test_icd_app_log("clEnqueueTask(%p, %p, %u, %p, %p)\n",
command_queue,
kernel,
command_queue,
kernel,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
ret_val=clEnqueueTask(command_queue,
kernel,
ret_val=clEnqueueTask(command_queue,
kernel,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -230,29 +230,29 @@ struct clEnqueueNativeKernel_st clEnqueueNativeKernelData[NUM_ITEMS_clEnqueueNat
int test_clEnqueueNativeKernel(const struct clEnqueueNativeKernel_st* data) {
test_icd_app_log("clEnqueueNativeKernel(%p, %p, %p, %u, %u, %p, %p, %u, %p, %p)\n",
command_queue,
command_queue,
data->user_func,
data->args,
data->cb_args,
data->args,
data->cb_args,
data->num_mem_objects,
data->mem_list,
data->mem_list,
data->args_mem_loc,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
ret_val=clEnqueueNativeKernel(command_queue,
ret_val=clEnqueueNativeKernel(command_queue,
data->user_func,
data->args,
data->cb_args,
data->args,
data->cb_args,
data->num_mem_objects,
data->mem_list,
data->mem_list,
data->args_mem_loc,
data->num_events_in_wait_list,
data->event_wait_list,
data->event_wait_list,
&event);
test_icd_app_log("Value returned: %d\n", ret_val);
test_icd_app_log("Value returned: %d\n", ret_val);
return 0;
}
@@ -300,15 +300,15 @@ struct clGetEventInfo_st clGetEventInfoData[NUM_ITEMS_clGetEventInfo] =
int test_clGetEventInfo(const struct clGetEventInfo_st* data){
test_icd_app_log("clGetEventInfo(%p, %u, %u, %p, %p)\n",
event,
data->param_name,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value,
data->param_value_size_ret);
ret_val=clGetEventInfo(event,
data->param_name,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value,
data->param_value_size_ret);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -424,11 +424,11 @@ int test_clEnqueueWaitForEvents(const struct clEnqueueWaitForEvents_st* data)
{
test_icd_app_log("clEnqueueWaitForEvents(%p, %u, %p)\n",
command_queue,
data->num_events,
data->num_events,
data->event_list);
ret_val = clEnqueueWaitForEvents(command_queue,
data->num_events,
data->num_events,
data->event_list);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -461,13 +461,13 @@ int test_clGetEventProfilingInfo(const struct clGetEventProfilingInfo_st* data)
test_icd_app_log("clGetEventProfilingInfo(%p, %u, %u, %p, %p)\n",
event,
data->param_name,
data->param_value_size,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
ret_val=clGetEventProfilingInfo(event,
data->param_name,
data->param_value_size,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
@@ -512,88 +512,88 @@ int test_kernel()
{
int i;
for (i=0; i<NUM_ITEMS_clRetainKernel; i++) {
test_clRetainKernel(&clRetainKernelData[i]);
}
for (i=0; i<NUM_ITEMS_clSetKernelArg; i++) {
test_clSetKernelArg(&clSetKernelArgData[i]);
for (i=0; i<NUM_ITEMS_clRetainKernel; i++) {
test_clRetainKernel(&clRetainKernelData[i]);
}
for (i=0; i<NUM_ITEMS_clGetKernelInfo; i++) {
test_clGetKernelInfo(&clGetKernelInfoData[i]);
for (i=0; i<NUM_ITEMS_clSetKernelArg; i++) {
test_clSetKernelArg(&clSetKernelArgData[i]);
}
for (i=0; i<NUM_ITEMS_clGetKernelArgInfo; i++) {
test_clGetKernelArgInfo(&clGetKernelArgInfoData[i]);
for (i=0; i<NUM_ITEMS_clGetKernelInfo; i++) {
test_clGetKernelInfo(&clGetKernelInfoData[i]);
}
for (i=0; i<NUM_ITEMS_clGetKernelWorkGroupInfo; i++) {
test_clGetKernelWorkGroupInfo(&clGetKernelWorkGroupInfoData[i]);
for (i=0; i<NUM_ITEMS_clGetKernelArgInfo; i++) {
test_clGetKernelArgInfo(&clGetKernelArgInfoData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueMigrateMemObjects; i++) {
test_clEnqueueMigrateMemObjects(&clEnqueueMigrateMemObjectsData[i]);
for (i=0; i<NUM_ITEMS_clGetKernelWorkGroupInfo; i++) {
test_clGetKernelWorkGroupInfo(&clGetKernelWorkGroupInfoData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueNDRangeKernel; i++) {
test_clEnqueueNDRangeKernel(&clEnqueueNDRangeKernelData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueMigrateMemObjects; i++) {
test_clEnqueueMigrateMemObjects(&clEnqueueMigrateMemObjectsData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueTask; i++) {
test_clEnqueueTask(&clEnqueueTaskData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueNDRangeKernel; i++) {
test_clEnqueueNDRangeKernel(&clEnqueueNDRangeKernelData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueNativeKernel; i++) {
test_clEnqueueNativeKernel(&clEnqueueNativeKernelData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueTask; i++) {
test_clEnqueueTask(&clEnqueueTaskData[i]);
}
for (i=0; i<NUM_ITEMS_clSetUserEventStatus; i++) {
test_clSetUserEventStatus(&clSetUserEventStatusData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueNativeKernel; i++) {
test_clEnqueueNativeKernel(&clEnqueueNativeKernelData[i]);
}
for (i=0; i<NUM_ITEMS_clWaitForEvents; i++) {
test_clWaitForEvents(&clWaitForEventsData[i]);
for (i=0; i<NUM_ITEMS_clSetUserEventStatus; i++) {
test_clSetUserEventStatus(&clSetUserEventStatusData[i]);
}
for (i=0; i<NUM_ITEMS_clGetEventInfo; i++) {
test_clGetEventInfo(&clGetEventInfoData[i]);
for (i=0; i<NUM_ITEMS_clWaitForEvents; i++) {
test_clWaitForEvents(&clWaitForEventsData[i]);
}
for (i=0; i<NUM_ITEMS_clSetEventCallback; i++) {
test_clSetEventCallback(&clSetEventCallbackData[i]);
for (i=0; i<NUM_ITEMS_clGetEventInfo; i++) {
test_clGetEventInfo(&clGetEventInfoData[i]);
}
for (i=0; i<NUM_ITEMS_clRetainEvent; i++) {
test_clRetainEvent(&clRetainEventData[i]);
for (i=0; i<NUM_ITEMS_clSetEventCallback; i++) {
test_clSetEventCallback(&clSetEventCallbackData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueMarker; i++) {
test_clEnqueueMarker(&clEnqueueMarkerData[i]);
for (i=0; i<NUM_ITEMS_clRetainEvent; i++) {
test_clRetainEvent(&clRetainEventData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueBarrier; i++) {
test_clEnqueueBarrier(&clEnqueueBarrierData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueMarker; i++) {
test_clEnqueueMarker(&clEnqueueMarkerData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueMarkerWithWaitList; i++) {
test_clEnqueueMarkerWithWaitList(&clEnqueueMarkerWithWaitListData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueBarrier; i++) {
test_clEnqueueBarrier(&clEnqueueBarrierData[i]);
}
for (i=0; i<NUM_ITEMS_clEnqueueBarrierWithWaitList; i++) {
test_clEnqueueBarrierWithWaitList(&clEnqueueBarrierWithWaitListData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueMarkerWithWaitList; i++) {
test_clEnqueueMarkerWithWaitList(&clEnqueueMarkerWithWaitListData[i]);
}
for (i=0; i<NUM_ITEMS_clGetEventProfilingInfo; i++) {
test_clGetEventProfilingInfo(&clGetEventProfilingInfoData[i]);
for (i=0; i<NUM_ITEMS_clEnqueueBarrierWithWaitList; i++) {
test_clEnqueueBarrierWithWaitList(&clEnqueueBarrierWithWaitListData[i]);
}
for (i=0; i<NUM_ITEMS_clFlush; i++) {
test_clFlush(&clFlushData[i]);
for (i=0; i<NUM_ITEMS_clGetEventProfilingInfo; i++) {
test_clGetEventProfilingInfo(&clGetEventProfilingInfoData[i]);
}
for (i=0; i<NUM_ITEMS_clFinish; i++) {
test_clFinish(&clFinishData[i]);
for (i=0; i<NUM_ITEMS_clFlush; i++) {
test_clFlush(&clFlushData[i]);
}
for (i=0; i<NUM_ITEMS_clFinish; i++) {
test_clFinish(&clFinishData[i]);
}
return 0;
@@ -45,7 +45,7 @@ struct clRetainDevice_st clRetainDeviceData[NUM_ITEMS_clRetainDevice] =
int test_clRetainContext(const struct clRetainContext_st* data)
{
test_icd_app_log("clRetainContext(%p)\n", context);
test_icd_app_log("clRetainContext(%p)\n", context);
ret_val = clRetainContext(context);
@@ -60,16 +60,16 @@ int test_clGetContextInfo(const struct clGetContextInfo_st* data)
{
test_icd_app_log("clGetContextInfo(%p, %u, %u, %p, %p)\n",
context,
data->param_name,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
data->param_value,
data->param_value_size_ret);
ret_val = clGetContextInfo(context,
data->param_name,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value,
data->param_value_size_ret);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -83,14 +83,14 @@ int test_clGetPlatformInfo(const struct clGetPlatformInfo_st* data)
platform,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
data->param_value,
data->param_value_size_ret);
ret_val = clGetPlatformInfo(platform,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
data->param_value_size_ret);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -99,19 +99,19 @@ int test_clGetPlatformInfo(const struct clGetPlatformInfo_st* data)
}
int test_clGetDeviceInfo(const struct clGetDeviceInfo_st* data)
{
{
test_icd_app_log("clGetDeviceInfo(%p, %u, %u, %p, %p)\n",
devices,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
ret_val = clGetDeviceInfo(devices,
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
data->param_name,
data->param_value_size,
data->param_value,
data->param_value_size_ret);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -122,16 +122,16 @@ int test_clCreateSubDevices(const struct clCreateSubDevices_st* data)
{
test_icd_app_log("clCreateSubDevices(%p, %p, %u, %p, %p)\n",
devices,
data->properties,
data->num_entries,
&devices,
data->num_devices);
data->properties,
data->num_entries,
&devices,
data->num_devices);
ret_val = clCreateSubDevices(devices,
data->properties,
data->properties,
data->num_entries,
&devices,
data->num_devices);
&devices,
data->num_devices);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -140,9 +140,9 @@ int test_clCreateSubDevices(const struct clCreateSubDevices_st* data)
int test_clRetainDevice(const struct clRetainDevice_st* data)
{
test_icd_app_log("clRetainDevice(%p)\n", devices);
test_icd_app_log("clRetainDevice(%p)\n", devices);
ret_val = clRetainDevice(devices);
ret_val = clRetainDevice(devices);
test_icd_app_log("Value returned: %d\n", ret_val);
@@ -153,31 +153,31 @@ int test_platforms()
{
int i;
for (i = 0;i<NUM_ITEMS_clRetainContext;i++) {
test_clRetainContext(&clRetainContextData[i]);
}
for (i = 0;i<NUM_ITEMS_clRetainContext;i++) {
test_clRetainContext(&clRetainContextData[i]);
}
for (i = 0;i<NUM_ITEMS_clGetContextInfo;i++) {
test_clGetContextInfo(&clGetContextInfoData[i]);
}
for (i = 0;i<NUM_ITEMS_clGetContextInfo;i++) {
test_clGetContextInfo(&clGetContextInfoData[i]);
}
#if 0
for (i = 0;i<NUM_ITEMS_clGetPlatformInfo;i++) {
test_clGetPlatformInfo(&clGetPlatformInfoData[i]);
for (i = 0;i<NUM_ITEMS_clGetPlatformInfo;i++) {
test_clGetPlatformInfo(&clGetPlatformInfoData[i]);
}
#endif
for (i = 0;i<NUM_ITEMS_clGetDeviceInfo;i++) {
test_clGetDeviceInfo(&clGetDeviceInfoData[i]);
}
for (i = 0;i<NUM_ITEMS_clGetDeviceInfo;i++) {
test_clGetDeviceInfo(&clGetDeviceInfoData[i]);
}
for (i = 0;i<NUM_ITEMS_clCreateSubDevices;i++) {
test_clCreateSubDevices(&clCreateSubDevicesData[i]);
}
for (i = 0;i<NUM_ITEMS_clCreateSubDevices;i++) {
test_clCreateSubDevices(&clCreateSubDevicesData[i]);
}
for (i = 0;i<NUM_ITEMS_clRetainDevice;i++) {
test_clRetainDevice(&clRetainDeviceData[i]);
}
for (i = 0;i<NUM_ITEMS_clRetainDevice;i++) {
test_clRetainDevice(&clRetainDeviceData[i]);
}
return 0;
}
@@ -162,7 +162,7 @@ int test_clGetExtensionFunctionAddressForPlatform(const struct clGetExtensionFun
{
void *return_value;
test_icd_app_log("clGetExtensionFunctionAddressForPlatform(%p, %p)\n",
platform,
platform,
data->func_name);
return_value=clGetExtensionFunctionAddressForPlatform(platform,
@@ -224,7 +224,7 @@ int test_program_objects()
for (i=0;i<NUM_ITEMS_clRetainProgram;i++) {
test_clRetainProgram(&clRetainProgramData[i]);
}
}
for (i=0;i<NUM_ITEMS_clBuildProgram;i++) {
test_clBuildProgram(&clBuildProgramData[i]);
+2 -2
View File
@@ -18,7 +18,7 @@ int test_icd_initialize_app_log(void)
printf("Unable to open file %s\n", APP_LOG_FILE);
return -1;
}
return 0;
}
@@ -42,7 +42,7 @@ int test_icd_initialize_stub_log(void)
printf("Unable to open file %s\n", STUB_LOG_FILE);
return -1;
}
return 0;
}
+1 -1
View File
@@ -250,7 +250,7 @@ class App {
m_height,
m_perflab,
i,
m_platform);
m_platform);
}
#else
for (unsigned int i = 0; i < 1; i++) {
@@ -32,7 +32,7 @@ const static cl_uint ThreadsForCheck = 1 << Stages;
#define KERNEL_CODE(...) #__VA_ARGS__
const static char* strKernel =
const static char* strKernel =
KERNEL_CODE(
\n
\x23 if OCL20
+19 -19
View File
@@ -267,7 +267,7 @@ getMemoryString(const void* ptr, size_t size)
}
std::ostringstream ss;
ss << "&" << ptr;
return ss.str();
return ss.str();
}
static std::string
@@ -513,7 +513,7 @@ getQueuePropertyString(const cl_queue_properties* qprops)
switch(p->name) {
case CL_QUEUE_PROPERTIES:
property = static_cast<cl_command_queue_properties>(p->value.raw);
if (property & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) {
ss << "CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE";
property &= ~CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE;
@@ -3392,7 +3392,7 @@ EnqueueReleaseGLObjects(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
RetainDevice(
cl_device_id device)
{
@@ -3412,7 +3412,7 @@ RetainDevice(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
ReleaseDevice(
cl_device_id device)
{
@@ -3432,7 +3432,7 @@ ReleaseDevice(
return ret;
}
static cl_mem CL_API_CALL
static cl_mem CL_API_CALL
CreateImage(
cl_context context,
cl_mem_flags flags,
@@ -3463,7 +3463,7 @@ CreateImage(
return ret;
}
static cl_program CL_API_CALL
static cl_program CL_API_CALL
CreateProgramWithBuiltInKernels(
cl_context context,
cl_uint num_devices,
@@ -3491,7 +3491,7 @@ CreateProgramWithBuiltInKernels(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
CompileProgram(
cl_program program,
cl_uint num_devices,
@@ -3526,7 +3526,7 @@ CompileProgram(
return ret;
}
static cl_program CL_API_CALL
static cl_program CL_API_CALL
LinkProgram(
cl_context context,
cl_uint num_devices,
@@ -3560,7 +3560,7 @@ LinkProgram(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
UnloadPlatformCompiler(
cl_platform_id platform)
{
@@ -3581,7 +3581,7 @@ UnloadPlatformCompiler(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
GetKernelArgInfo(
cl_kernel kernel,
cl_uint arg_indx,
@@ -3613,7 +3613,7 @@ GetKernelArgInfo(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
EnqueueFillBuffer(
cl_command_queue command_queue,
cl_mem buffer,
@@ -3647,7 +3647,7 @@ EnqueueFillBuffer(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
EnqueueFillImage(
cl_command_queue command_queue,
cl_mem image,
@@ -3682,7 +3682,7 @@ EnqueueFillImage(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
EnqueueMigrateMemObjects(
cl_command_queue command_queue,
cl_uint num_mem_objects,
@@ -3715,7 +3715,7 @@ EnqueueMigrateMemObjects(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
EnqueueMarkerWithWaitList(
cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
@@ -3742,7 +3742,7 @@ EnqueueMarkerWithWaitList(
return ret;
}
static cl_int CL_API_CALL
static cl_int CL_API_CALL
EnqueueBarrierWithWaitList(
cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
@@ -3769,7 +3769,7 @@ EnqueueBarrierWithWaitList(
return ret;
}
static void * CL_API_CALL
static void * CL_API_CALL
GetExtensionFunctionAddressForPlatform(
cl_platform_id platform,
const char * function_name)
@@ -4365,13 +4365,13 @@ int32_t CL_CALLBACK
vdiAgent_OnLoad(vdi_agent * agent)
{
char *clTraceLogEnv;
int32_t err = agent->GetICDDispatchTable(
agent, &original_dispatch, sizeof(original_dispatch));
if (err != CL_SUCCESS) {
return err;
}
clTraceLogEnv = getenv("CL_TRACE_OUTPUT");
if(clTraceLogEnv!=NULL) {
std::string clTraceLogStr = clTraceLogEnv;
@@ -4402,7 +4402,7 @@ vdiAgent_OnLoad(vdi_agent * agent)
return err;
}
std::cerr << "!!!" << std::endl << "!!! API trace for \""
std::cerr << "!!!" << std::endl << "!!! API trace for \""
<< version << "\"" << std::endl << "!!!" << std::endl;
SET_ORIGINAL_EXTENSION(D3D10KHR);