Skip to content

Commit

Permalink
Refactor inference chunked matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
weiliw-amz committed Dec 9, 2022
1 parent 8f648b9 commit ca7cdab
Show file tree
Hide file tree
Showing 2 changed files with 226 additions and 157 deletions.
4 changes: 2 additions & 2 deletions pecos/core/utils/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ namespace pecos {
csr_t res;
res.allocate(rows, cols, nnz);
std::memcpy(res.col_idx, col_idx, sizeof(index_type) * nnz);
std::memcpy(res.val, val, sizeof(float) * nnz);
std::memcpy(res.val, val, sizeof(value_type) * nnz);
std::memcpy(res.row_ptr, row_ptr, sizeof(mem_index_type) * (rows + 1));
return res;
}
Expand Down Expand Up @@ -386,7 +386,7 @@ namespace pecos {
csc_t res;
res.allocate(rows, cols, nnz);
std::memcpy(res.row_idx, row_idx, sizeof(index_type) * nnz);
std::memcpy(res.val, val, sizeof(float) * nnz);
std::memcpy(res.val, val, sizeof(value_type) * nnz);
std::memcpy(res.col_ptr, col_ptr, sizeof(mem_index_type) * (cols + 1));
return res;
}
Expand Down
Loading

0 comments on commit ca7cdab

Please sign in to comment.