From b8505c5c328f932b51fffc46a3fa3296563e98f7 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 5 Jan 2016 02:06:10 -0500 Subject: [PATCH] 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 [ROCm/clr commit: ab174890713a0a53532032ed05aae10ff9401f8f] --- projects/clr/rocclr/runtime/platform/memory.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/platform/memory.hpp b/projects/clr/rocclr/runtime/platform/memory.hpp index 955d2fb82e..62b95bc7a3 100644 --- a/projects/clr/rocclr/runtime/platform/memory.hpp +++ b/projects/clr/rocclr/runtime/platform/memory.hpp @@ -679,10 +679,10 @@ private: cl_file_flags_amd flags_; void* handle_; uint32_t blockSize_; - + uint64_t fileSize_; public: LiquidFlashFile(const wchar_t* name, cl_file_flags_amd flags) - : name_(name), flags_(flags), handle_(NULL) { } + : name_(name), flags_(flags), handle_(NULL) ,blockSize_(0),fileSize_(0) { } ~LiquidFlashFile(); @@ -690,6 +690,7 @@ public: void close(); uint32_t blockSize() const { return blockSize_; }; + uint64_t fileSize() const { return fileSize_; }; bool readBlock( void* dst,