From f63115cec663ca8d32a4c317e5c2acf2e1d02b78 Mon Sep 17 00:00:00 2001 From: jujiang Date: Wed, 1 Sep 2021 11:45:47 -0400 Subject: [PATCH] SWDEV-286322 - clean up trailing white space Change-Id: I01f3a559cbd1835aa2fdad7abe2bd685d90fc6a8 --- rocclr/device/devwavelimiter.hpp | 2 +- rocclr/device/gpu/gslbe/src/rt/EventQueue.cpp | 4 +- .../gpu/gslbe/src/rt/GSLDeviceD3D11.cpp | 10 +-- .../device/gpu/gslbe/src/rt/GSLDeviceD3D9.cpp | 4 +- .../device/gpu/gslbe/src/rt/GSLDeviceGL.cpp | 2 +- rocclr/device/pal/paltimestamp.cpp | 2 +- rocclr/device/rocm/pro/prodevice.cpp | 2 +- rocclr/device/rocm/rocglinterop.cpp | 2 +- rocclr/elf/elf.cpp | 2 +- rocclr/elf/elf.hpp | 2 +- rocclr/elf/elfio/elf_types.hpp | 2 +- rocclr/elf/elfio/elfio_dump.hpp | 74 +++++++++---------- rocclr/elf/elfio/elfio_section.hpp | 2 +- rocclr/elf/elfio/elfio_segment.hpp | 8 +- rocclr/elf/elfio/elfio_strings.hpp | 2 +- rocclr/platform/kernel.cpp | 2 +- 16 files changed, 61 insertions(+), 61 deletions(-) diff --git a/rocclr/device/devwavelimiter.hpp b/rocclr/device/devwavelimiter.hpp index f4c29039a8..cba01bb2db 100644 --- a/rocclr/device/devwavelimiter.hpp +++ b/rocclr/device/devwavelimiter.hpp @@ -74,7 +74,7 @@ class WaveLimiter : public amd::ProfilingCallback { uint SIMDPerSH_; // Number of SIMDs per SH uint waves_; // Waves per SIMD to be set uint bestWave_; // Optimal waves per SIMD - uint worstWave_; // Wave number with the worst performance + uint worstWave_; // Wave number with the worst performance uint countAll_; // Number of kernel executions StateKind state_; WaveLimiterManager* manager_; diff --git a/rocclr/device/gpu/gslbe/src/rt/EventQueue.cpp b/rocclr/device/gpu/gslbe/src/rt/EventQueue.cpp index 6cbd1fa787..1416ba3c7e 100644 --- a/rocclr/device/gpu/gslbe/src/rt/EventQueue.cpp +++ b/rocclr/device/gpu/gslbe/src/rt/EventQueue.cpp @@ -52,7 +52,7 @@ EventQueue::open(gsCtx* cs, gslQueryTarget target, EQManagerConfig config, uint3 assert((GpuEvent::InvalidID+1) % m_queueSize == 0); m_cs = cs; - + m_headId = m_queueSize - 1 ; m_tail = 0; m_latestRetired = 0; @@ -74,7 +74,7 @@ EventQueue::close() { return; } - + for (unsigned int i = 0; i < m_queueSize; i++) { m_cs->destroyQuery(m_queries[i]); diff --git a/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D11.cpp b/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D11.cpp index b2c3578352..de95930a67 100644 --- a/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D11.cpp +++ b/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D11.cpp @@ -26,8 +26,8 @@ #include /************************************************************************************************************** -* Note: ideally the DXX extension interfaces should be mapped from the DXX perforce branch. -* This means CAL client spec will need to change to include headers directly from the DXX perforce tree. +* Note: ideally the DXX extension interfaces should be mapped from the DXX perforce branch. +* This means CAL client spec will need to change to include headers directly from the DXX perforce tree. * However, CAL only cares about the DXX OpenCL extension interface class. The spec cannot change * without notification. So it is safe to use a local copy of the relevant DXX extension interface classes. **************************************************************************************************************/ @@ -107,7 +107,7 @@ queryD3D11DeviceGPUMask(ID3D11Device* pd3d11Device, UINT* pd3d11DeviceGPUMask) if (pExt != NULL) { pExt->Release(); - } + } return (SUCCEEDED(hr)); } @@ -148,8 +148,8 @@ CALGSLDevice::associateD3D11Device(void* d3d11Device) } else { - // special handling for Intel iGPU + AMD dGPU in LDA mode (only occurs on a PX platform) where - // the D3D11Device object is created on the Intel iGPU and passed to AMD dGPU (secondary) to interoperate. + // special handling for Intel iGPU + AMD dGPU in LDA mode (only occurs on a PX platform) where + // the D3D11Device object is created on the Intel iGPU and passed to AMD dGPU (secondary) to interoperate. if (calDevChainBitMask > 1) { canInteroperate = false; diff --git a/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D9.cpp b/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D9.cpp index dc049ecdf9..c5b2810a88 100644 --- a/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D9.cpp +++ b/rocclr/device/gpu/gslbe/src/rt/GSLDeviceD3D9.cpp @@ -27,8 +27,8 @@ #include /************************************************************************************************************** -* Note: ideally the DXX extension interfaces should be mapped from the DXX perforce branch. -* This means CAL client spec will need to change to include headers directly from the DXX perforce tree. +* Note: ideally the DXX extension interfaces should be mapped from the DXX perforce branch. +* This means CAL client spec will need to change to include headers directly from the DXX perforce tree. * However, CAL only cares about the DXX OpenCL extension interface class. The spec cannot change * without notification. So it is safe to use a local copy of the relevant DXX extension interface classes. **************************************************************************************************************/ diff --git a/rocclr/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp b/rocclr/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp index 22dcc41c92..9d57b46e6a 100644 --- a/rocclr/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp +++ b/rocclr/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp @@ -723,7 +723,7 @@ CALGSLDevice::glCanInterop(CALvoid* GLplatformContext, CALvoid* GLdeviceContext) GLuint glDeviceId = 0 ; GLuint glChainMask = 0 ; GLXContext ctx = (GLXContext)GLplatformContext; - + if (glXGetContextMVPUInfoAMD(ctx,&glDeviceId,&glChainMask)){ GLuint deviceId = 0 ; GLuint chainMask = 0 ; diff --git a/rocclr/device/pal/paltimestamp.cpp b/rocclr/device/pal/paltimestamp.cpp index 37af64b8c3..9333c348fd 100644 --- a/rocclr/device/pal/paltimestamp.cpp +++ b/rocclr/device/pal/paltimestamp.cpp @@ -17,7 +17,7 @@ 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 "os/os.hpp" #include "platform/perfctr.hpp" #include "device/pal/paldefs.hpp" diff --git a/rocclr/device/rocm/pro/prodevice.cpp b/rocclr/device/rocm/pro/prodevice.cpp index 465735c8c5..71d203bdb8 100644 --- a/rocclr/device/rocm/pro/prodevice.cpp +++ b/rocclr/device/rocm/pro/prodevice.cpp @@ -154,7 +154,7 @@ bool ProDevice::Create(uint32_t bus, uint32_t device, uint32_t func) { Funcs().AmdgpuQueryInfo(dev_handle_, AMDGPU_INFO_CAPABILITY, sizeof(drm_amdgpu_capability), &cap); // Check if DGMA and SSG are available - if ((cap.flag & (AMDGPU_CAPABILITY_DIRECT_GMA_FLAG | AMDGPU_CAPABILITY_SSG_FLAG)) == + if ((cap.flag & (AMDGPU_CAPABILITY_DIRECT_GMA_FLAG | AMDGPU_CAPABILITY_SSG_FLAG)) == (AMDGPU_CAPABILITY_DIRECT_GMA_FLAG | AMDGPU_CAPABILITY_SSG_FLAG)) { result = true; break; diff --git a/rocclr/device/rocm/rocglinterop.cpp b/rocclr/device/rocm/rocglinterop.cpp index 02754c2592..dcefc11e04 100644 --- a/rocclr/device/rocm/rocglinterop.cpp +++ b/rocclr/device/rocm/rocglinterop.cpp @@ -70,7 +70,7 @@ bool Init(MESA_INTEROP_KIND Kind) { if (loadedGLAPITypes == MESA_INTEROP_NONE) { void* glxinfo=dlsym(RTLD_DEFAULT, "MesaGLInteropGLXQueryDeviceInfo"); void* eglinfo=dlsym(RTLD_DEFAULT, "MesaGLInteropEGLQueryDeviceInfo"); - + GlxInfo=(PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC*)glxinfo; EglInfo=(PFNMESAGLINTEROPEGLQUERYDEVICEINFOPROC*)eglinfo; diff --git a/rocclr/elf/elf.cpp b/rocclr/elf/elf.cpp index 3dfe41989a..ffc6b9a923 100644 --- a/rocclr/elf/elf.cpp +++ b/rocclr/elf/elf.cpp @@ -456,7 +456,7 @@ bool Elf::getTarget(uint16_t& machine, ElfPlatform& platform) const bool Elf::setTarget(uint16_t machine, ElfPlatform platform) { Elf64_Half mach; - if (platform == CPU_PLATFORM) + if (platform == CPU_PLATFORM) mach = machine + CPU_BASE; else if (platform == CAL_PLATFORM) mach = machine + CAL_BASE; diff --git a/rocclr/elf/elf.hpp b/rocclr/elf/elf.hpp index 14220ad4b0..b1ee2d46c8 100644 --- a/rocclr/elf/elf.hpp +++ b/rocclr/elf/elf.hpp @@ -208,7 +208,7 @@ private: bool _successful; -public: +public: /* Elf object can be created for reading or writing (it could be created for diff --git a/rocclr/elf/elfio/elf_types.hpp b/rocclr/elf/elfio/elf_types.hpp index 5a286e09c0..27c5dd5416 100644 --- a/rocclr/elf/elfio/elf_types.hpp +++ b/rocclr/elf/elfio/elf_types.hpp @@ -278,7 +278,7 @@ typedef uint64_t Elf64_Off; #define EM_TILE64 187 // Tilera TILE64 multicore architecture family #define EM_TILEPRO 188 // Tilera TILEPro multicore architecture family #define EM_MICROBLAZE 189 // Xilinx MicroBlaze 32-bit RISC soft processor core -#define EM_CUDA 190 // NVIDIA CUDA architecture +#define EM_CUDA 190 // NVIDIA CUDA architecture #define EM_TILEGX 191 // Tilera TILE-Gx multicore architecture family #define EM_CLOUDSHIELD 192 // CloudShield architecture family #define EM_COREA_1ST 193 // KIPO-KAIST Core-A 1st generation processor family diff --git a/rocclr/elf/elfio/elfio_dump.hpp b/rocclr/elf/elfio/elfio_dump.hpp index 86d70b58ba..c51e3a5873 100644 --- a/rocclr/elf/elfio/elfio_dump.hpp +++ b/rocclr/elf/elfio/elfio_dump.hpp @@ -37,7 +37,7 @@ namespace ELFIO { static struct class_table_t { const char key; const char* str; -} class_table [] = +} class_table [] = { { ELFCLASS32, "ELF32" }, { ELFCLASS64, "ELF64" }, @@ -47,7 +47,7 @@ static struct class_table_t { static struct endian_table_t { const char key; const char* str; -} endian_table [] = +} endian_table [] = { { ELFDATANONE, "None" }, { ELFDATA2LSB, "Little endian" }, @@ -58,7 +58,7 @@ static struct endian_table_t { static struct version_table_t { const Elf64_Word key; const char* str; -} version_table [] = +} version_table [] = { { EV_NONE , "None" }, { EV_CURRENT, "Current" }, @@ -68,7 +68,7 @@ static struct version_table_t { static struct type_table_t { const Elf32_Half key; const char* str; -} type_table [] = +} type_table [] = { { ET_NONE, "No file type" }, { ET_REL , "Relocatable file" }, @@ -81,7 +81,7 @@ static struct type_table_t { static struct machine_table_t { const Elf64_Half key; const char* str; -} machine_table [] = +} machine_table [] = { { EM_NONE , "No machine" }, { EM_M32 , "AT&T WE 32100" }, @@ -283,7 +283,7 @@ static struct machine_table_t { static struct section_type_table_t { const Elf64_Half key; const char* str; -} section_type_table [] = +} section_type_table [] = { { SHT_NULL , "NULL" }, { SHT_PROGBITS , "PROGBITS" }, @@ -308,7 +308,7 @@ static struct section_type_table_t { static struct segment_type_table_t { const Elf_Word key; const char* str; -} segment_type_table [] = +} segment_type_table [] = { { PT_NULL , "NULL" }, { PT_LOAD , "LOAD" }, @@ -324,7 +324,7 @@ static struct segment_type_table_t { static struct segment_flag_table_t { const Elf_Word key; const char* str; -} segment_flag_table [] = +} segment_flag_table [] = { { 0, "" }, { 1, "X" }, @@ -340,7 +340,7 @@ static struct segment_flag_table_t { static struct symbol_bind_t { const Elf_Word key; const char* str; -} symbol_bind_table [] = +} symbol_bind_table [] = { { STB_LOCAL , "LOCAL" }, { STB_GLOBAL , "GLOBAL" }, @@ -356,7 +356,7 @@ static struct symbol_bind_t { static struct symbol_type_t { const Elf_Word key; const char* str; -} symbol_type_table [] = +} symbol_type_table [] = { { STT_NOTYPE , "NOTYPE" }, { STT_OBJECT , "OBJECT" }, @@ -375,7 +375,7 @@ static struct symbol_type_t { static struct dynamic_tag_t { const Elf_Word key; const char* str; -} dynamic_tag_table [] = +} dynamic_tag_table [] = { { DT_NULL , "NULL" }, { DT_NEEDED , "NEEDED" }, @@ -431,7 +431,7 @@ class dump static void header( std::ostream& out, const elfio& reader ) { - if (!reader.get_header_size()) + if (!reader.get_header_size()) { return; } @@ -465,12 +465,12 @@ class dump out << "[ Nr ] Type Addr Size ES Flg" << std::endl << " Lk Inf Al Name" << std::endl; } - + for ( Elf_Half i = 0; i < n; ++i ) { // For all sections section* sec = reader.sections[i]; section_header( out, i, sec, reader.get_class() ); } - + out << "Key to Flags: W (write), A (alloc), X (execute)\n\n" << std::endl; } @@ -483,7 +483,7 @@ class dump std::ios_base::fmtflags original_flags = out.flags(); if ( elf_class == ELFCLASS32 ) { // Output for 32-bit - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_STR_FORMAT( 17 ) << str_section_type( sec->get_type() ) << " " @@ -498,7 +498,7 @@ class dump << std::endl; } else { // Output for 64-bit - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_STR_FORMAT( 17 ) << str_section_type( sec->get_type() ) << " " @@ -517,7 +517,7 @@ class dump out.flags(original_flags); - return; + return; } //------------------------------------------------------------------------------ @@ -539,12 +539,12 @@ class dump << " FileSize Mem.Size Align" << std::endl; } - + for ( Elf_Half i = 0; i < n; ++i ) { segment* seg = reader.segments[i]; segment_header( out, i, seg, reader.get_class() ); } - + out << std::endl; } @@ -556,7 +556,7 @@ class dump std::ios_base::fmtflags original_flags = out.flags(); if ( elf_class == ELFCLASS32 ) { // Output for 32-bit - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_STR_FORMAT( 14 ) << str_segment_type( seg->get_type() ) << " " @@ -569,7 +569,7 @@ class dump << std::endl; } else { // Output for 64-bit - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_STR_FORMAT( 14 ) << str_segment_type( seg->get_type() ) << " " @@ -586,7 +586,7 @@ class dump out.flags(original_flags); } - + //------------------------------------------------------------------------------ static void symbol_tables( std::ostream& out, const elfio& reader ) @@ -626,7 +626,7 @@ class dump } } } - + //------------------------------------------------------------------------------ static void symbol_table( std::ostream& out, @@ -642,7 +642,7 @@ class dump std::ios_base::fmtflags original_flags = out.flags(); if ( elf_class == ELFCLASS32 ) { // Output for 32-bit - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_HEX_FORMAT( 8 ) << value << " " @@ -654,7 +654,7 @@ class dump << std::endl; } else { // Output for 64-bit - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_HEX_FORMAT( 16 ) << value << " " @@ -670,7 +670,7 @@ class dump out.flags(original_flags); } - + //------------------------------------------------------------------------------ static void notes( std::ostream& out, const elfio& reader ) @@ -690,14 +690,14 @@ class dump std::string name; void* desc; Elf_Word descsz; - + if ( notes.get_note( j, type, name, desc, descsz ) ) { // 'name' usually contains \0 at the end. Try to fix it name = name.c_str(); note( out, j, type, name ); } } - + out << std::endl; } } @@ -711,14 +711,14 @@ class dump Elf_Word type, const std::string& name ) { - out << " [" + out << " [" << DUMP_DEC_FORMAT( 2 ) << no << "] " << DUMP_HEX_FORMAT( 8 ) << type << " " << DUMP_STR_FORMAT( 1 ) << name << std::endl; } - + //------------------------------------------------------------------------------ static void dynamic_tags( std::ostream& out, const elfio& reader ) @@ -749,7 +749,7 @@ class dump } } } - + //------------------------------------------------------------------------------ static void dynamic_tag( std::ostream& out, @@ -759,7 +759,7 @@ class dump std::string str, unsigned int /*elf_class*/ ) { - out << "[" + out << "[" << DUMP_DEC_FORMAT( 5 ) << no << "] " << DUMP_STR_FORMAT( 16 ) << str_dynamic_tag( tag ) << " "; @@ -800,7 +800,7 @@ class dump out.flags(original_flags); } - return; + return; } //------------------------------------------------------------------------------ @@ -854,7 +854,7 @@ class dump out.flags(original_flags); } - return; + return; } //------------------------------------------------------------------------------ @@ -876,7 +876,7 @@ class dump out << std::endl; } - + private: //------------------------------------------------------------------------------ template< typename T, typename K > @@ -922,7 +922,7 @@ class dump return format_assoc( table, (const int)key ); } - + //------------------------------------------------------------------------------ static std::string @@ -970,7 +970,7 @@ class dump #undef DUMP_HEX_FORMAT #undef DUMP_STR_FORMAT }; // class dump - + } // namespace ELFIO } // namespace amd diff --git a/rocclr/elf/elfio/elfio_section.hpp b/rocclr/elf/elfio/elfio_section.hpp index 21ca4bc24c..dec5681c3b 100644 --- a/rocclr/elf/elfio/elfio_section.hpp +++ b/rocclr/elf/elfio/elfio_section.hpp @@ -60,7 +60,7 @@ class section protected: ELFIO_SET_ACCESS_DECL( Elf64_Off, offset ); ELFIO_SET_ACCESS_DECL( Elf_Half, index ); - + virtual void load( std::istream& stream, std::streampos header_offset ) = 0; virtual void save( std::ostream& stream, diff --git a/rocclr/elf/elfio/elfio_segment.hpp b/rocclr/elf/elfio/elfio_segment.hpp index f354124970..e266c9fe2c 100644 --- a/rocclr/elf/elfio/elfio_segment.hpp +++ b/rocclr/elf/elfio/elfio_segment.hpp @@ -56,7 +56,7 @@ class segment protected: ELFIO_SET_ACCESS_DECL( Elf64_Off, offset ); ELFIO_SET_ACCESS_DECL( Elf_Half, index ); - + virtual const std::vector& get_sections() const = 0; virtual void load( std::istream& stream, std::streampos header_offset ) = 0; virtual void save( std::ostream& stream, std::streampos header_offset, @@ -103,7 +103,7 @@ class segment_impl : public segment } //------------------------------------------------------------------------------ - void + void set_stream_size(size_t value) { stream_size = value; @@ -179,7 +179,7 @@ class segment_impl : public segment { return sections; } - + //------------------------------------------------------------------------------ void set_index( Elf_Half value ) @@ -213,7 +213,7 @@ class segment_impl : public segment } catch (const std::bad_alloc&) { data = 0; } - + if ( 0 != data ) { stream.read( data, size ); data[size] = 0; diff --git a/rocclr/elf/elfio/elfio_strings.hpp b/rocclr/elf/elfio/elfio_strings.hpp index 88a45e5d79..0f8a0caf63 100644 --- a/rocclr/elf/elfio/elfio_strings.hpp +++ b/rocclr/elf/elfio/elfio_strings.hpp @@ -65,7 +65,7 @@ class string_section_accessor_template add_string( const char* str ) { Elf_Word current_position = 0; - + if (string_section) { // Strings are addeded to the end of the current section data current_position = (Elf_Word)string_section->get_size(); diff --git a/rocclr/platform/kernel.cpp b/rocclr/platform/kernel.cpp index a716f2d7dc..3fc579972b 100644 --- a/rocclr/platform/kernel.cpp +++ b/rocclr/platform/kernel.cpp @@ -226,7 +226,7 @@ address KernelParameters::capture(const Device& device, uint64_t lclMemSize, int *error = CL_OUT_OF_RESOURCES; } - // Check if capture was successful + // Check if capture was successful if (CL_SUCCESS != *error) { AlignedMemory::deallocate(mem); mem = nullptr;