P4 to Git Change 1224643 by tcohen@tcohen_TLV-TZACHI-OCL on 2016/01/05 01:59:28

SWDEV-78467 - Adding 'CL_FILE_SIZE_AMD' queriable property for file objects.
	While validating the LF extension we noticed a common use case in which the programmer has to query the size of the file being processed.
	This enhancement will save the programming overhead of opening and closing files using some other API just in order to query their size.

	This feature is being integrated from LF dev branch 15.30.1023.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#95 integrate
Этот коммит содержится в:
foreman
2016-01-05 02:06:10 -05:00
родитель cbdb9fe070
Коммит 5ec0342e6a
2 изменённых файлов: 12 добавлений и 2 удалений
+11 -2
Просмотреть файл
@@ -50,6 +50,10 @@ LiquidFlashFile::open()
if (lfGetFileBlockSize((lf_file)handle_, &blockSize_) != lf_success) {
return false;
}
if (lfGetFileSize((lf_file)handle_, &fileSize_) != lf_success) {
return false;
}
return true;
#else
return false;
@@ -136,9 +140,14 @@ RUNTIME_ENTRY(cl_int, clGetFileObjectInfoAMD, (
switch (param_name) {
case CL_FILE_BLOCK_SIZE_AMD: {
cl_uint size = as_amd(file)->blockSize();
cl_uint blockSize = as_amd(file)->blockSize();
return amd::clGetInfo(
size, param_value_size, param_value, param_value_size_ret);
blockSize, param_value_size, param_value, param_value_size_ret);
}
case CL_FILE_SIZE_AMD: {
cl_ulong fileSize = as_amd(file)->fileSize();
return amd::clGetInfo(
fileSize, param_value_size, param_value, param_value_size_ret);
}
default:
break;
+1
Просмотреть файл
@@ -469,6 +469,7 @@ typedef cl_uint cl_file_flags_amd;
typedef cl_uint cl_file_info_amd;
#define CL_FILE_BLOCK_SIZE_AMD 0x4085
#define CL_FILE_SIZE_AMD 0x4086
typedef CL_API_ENTRY cl_file_amd
(CL_API_CALL * clCreateFileObjectAMD_fn)( cl_context /*context*/,