Skip to content

Commit

Permalink
Review updates
Browse files Browse the repository at this point in the history
Co-authored-by: Yu-Hsiang Tsai <[email protected]>
  • Loading branch information
pratikvn and yhmtsai committed Dec 8, 2023
1 parent 70161d5 commit 60645ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dpcpp/matrix/batch_csr_kernels.hpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ __dpct_inline__ void advanced_apply_kernel(
auto temp = zero<ValueType>();
for (auto nnz = mat.row_ptrs[row]; nnz < mat.row_ptrs[row + 1]; nnz++) {
const auto col_idx = col[nnz];
temp += alpha * val[nnz] * b[col_idx];
temp += val[nnz] * b[col_idx];
}
x[row] = temp + beta * x[row];
x[row] = alpha * temp + beta * x[row];
}
}
11 changes: 5 additions & 6 deletions reference/test/matrix/batch_csr_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ class Csr : public ::testing::Test {
Csr()
: exec(gko::ReferenceExecutor::create()),
mtx_0(gko::batch::initialize<BMtx>(
{{I<T>({1.0, -1.0, 1.5}), I<T>({-2.0, 2.0, 3.0})},
{{1.0, -2.0, -0.5}, {1.0, -2.5, 4.0}}},
exec, 6)),
{{I<T>({1.0, -1.0, 0.0}), I<T>({-2.0, 2.0, 3.0})},
{{1.0, -2.0, 0.0}, {1.0, -2.5, 4.0}}},
exec, 5)),
mtx_00(gko::initialize<CsrMtx>(
{I<T>({1.0, -1.0, 1.5}), I<T>({-2.0, 2.0, 3.0})}, exec)),
{I<T>({1.0, -1.0, 0.0}), I<T>({-2.0, 2.0, 3.0})}, exec)),
mtx_01(gko::initialize<CsrMtx>(
{I<T>({1.0, -2.0, -0.5}), I<T>({1.0, -2.5, 4.0})}, exec)),
{I<T>({1.0, -2.0, 0.0}), I<T>({1.0, -2.5, 4.0})}, exec)),
b_0(gko::batch::initialize<BMVec>(
{{I<T>({1.0, 0.0, 1.0}), I<T>({2.0, 0.0, 1.0}),
I<T>({1.0, 0.0, 2.0})},
Expand Down Expand Up @@ -82,7 +82,6 @@ class Csr : public ::testing::Test {
std::ranlux48 rand_engine;
};


TYPED_TEST_SUITE(Csr, gko::test::ValueTypes, TypenameNameGenerator);


Expand Down

0 comments on commit 60645ec

Please sign in to comment.