Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 308281f

Browse files
author
Sven Verdoolaege
committed
PolyhedralMapperTest::TileAndMapBlocksAndThreads: map in same order as TC mapper
The TC mapper maps the innermost band member to thread identifier X. Do the same in PolyhedralMapperTest::TileAndMapBlocksAndThreads for consistency. This will allow the mapping to threads to be shared over all users in a subsequent commit.
1 parent 758ad94 commit 308281f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_cuda_mapper.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ struct PolyhedralMapperTest : public ::testing::Test {
114114
bandScale(band, tileSizes);
115115

116116
USING_MAPPING_SHORT_NAMES(BX, BY, BZ, TX, TY, TZ);
117-
band = mscop->map(band->child({0}), 0, TX);
118-
band = mscop->map(band, 1, TY);
117+
band = mscop->map(band->child({0}), 1, TX);
118+
band = mscop->map(band, 0, TY);
119119
mscop->insertMappingContext();
120120
return mscop;
121121
}
@@ -184,8 +184,8 @@ def fun(float(N, M) A, float(N, M) B) -> (C) {
184184
const float32 (*A)[M] = reinterpret_cast<const float32 (*)[M]>(pA);
185185
const float32 (*B)[M] = reinterpret_cast<const float32 (*)[M]>(pB);
186186
for (int c1 = 16 * b1; c1 < M; c1 += 4096) {
187-
if (M >= t1 + c1 + 1) {
188-
C[(t0 + 16 * b0)][(t1 + c1)] = (A[(t0 + 16 * b0)][(t1 + c1)] + B[(t0 + 16 * b0)][(t1 + c1)]);
187+
if (M >= t0 + c1 + 1) {
188+
C[(t1 + 16 * b0)][(t0 + c1)] = (A[(t1 + 16 * b0)][(t0 + c1)] + B[(t1 + 16 * b0)][(t0 + c1)]);
189189
}
190190
}
191191
}

0 commit comments

Comments
 (0)