94 lines
4.4 KiB
Diff
94 lines
4.4 KiB
Diff
From e79985dccde22d826aceb3badfc643a3227979d2 Mon Sep 17 00:00:00 2001
|
|
From: Nico Trost <nico.trost@amd.com>
|
|
Date: Sun, 21 Jun 2020 20:48:22 +0200
|
|
Subject: [PATCH] fix for csr2csr_compress and nnz_compress
|
|
|
|
---
|
|
library/src/hcc_detail/hipsparse.cpp | 24 ++++--------------------
|
|
1 file changed, 4 insertions(+), 20 deletions(-)
|
|
|
|
diff --git a/library/src/hcc_detail/hipsparse.cpp b/library/src/hcc_detail/hipsparse.cpp
|
|
index 7786d6e..5cf0ad6 100644
|
|
--- a/library/src/hcc_detail/hipsparse.cpp
|
|
+++ b/library/src/hcc_detail/hipsparse.cpp
|
|
@@ -6284,10 +6284,6 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
|
int* csrRowPtrC,
|
|
hipComplex tol)
|
|
{
|
|
- rocsparse_float_complex rtol;
|
|
- rtol.x = tol.x;
|
|
- rtol.y = tol.y;
|
|
-
|
|
return rocSPARSEStatusToHIPStatus(
|
|
rocsparse_ccsr2csr_compress((rocsparse_handle)handle,
|
|
m,
|
|
@@ -6301,7 +6297,7 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
|
|
(rocsparse_float_complex*)csrValC,
|
|
csrRowPtrC,
|
|
csrColIndC,
|
|
- rtol));
|
|
+ {hipCrealf(tol), hipCimagf(tol)}));
|
|
}
|
|
|
|
hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
|
@@ -6318,10 +6314,6 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
|
int* csrRowPtrC,
|
|
hipDoubleComplex tol)
|
|
{
|
|
- rocsparse_double_complex rtol;
|
|
- rtol.x = tol.x;
|
|
- rtol.y = tol.y;
|
|
-
|
|
return rocSPARSEStatusToHIPStatus(
|
|
rocsparse_zcsr2csr_compress((rocsparse_handle)handle,
|
|
m,
|
|
@@ -6335,7 +6327,7 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
|
|
(rocsparse_double_complex*)csrValC,
|
|
csrRowPtrC,
|
|
csrColIndC,
|
|
- rtol));
|
|
+ {hipCreal(tol), hipCimag(tol)}));
|
|
}
|
|
|
|
hipsparseStatus_t hipsparseShyb2csr(hipsparseHandle_t handle,
|
|
@@ -7006,10 +6998,6 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
|
int* nnzC,
|
|
hipComplex tol)
|
|
{
|
|
- rocsparse_float_complex rtol;
|
|
- rtol.x = tol.x;
|
|
- rtol.y = tol.y;
|
|
-
|
|
RETURN_IF_ROCSPARSE_ERROR(rocsparse_cnnz_compress((rocsparse_handle)handle,
|
|
m,
|
|
(const rocsparse_mat_descr)descrA,
|
|
@@ -7017,7 +7005,7 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
|
|
csrRowPtrA,
|
|
nnzPerRow,
|
|
nnzC,
|
|
- rtol));
|
|
+ {hipCrealf(tol), hipCimagf(tol)}));
|
|
return HIPSPARSE_STATUS_SUCCESS;
|
|
}
|
|
|
|
@@ -7030,10 +7018,6 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
|
int* nnzC,
|
|
hipDoubleComplex tol)
|
|
{
|
|
- rocsparse_double_complex rtol;
|
|
- rtol.x = tol.x;
|
|
- rtol.y = tol.y;
|
|
-
|
|
RETURN_IF_ROCSPARSE_ERROR(rocsparse_znnz_compress((rocsparse_handle)handle,
|
|
m,
|
|
(const rocsparse_mat_descr)descrA,
|
|
@@ -7041,7 +7025,7 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
|
|
csrRowPtrA,
|
|
nnzPerRow,
|
|
nnzC,
|
|
- rtol));
|
|
+ {hipCreal(tol), hipCimag(tol)}));
|
|
return HIPSPARSE_STATUS_SUCCESS;
|
|
}
|
|
|