From 919f758ba04eb7e4fbce1abbfe240e8742de3860 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 17 Apr 2020 15:18:48 -0400 Subject: [PATCH] Fix -Winconsistent-missing-override warnings Change-Id: I67d4a853045197ed28e5d616a4afc86f1d6a1d7c [ROCm/clr commit: 55cc77d7d168e53bef89626b3767f175872cd513] --- projects/clr/rocclr/device/devwavelimiter.hpp | 4 +- projects/clr/rocclr/device/rocm/rocmemory.hpp | 40 +++++++++---------- .../clr/rocclr/device/rocm/rocprogram.hpp | 12 +++--- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/projects/clr/rocclr/device/devwavelimiter.hpp b/projects/clr/rocclr/device/devwavelimiter.hpp index 7c7227fb7f..5bde929a1a 100644 --- a/projects/clr/rocclr/device/devwavelimiter.hpp +++ b/projects/clr/rocclr/device/devwavelimiter.hpp @@ -133,10 +133,10 @@ class WLAlgorithmSmooth : public WaveLimiter { void clearData(); //! Call back from Event::recordProfilingInfo to get execution time. - virtual void callback(ulong duration, uint32_t waves) override; + void callback(ulong duration, uint32_t waves) override; //! Output trace of measurement/adaptation. - void outputTrace(); + void outputTrace() override; }; // Create wave limiter for each virtual device for a kernel and manages the wave limiters. diff --git a/projects/clr/rocclr/device/rocm/rocmemory.hpp b/projects/clr/rocclr/device/rocm/rocmemory.hpp index ac63010c92..3936a468ef 100644 --- a/projects/clr/rocclr/device/rocm/rocmemory.hpp +++ b/projects/clr/rocclr/device/rocm/rocmemory.hpp @@ -49,16 +49,16 @@ class Memory : public device::Memory { // Gets a pointer to a region of host-visible memory for use as the target // of an indirect map for a given memory object - virtual void* allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& region, - uint mapFlags, size_t* rowPitch, size_t* slicePitch); + void* allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& region, + uint mapFlags, size_t* rowPitch, size_t* slicePitch) override; // Create device memory according to OpenCL memory flag. virtual bool create() = 0; // Pins system memory associated with this memory object. - virtual bool pinSystemMemory(void* hostPtr, // System memory address - size_t size // Size of allocated system memory - ); + bool pinSystemMemory(void* hostPtr, // System memory address + size_t size // Size of allocated system memory + ) override; //! Updates device memory from the owner's host allocation void syncCacheFromHost(VirtualGPU& gpu, //!< Virtual GPU device object @@ -67,31 +67,31 @@ class Memory : public device::Memory { // Immediate blocking write from device cache to owners's backing store. // Marks owner as "current" by resetting the last writer to nullptr. - virtual void syncHostFromCache(SyncFlags syncFlags = SyncFlags()); + void syncHostFromCache(SyncFlags syncFlags = SyncFlags()) override; //! Allocates host memory for synchronization with MGPU context void mgpuCacheWriteBack(); // Releases indirect map surface - void releaseIndirectMap() { decIndMapCount(); } + void releaseIndirectMap() override { decIndMapCount(); } //! Map the device memory to CPU visible - virtual void* cpuMap(device::VirtualDevice& vDev, //!< Virtual device for map operaiton - uint flags = 0, //!< flags for the map operation - // Optimization for multilayer map/unmap - uint startLayer = 0, //!< Start layer for multilayer map - uint numLayers = 0, //!< End layer for multilayer map - size_t* rowPitch = nullptr, //!< Row pitch for the device memory - size_t* slicePitch = nullptr //!< Slice pitch for the device memory - ); + void* cpuMap(device::VirtualDevice& vDev, //!< Virtual device for map operaiton + uint flags = 0, //!< flags for the map operation + // Optimization for multilayer map/unmap + uint startLayer = 0, //!< Start layer for multilayer map + uint numLayers = 0, //!< End layer for multilayer map + size_t* rowPitch = nullptr, //!< Row pitch for the device memory + size_t* slicePitch = nullptr //!< Slice pitch for the device memory + ) override; //! Unmap the device memory - virtual void cpuUnmap(device::VirtualDevice& vDev //!< Virtual device for unmap operaiton - ); + void cpuUnmap(device::VirtualDevice& vDev //!< Virtual device for unmap operaiton + ) override; // Mesa has already decomressed if needed and also does acquire at the start of every command // batch. - virtual bool processGLResource(GLResourceOP operation) { return true; } + bool processGLResource(GLResourceOP operation) override { return true; } virtual uint64_t virtualAddress() const override { return reinterpret_cast(getDeviceMemory()); } @@ -108,7 +108,7 @@ class Memory : public device::Memory { void* PersistentHostPtr() const { return persistent_host_ptr_; } - virtual void IpcCreate (size_t offset, size_t* mem_size, void* handle) const; + void IpcCreate (size_t offset, size_t* mem_size, void* handle) const override; //! Validates allocated memory for possible workarounds virtual bool ValidateMemory() { return true; } @@ -117,7 +117,7 @@ class Memory : public device::Memory { bool allocateMapMemory(size_t allocationSize); // Decrement map count - virtual void decIndMapCount(); + void decIndMapCount() override; // Free / deregister device memory. virtual void destroy() = 0; diff --git a/projects/clr/rocclr/device/rocm/rocprogram.hpp b/projects/clr/rocclr/device/rocm/rocprogram.hpp index 18339d2dea..ba99553d05 100644 --- a/projects/clr/rocclr/device/rocm/rocprogram.hpp +++ b/projects/clr/rocclr/device/rocm/rocprogram.hpp @@ -89,30 +89,30 @@ class HSAILProgram : public roc::Program { virtual ~HSAILProgram(); protected: - virtual bool createBinary(amd::option::Options* options) { return true; } + bool createBinary(amd::option::Options* options) override { return true; } virtual bool setKernels(amd::option::Options* options, void* binary, size_t binSize) override; private: std::string codegenOptions(amd::option::Options* options); - bool saveBinaryAndSetType(type_t type); + bool saveBinaryAndSetType(type_t type) override; }; -class LightningProgram : public roc::Program { +class LightningProgram final : public roc::Program { public: LightningProgram(roc::NullDevice& device, amd::Program& owner); virtual ~LightningProgram() {} protected: - virtual bool createBinary(amd::option::Options* options) final; + bool createBinary(amd::option::Options* options) final; - bool saveBinaryAndSetType(type_t type) { return true; } + bool saveBinaryAndSetType(type_t type) final { return true; } private: bool saveBinaryAndSetType(type_t type, void* rawBinary, size_t size); - virtual bool setKernels(amd::option::Options* options, void* binary, size_t binSize) override; + bool setKernels(amd::option::Options* options, void* binary, size_t binSize) final; }; /*@}*/} // namespace roc