Skip to content

Commit 8c64f62

Browse files
committed
Simplify ein_reduce usages in reduce_tiles
1 parent 89b62fd commit 8c64f62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/linear_algebra/matrix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ NOINLINE void multiply_ein_reduce_tiles(
235235
// This scalarizes :( It would likely be fast if LLVM implemented
236236
// __restrict__: https://bugs.llvm.org/show_bug.cgi?id=45863.
237237
fill(C_ijo, static_cast<T>(0));
238-
ein_reduce(ein<i, j>(C_ijo) += ein<i, k>(A(io, _)) * ein<k, j>(B(_, jo)));
238+
ein_reduce(ein<i, j>(C_ijo) += ein<i, k>(A) * ein<k, j>(B));
239239
#else
240240
// Define an accumulator buffer.
241241
T buffer[tile_rows * tile_cols] = {0};
242242
auto accumulator = make_array_ref(buffer, make_compact(C_ijo.shape()));
243243

244244
// Perform the matrix multiplication for this tile.
245-
ein_reduce(ein<i, j>(accumulator) += ein<i, k>(A(io, _)) * ein<k, j>(B(_, jo)));
245+
ein_reduce(ein<i, j>(accumulator) += ein<i, k>(A) * ein<k, j>(B));
246246

247247
// Copy the accumulators to the output.
248248
#if 0

0 commit comments

Comments
 (0)