Skip to content

Commit dbcd0be

Browse files
[SYCL-MLIR] Remove uses of 'detail::dim_loop<>'
Similar to e74334e. cgeist is unable to handle it correctly. Signed-off-by: Tsang, Whitney <[email protected]>
1 parent f372b39 commit dbcd0be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,8 +2527,8 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
25272527
// Method which calculates linear offset for the ID using Range and Offset.
25282528
template <int Dims = AdjustedDim> size_t getLinearIndex(id<Dims> Id) const {
25292529
size_t Result = 0;
2530-
detail::dim_loop<Dims>(
2531-
[&, this](size_t I) { Result = Result * getSize()[I] + Id[I]; });
2530+
for (int I = 0; I < Dims; ++I)
2531+
Result = Result * getSize()[I] + Id[I];
25322532
return Result;
25332533
}
25342534

0 commit comments

Comments
 (0)