Skip to content

Commit

Permalink
minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahdhn committed Jul 13, 2024
1 parent 6f43f5d commit 601e378
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/rxmesh/matrix/sparse_matrix.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ struct SparseMatrix
rxmesh::DenseMatrix<T>& C_mat,
cudaStream_t stream = 0)
{
assert(cols() == B_mat.cols());
assert(cols() == B_mat.rows());
assert(rows() == C_mat.rows());
assert(B_mat.cols() == C_mat.cols());

Expand Down
12 changes: 8 additions & 4 deletions tests/RXMesh_test/test_attribute.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,14 @@ TEST(Attribute, Reduce)
ASSERT_EQ(cudaDeviceSynchronize(), cudaSuccess);

uint32_t result = 0;
rx.for_each_edge(rxmesh::HOST, [&](const rxmesh::EdgeHandle eh) {
auto pl = eh.unpack();
result = std::max(result, pl.first * pl.second);
});
rx.for_each_edge(
rxmesh::HOST,
[&](const rxmesh::EdgeHandle eh) {
auto pl = eh.unpack();
result = std::max(result, pl.first * pl.second);
},
NULL,
false);

EXPECT_EQ(output, result);
}
Expand Down

0 comments on commit 601e378

Please sign in to comment.