From 53ab58a3d28b355657f46129a18f34793e42f3cb Mon Sep 17 00:00:00 2001 From: Vyacheslav Klochkov Date: Wed, 3 Jan 2024 13:54:40 -0600 Subject: [PATCH] [ESIMD][E2E][NFC] Replace some of constexpr operations with regular (#12277) This is done to avoid problems with those types that may have issues with constexpr operations/constructors/etc. Signed-off-by: Klochkov, Vyacheslav N --- .../unified_memory_api/Inputs/atomic_update_slm.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update_slm.hpp b/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update_slm.hpp index 5eb39f2ddea72..ea5fec0503ede 100644 --- a/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update_slm.hpp +++ b/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update_slm.hpp @@ -395,16 +395,19 @@ template struct ImplLoadBase { template struct ImplStoreBase { static constexpr C atomic_op = Op; static constexpr int n_args = 1; - static constexpr T base = (T)(2 + FPDELTA); static T init(int i) { return 0; } static T gold(int i, bool use_mask) { + T base = (T)(2 + FPDELTA); T gold = is_updated(i, N, use_mask) ? base : init(i); return gold; } - static T arg0(int i) { return base; } + static T arg0(int i) { + T base = (T)(2 + FPDELTA); + return base; + } }; template struct ImplAdd { @@ -426,13 +429,14 @@ template struct ImplAdd { template struct ImplSub { static constexpr C atomic_op = Op; static constexpr int n_args = 1; - static constexpr T base = (T)(5 + FPDELTA); static T init(int i) { + T base = (T)(5 + FPDELTA); return (T)(repeat * threads_per_group * n_groups * (T)(1 + FPDELTA) + base); } static T gold(int i, bool use_mask) { + T base = (T)(5 + FPDELTA); T gold = is_updated(i, N, use_mask) ? base : init(i); return gold; }