Skip to content

Commit

Permalink
replacing tid
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Sep 20, 2024
1 parent 569624d commit 431c9f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/solver/lu_decomposition.cu
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ namespace micm
if (d_do_aik[do_aik_offset++])
{
size_t U_idx = d_uik_nkj[uik_nkj_offset].first + tid;
size_t A_idx = d_aik[aik_offset++];
size_t A_idx = d_aik[aik_offset++] + tid;
if (A_idx == sentinel) {
d_U[U_idx] = 0;
}
else {
d_U[U_idx] = d_A[A_idx + tid];
d_U[U_idx] = d_A[A_idx];
}
}

Expand All @@ -90,12 +90,12 @@ namespace micm
if (d_do_aki[do_aki_offset++])
{
size_t L_idx = d_lki_nkj[lki_nkj_offset].first + tid;
size_t A_idx = d_aki[aki_offset++];
size_t A_idx = d_aki[aki_offset++] + tid;
if (A_idx == sentinel) {
d_L[L_idx] = 0;
}
else {
d_L[L_idx] = d_A[A_idx + tid];
d_L[L_idx] = d_A[A_idx];
}
}
for (size_t ikj = 0; ikj < d_lki_nkj[lki_nkj_offset].second; ++ikj)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/solver/test_linear_solver_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void testRandomMatrix(std::size_t number_of_blocks)
CopyToHostDense<MatrixPolicy>(x);

check_results<FloatingPointType, MatrixPolicy, SparseMatrixPolicy>(
A, b, x, [&](const FloatingPointType a, const FloatingPointType b) -> void { EXPECT_NEAR(a, b, 1.0e-06); });
A, b, x, [&](const FloatingPointType a, const FloatingPointType b) -> void { EXPECT_NEAR(a, b, 1.0e-09); });
}

template<class MatrixPolicy, class SparseMatrixPolicy, class LinearSolverPolicy>
Expand Down Expand Up @@ -308,7 +308,7 @@ void testDiagonalMatrix(std::size_t number_of_blocks)
CopyToHostDense<MatrixPolicy>(x);

check_results<FloatingPointType, MatrixPolicy, SparseMatrixPolicy>(
A, b, x, [&](const FloatingPointType a, const FloatingPointType b) -> void { EXPECT_NEAR(a, b, 1.0e-8); });
A, b, x, [&](const FloatingPointType a, const FloatingPointType b) -> void { EXPECT_NEAR(a, b, 1.0e-13); });
}

template<class MatrixPolicy, class SparseMatrixPolicy>
Expand Down

0 comments on commit 431c9f1

Please sign in to comment.