94 lines
5.0 KiB
Diff
94 lines
5.0 KiB
Diff
From 530047af4a0f437dafc02f76b3a17e3b1536c7ec Mon Sep 17 00:00:00 2001
|
|
From: Nico Trost <nico.trost@amd.com>
|
|
Date: Sun, 21 Jun 2020 20:54:09 +0200
|
|
Subject: [PATCH] fix for csr2csr_compress and nnz_compress
|
|
|
|
---
|
|
library/src/nvcc_detail/hipsparse.cpp | 24 ++++--------------------
|
|
1 file changed, 4 insertions(+), 20 deletions(-)
|
|
|
|
diff --git a/library/src/nvcc_detail/hipsparse.cpp b/library/src/nvcc_detail/hipsparse.cpp
|
|
index 0883351..d7cbb8c 100644
|
|
--- a/library/src/nvcc_detail/hipsparse.cpp
|
|
+++ b/library/src/nvcc_detail/hipsparse.cpp
|
|
@@ -5213,10 +5213,6 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
|
int* nnzC,
|
|
hipComplex tol)
|
|
{
|
|
- cuComplex cutol;
|
|
- cutol.x = tol.x;
|
|
- cutol.y = tol.y;
|
|
-
|
|
return hipCUSPARSEStatusToHIPStatus(cusparseCnnz_compress((cusparseHandle_t)handle,
|
|
m,
|
|
(const cusparseMatDescr_t)descrA,
|
|
@@ -5224,7 +5220,7 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
|
csrRowPtrA,
|
|
nnzPerRow,
|
|
nnzC,
|
|
- cutol));
|
|
+ {cuCrealf(tol), cuCimagf(tol)}));
|
|
}
|
|
|
|
hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
|
@@ -5236,10 +5232,6 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
|
int* nnzC,
|
|
hipDoubleComplex tol)
|
|
{
|
|
- cuDoubleComplex cutol;
|
|
- cutol.x = tol.x;
|
|
- cutol.y = tol.y;
|
|
-
|
|
return hipCUSPARSEStatusToHIPStatus(cusparseZnnz_compress((cusparseHandle_t)handle,
|
|
m,
|
|
(const cusparseMatDescr_t)descrA,
|
|
@@ -5247,7 +5239,7 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
|
csrRowPtrA,
|
|
nnzPerRow,
|
|
nnzC,
|
|
- cutol));
|
|
+ {cuCreal(tol), cuCimag(tol)}));
|
|
}
|
|
|
|
hipsparseStatus_t hipsparseXcsr2coo(hipsparseHandle_t handle,
|
|
@@ -5773,10 +5765,6 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
|
int* csrRowPtrC,
|
|
hipComplex tol)
|
|
{
|
|
- cuComplex cutol;
|
|
- cutol.x = tol.x;
|
|
- cutol.y = tol.y;
|
|
-
|
|
return hipCUSPARSEStatusToHIPStatus(cusparseCcsr2csr_compress((cusparseHandle_t)handle,
|
|
m,
|
|
n,
|
|
@@ -5789,7 +5777,7 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
|
(cuComplex*)csrValC,
|
|
csrColIndC,
|
|
csrRowPtrC,
|
|
- cutol));
|
|
+ {cuCrealf(tol), cuCimagf(tol)}));
|
|
}
|
|
|
|
hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
|
@@ -5806,10 +5794,6 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
|
int* csrRowPtrC,
|
|
hipDoubleComplex tol)
|
|
{
|
|
- cuDoubleComplex cutol;
|
|
- cutol.x = tol.x;
|
|
- cutol.y = tol.y;
|
|
-
|
|
return hipCUSPARSEStatusToHIPStatus(cusparseZcsr2csr_compress((cusparseHandle_t)handle,
|
|
m,
|
|
n,
|
|
@@ -5822,7 +5806,7 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
|
(cuDoubleComplex*)csrValC,
|
|
csrColIndC,
|
|
csrRowPtrC,
|
|
- cutol));
|
|
+ {cuCreal(tol), cuCimag(tol)}));
|
|
}
|
|
|
|
hipsparseStatus_t hipsparseShyb2csr(hipsparseHandle_t handle,
|