Change storage in BlockRandomAccessSparseMatrix

- TripletSparseMatrix in BlockRandomAccessSparseMatrix is replaced with
   BlockSparseMatrix
 - BlockSparseMatrix::ToCompressedRowSparseMatrix is performed in a
   direct sort-less way

Change-Id: Ib951fda1b9394050e2c47a9721172c5e3c674801
This commit is contained in:
Dmitriy Korchemkin
2023-04-08 14:12:25 +03:00
parent d340f81bd0
commit 77ad8bb4e5
14 changed files with 361 additions and 207 deletions
+2 -4
View File
@@ -80,10 +80,8 @@ class CudaSparseMatrixTest : public ::testing::Test {
TEST_F(CudaSparseMatrixTest, RightMultiplyAndAccumulate) {
std::string message;
CompressedRowSparseMatrix A_crs(
A_->num_rows(), A_->num_cols(), A_->num_nonzeros());
A_->ToCompressedRowSparseMatrix(&A_crs);
CudaSparseMatrix A_gpu(&context_, A_crs);
auto A_crs = A_->ToCompressedRowSparseMatrix();
CudaSparseMatrix A_gpu(&context_, *A_crs);
CudaVector x_gpu(&context_, A_gpu.num_cols());
CudaVector res_gpu(&context_, A_gpu.num_rows());
x_gpu.CopyFromCpu(x_);