From e462118b6e97f4ee2cd94a714e593a66ca449cdd Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Mon, 15 Nov 2021 19:30:27 -0600 Subject: [PATCH] Add comments to GetPcieBlit. Comments call out the specific operation being selected since the ternary nest is a bit hard to read. Change-Id: If033dbaa6cba132e96196ad3fc6d5572042041f4 [ROCm/ROCR-Runtime commit: fc757310346123b9501c317eeeb57e8d39d8da17] --- .../runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index cb6c56d88c..e5582787a0 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -1516,10 +1516,11 @@ lazy_ptr& GpuAgent::GetPcieBlit(const core::Agent& dst_agent, lazy_ptr& blit = (src_agent.device_type() == core::Agent::kAmdCpuDevice && dst_agent.device_type() == core::Agent::kAmdGpuDevice) - ? blits_[BlitHostToDev] + ? blits_[BlitHostToDev] // CPU->GPU transfer. : (src_agent.device_type() == core::Agent::kAmdGpuDevice && dst_agent.device_type() == core::Agent::kAmdCpuDevice) - ? blits_[BlitDevToHost] : blits_[BlitDevToHost]; + ? blits_[BlitDevToHost] // GPU->CPU transfer. + : blits_[BlitDevToHost]; // GPU->GPU transfer. return blit; }