Skip to content

Commit fad8d38

Browse files
author
pradeep
committed
Remove MKL usage from sparse to sparse/dense conversions
Latest MKL API, doesn't handle the dense data to sparse storage conversion. It expects pointers to rows, cols and values arrays. It also returns sparse_matrix_t opaque handles that we don't use inside ArrayFire. Hence, deprecated MKL API has been removed in favor of our in-house kernels for conversions.
1 parent 8542abf commit fad8d38

5 files changed

Lines changed: 161 additions & 425 deletions

File tree

src/backend/cpu/kernel/sparse.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void coo2dense(Param<T> output,
4545
}
4646

4747
template<typename T>
48-
void dense_csr(Param<T> values, Param<int> rowIdx, Param<int> colIdx,
48+
void dense2csr(Param<T> values, Param<int> rowIdx, Param<int> colIdx,
4949
CParam<T> in)
5050
{
5151
const T * iPtr = in.get();
@@ -70,8 +70,8 @@ void dense_csr(Param<T> values, Param<int> rowIdx, Param<int> colIdx,
7070
}
7171

7272
template<typename T>
73-
void csr_dense(Param<T> out,
74-
CParam<T> values, CParam<int> rowIdx, CParam<int> colIdx)
73+
void csr2dense(Param<T> out,
74+
CParam<T> values, CParam<int> rowIdx, CParam<int> colIdx)
7575
{
7676
T *oPtr = out.get();
7777
const T *vPtr = values.get();
@@ -107,7 +107,7 @@ struct SpKIPCompareK
107107
};
108108

109109
template<typename T>
110-
void csr_coo(Param<T> ovalues, Param<int> orowIdx, Param<int> ocolIdx,
110+
void csr2coo(Param<T> ovalues, Param<int> orowIdx, Param<int> ocolIdx,
111111
CParam<T> ivalues, CParam<int> irowIdx, CParam<int> icolIdx)
112112
{
113113
// First calculate the linear index
@@ -143,7 +143,7 @@ void csr_coo(Param<T> ovalues, Param<int> orowIdx, Param<int> ocolIdx,
143143
}
144144

145145
template<typename T>
146-
void coo_csr(Param<T> ovalues, Param<int> orowIdx, Param<int> ocolIdx,
146+
void coo2csr(Param<T> ovalues, Param<int> orowIdx, Param<int> ocolIdx,
147147
CParam<T> ivalues, CParam<int> irowIdx, CParam<int> icolIdx)
148148
{
149149
T * ovPtr = ovalues.get();

0 commit comments

Comments
 (0)