Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Matrix Value Types in SparseMatrixMultiplicationUtility #13079

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions kratos/utilities/sparse_matrix_multiplication_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ class SparseMatrixMultiplicationUtility
// Get access to A, B and C data
const IndexType* index1_a = A.index1_data().begin();
const IndexType* index2_a = A.index2_data().begin();
const double* values_a = A.value_data().begin();
const typename AMatrix::value_type* values_a = A.value_data().begin();
const IndexType* index1_b = B.index1_data().begin();
const IndexType* index2_b = B.index2_data().begin();
const double* values_b = B.value_data().begin();
const typename BMatrix::value_type* values_b = B.value_data().begin();
IndexType* c_ptr = new IndexType[nrows + 1];

c_ptr[0] = 0;
Expand Down Expand Up @@ -263,10 +263,10 @@ class SparseMatrixMultiplicationUtility
// Get access to A and B data
const IndexType* index1_a = A.index1_data().begin();
const IndexType* index2_a = A.index2_data().begin();
const double* values_a = A.value_data().begin();
const typename AMatrix::value_type* values_a = A.value_data().begin();
const IndexType* index1_b = B.index1_data().begin();
const IndexType* index2_b = B.index2_data().begin();
const double* values_b = B.value_data().begin();
const typename BMatrix::value_type* values_b = B.value_data().begin();

// Definition of TLS
struct TLS_max {
Expand Down Expand Up @@ -579,7 +579,7 @@ class SparseMatrixMultiplicationUtility
C = CMatrix(NRows, NCols, nonzero_values);
IndexType* index1_c = C.index1_data().begin();
IndexType* index2_c = C.index2_data().begin();
double* values_c = C.value_data().begin();
ValueType* values_c = C.value_data().begin();

index1_c[0] = 0;
for (TSize i = 0; i < NRows; i++) {
Expand Down
Loading