Skip to content

Commit bb1b73e

Browse files
committed
Sparse API: getNumNonZero() -> getNNZ()
1 parent 709c829 commit bb1b73e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

include/af/sparse.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace af
3737

3838
AFAPI array sparseGetColIdx(const array in);
3939

40-
AFAPI dim_t sparseGetNumNonZero(const array in);
40+
AFAPI dim_t sparseGetNNZ(const array in);
4141

4242
AFAPI af::storage sparseGetStorage(const array in);
4343
}
@@ -76,7 +76,7 @@ extern "C" {
7676

7777
AFAPI af_err af_sparse_get_col_idx(af_array *out, const af_array in);
7878

79-
AFAPI af_err af_sparse_get_num_nonzero(dim_t *out, const af_array in);
79+
AFAPI af_err af_sparse_get_nnz(dim_t *out, const af_array in);
8080

8181
AFAPI af_err af_sparse_get_storage(af_storage *out, const af_array in);
8282

src/api/c/sparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ af_err af_sparse_get_col_idx(af_array *out, const af_array in)
388388
return AF_SUCCESS;
389389
}
390390

391-
af_err af_sparse_get_num_nonzero(dim_t *out, const af_array in)
391+
af_err af_sparse_get_nnz(dim_t *out, const af_array in)
392392
{
393393
try {
394394
const SparseArrayBase base = getSparseArrayBase(in);

src/api/cpp/sparse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ namespace af
8282
return array(out);
8383
}
8484

85-
dim_t sparseGetNumNonZero(const array in)
85+
dim_t sparseGetNNZ(const array in)
8686
{
8787
dim_t out = 0;
88-
AF_THROW(af_sparse_get_num_nonzero(&out, in.get()));
88+
AF_THROW(af_sparse_get_nnz(&out, in.get()));
8989
return out;
9090
}
9191

src/api/unified/sparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ af_err af_sparse_get_col_idx(af_array *out, const af_array in)
7070
return CALL(out, in);
7171
}
7272

73-
af_err af_sparse_get_num_nonzero(dim_t *out, const af_array in)
73+
af_err af_sparse_get_nnz(dim_t *out, const af_array in)
7474
{
7575
CHECK_ARRAYS(in);
7676
return CALL(out, in);

0 commit comments

Comments
 (0)