Skip to content

Commit 7bb013a

Browse files
authored
add loop unrolling to MathArray2D (#1872)
1 parent 0fa7721 commit 7bb013a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interfaces/ArrayUtilities.H

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ namespace ArrayUtil
3737
template <typename T, int XLO, int XHI, int YLO, int YHI>
3838
struct MathArray2D
3939
{
40-
AMREX_GPU_HOST_DEVICE AMREX_INLINE
40+
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
4141
void zero()
4242
{
43+
AMREX_UNROLL_LOOP(NET_LOOP_UNROLL_LEN)
4344
for (int i = 0; i < (YHI-YLO+1)*(XHI-XLO+1); ++i) {
4445
arr[i] = 0.0_rt;
4546
}

0 commit comments

Comments
 (0)