From afe1835f56c30cfa1cd57bd3caedb8e5b34f1e1a Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 28 Nov 2014 18:47:54 -0500 Subject: [PATCH] P4 to Git Change 1101359 by weizhang@msdnweizhang-opencl on 2014/11/28 18:31:24 EPR #397491 - Replace "switch" with "if" so that new ASIC id doesn't need to be added. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#103 edit --- .../device/gpu/gslbe/src/rt/GSLDevice.cpp | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp index 45c6d0bdb4..0525cf3f64 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp @@ -411,28 +411,15 @@ CALGSLDevice::SetupAdapter(int32 &asic_id) } #endif - switch (asic_id) + if (asic_id < GSL_ATIASIC_ID_TAHITI_P || + asic_id == GSL_ATIASIC_ID_DEVASTATOR || + asic_id == GSL_ATIASIC_ID_SCRAPPER) { - case GSL_ATIASIC_ID_TAHITI_P: - case GSL_ATIASIC_ID_PITCAIRN_PM: - case GSL_ATIASIC_ID_CAPEVERDE_M: - case GSL_ATIASIC_ID_OLAND_M: - case GSL_ATIASIC_ID_HAINAN_M: - case GSL_ATIASIC_ID_BONAIRE_M: - case GSL_ATIASIC_ID_KALINDI: - case GSL_ATIASIC_ID_HAWAII_P: - case GSL_ATIASIC_ID_ICELAND_M: - case GSL_ATIASIC_ID_TONGA_P: - case GSL_ATIASIC_ID_GODAVARI: - case GSL_ATIASIC_ID_BERMUDA_P: - case GSL_ATIASIC_ID_FIJI_P: - case GSL_ATIASIC_ID_CARRIZO: - case GSL_ATIASIC_ID_ELLESMERE_P: - m_computeRing = true; - break; - default: m_computeRing = false; - break; + } + else + { + m_computeRing = true; } if (!flagIsDefault(GPU_NUM_COMPUTE_RINGS))