From 8f7df519dacc8d6112c4db44a604c3a34209b590 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 4 Apr 2018 18:00:17 -0400
Subject: [PATCH] P4 to Git Change 1536925 by vsytchen@vsytchen-ocl-win10 on
2018/04/04 17:20:38
SWDEV-79445 - OCL generic changes and code clean-up
1. This change replaces the use of std::map with std::unordered_map to improve lookup/insert time.
2. Replace the use of std::make_pair and std::pair constructor with uniform initialization for cleaner code.
3. Replace the use of std::Container::iterator type with the auto keyword for cleaner code.
4. Use range based for loops where needed.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/14517/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_context.cpp#58 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d10.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d10_amd.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d11.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d11_amd.hpp#13 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d9.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d9_amd.hpp#17 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl.cpp#57 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_pipe.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#46 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuprogram.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuvirtual.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#216 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#297 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuappprofile.cpp#13 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpubinary.cpp#59 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#158 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#587 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#322 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#46 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#237 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#70 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#242 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#415 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#143 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palappprofile.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#79 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#59 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#60 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#84 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#46 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/pro/prodevice.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/pro/prodevice.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocbinary.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccounters.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#81 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#81 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#89 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#49 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.hpp#29 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#129 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#102 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/perfctr.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#91 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#43 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/sampler.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.cpp#17 edit
[ROCm/clr commit: d09ca72f74a0fc392ae9c6e80caf82db2a184658]
---
.../clr/rocclr/runtime/device/appprofile.hpp | 4 +-
.../rocclr/runtime/device/cpu/cpuprogram.cpp | 9 +-
.../rocclr/runtime/device/cpu/cpuvirtual.cpp | 14 +--
projects/clr/rocclr/runtime/device/device.cpp | 32 +++---
projects/clr/rocclr/runtime/device/device.hpp | 13 +--
.../runtime/device/gpu/gpuappprofile.cpp | 6 +-
.../rocclr/runtime/device/gpu/gpubinary.cpp | 34 +++---
.../rocclr/runtime/device/gpu/gpucompiler.cpp | 10 +-
.../rocclr/runtime/device/gpu/gpudevice.cpp | 2 +-
.../rocclr/runtime/device/gpu/gpukernel.cpp | 17 ++-
.../rocclr/runtime/device/gpu/gpuprintf.cpp | 8 +-
.../rocclr/runtime/device/gpu/gpuprogram.cpp | 23 ++--
.../rocclr/runtime/device/gpu/gpuprogram.hpp | 4 +-
.../rocclr/runtime/device/gpu/gpuresource.cpp | 2 +-
.../rocclr/runtime/device/gpu/gpuvirtual.cpp | 41 ++++---
.../rocclr/runtime/device/gpu/gpuvirtual.hpp | 4 +-
.../runtime/device/pal/palappprofile.cpp | 6 +-
.../rocclr/runtime/device/pal/palcompiler.cpp | 14 +--
.../rocclr/runtime/device/pal/paldevice.cpp | 2 +-
.../rocclr/runtime/device/pal/palprintf.cpp | 7 +-
.../rocclr/runtime/device/pal/palprogram.cpp | 9 +-
.../rocclr/runtime/device/pal/palresource.cpp | 4 +-
.../rocclr/runtime/device/pal/palvirtual.cpp | 23 ++--
.../rocclr/runtime/device/pal/palvirtual.hpp | 2 +-
.../rocclr/runtime/device/rocm/CMakeLists.txt | 8 +-
.../runtime/device/rocm/pro/prodevice.cpp | 3 +-
.../runtime/device/rocm/pro/prodevice.hpp | 4 +-
.../rocclr/runtime/device/rocm/rocbinary.hpp | 2 +-
.../runtime/device/rocm/roccompiler.cpp | 15 +--
.../runtime/device/rocm/roccounters.cpp | 11 +-
.../rocclr/runtime/device/rocm/rocprintf.cpp | 5 +-
.../rocclr/runtime/device/rocm/rocprogram.cpp | 5 +-
.../clr/rocclr/runtime/platform/command.cpp | 33 +++---
.../clr/rocclr/runtime/platform/command.hpp | 41 +++----
.../rocclr/runtime/platform/commandqueue.cpp | 7 +-
.../clr/rocclr/runtime/platform/context.cpp | 19 ++--
.../clr/rocclr/runtime/platform/context.hpp | 6 +-
.../clr/rocclr/runtime/platform/memory.hpp | 3 +-
.../clr/rocclr/runtime/platform/perfctr.hpp | 2 +-
.../clr/rocclr/runtime/platform/program.cpp | 104 ++++++++----------
.../clr/rocclr/runtime/platform/program.hpp | 8 +-
.../clr/rocclr/runtime/platform/sampler.hpp | 2 +-
projects/clr/rocclr/runtime/utils/flags.cpp | 8 +-
43 files changed, 254 insertions(+), 322 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/appprofile.hpp b/projects/clr/rocclr/runtime/device/appprofile.hpp
index fb651b3dbc..7707a85fcb 100644
--- a/projects/clr/rocclr/runtime/device/appprofile.hpp
+++ b/projects/clr/rocclr/runtime/device/appprofile.hpp
@@ -4,7 +4,7 @@
#ifndef APPPROFILE_HPP_
#define APPPROFILE_HPP_
-#include