Skip to content

Commit 53ab58a

Browse files
authored
[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 <[email protected]>
1 parent 8c92df9 commit 53ab58a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update_slm.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,16 +395,19 @@ template <class T, int N, class C, C Op> struct ImplLoadBase {
395395
template <class T, int N, class C, C Op> struct ImplStoreBase {
396396
static constexpr C atomic_op = Op;
397397
static constexpr int n_args = 1;
398-
static constexpr T base = (T)(2 + FPDELTA);
399398

400399
static T init(int i) { return 0; }
401400

402401
static T gold(int i, bool use_mask) {
402+
T base = (T)(2 + FPDELTA);
403403
T gold = is_updated(i, N, use_mask) ? base : init(i);
404404
return gold;
405405
}
406406

407-
static T arg0(int i) { return base; }
407+
static T arg0(int i) {
408+
T base = (T)(2 + FPDELTA);
409+
return base;
410+
}
408411
};
409412

410413
template <class T, int N, class C, C Op> struct ImplAdd {
@@ -426,13 +429,14 @@ template <class T, int N, class C, C Op> struct ImplAdd {
426429
template <class T, int N, class C, C Op> struct ImplSub {
427430
static constexpr C atomic_op = Op;
428431
static constexpr int n_args = 1;
429-
static constexpr T base = (T)(5 + FPDELTA);
430432

431433
static T init(int i) {
434+
T base = (T)(5 + FPDELTA);
432435
return (T)(repeat * threads_per_group * n_groups * (T)(1 + FPDELTA) + base);
433436
}
434437

435438
static T gold(int i, bool use_mask) {
439+
T base = (T)(5 + FPDELTA);
436440
T gold = is_updated(i, N, use_mask) ? base : init(i);
437441
return gold;
438442
}

0 commit comments

Comments
 (0)