Requires ArrayFire Pro.
More...
|
- Parameters
-
| [in] | row_idx | Row indices in CSR format |
| [in] | col_idx | Column indices in CSR format |
| [in] | values | Array containing nonzero values |
| [in] | nrows | Number of rows in the matrix |
| [in] | ncols | Number of columns in the Matrix |
| [in] | nonzero | Number of non zero elements |
| [in] | src | Specify if pointers are from Host (default) or device |
| [in] | ngfor | The gfor tile size (default 0) |
- Returns
- sparse
nrows-by-ncols array in af_csr format
|
| AFAPI array | sparse (const int *row_idx, const int *col_idx, const float *values, int nrows, int ncols, int nonzero, af_source_t src=afHost, unsigned ngfor=0) |
| |
| AFAPI array | sparse (const int *row_idx, const int *col_idx, const double *values, int nrows, int ncols, int nonzero, af_source_t src=afHost, unsigned ngfor=0) |
| |
| AFAPI array | sparse (const int *row_idx, const int *col_idx, const cfloat *values, int nrows, int ncols, int nonzero, af_source_t src=afHost, unsigned ngfor=0) |
| |
| AFAPI array | sparse (const int *row_idx, const int *col_idx, const cdouble *values, int nrows, int ncols, int nonzero, af_source_t src=afHost, unsigned ngfor=0) |
| |
|
- Parameters
-
| [in] | dense | Matrix stored as dense |
- Returns
- out A sparse matrix stored in CSR format
|
| AFAPI array | sparse (array dense) |
| |
|
- Parameters
-
| [in] | row_idx | row indices |
| [in] | col_idx | column indices |
| [in] | values | nonzero values |
| [in] | nrows | Number of rows (default -1 uses max(row_idx) for COO, row_idx.elements()-1 for CSR) |
| [in] | ncols | Number of columns (default -1 uses max(J)) |
| [in] | format | sparse format (default: af_coo) |
- Returns
- sparse
nrows-by-ncols array
|
| AFAPI array | sparse (array &row_idx, array &col_idx, array &values, int nrows=-1, int ncols=-1, af_sparse_t format=af_coo) |
| |
Requires ArrayFire Pro.
| AFAPI array af::sparse |
( |
const int * |
row_idx, |
|
|
const int * |
col_idx, |
|
|
const float * |
values, |
|
|
int |
nrows, |
|
|
int |
ncols, |
|
|
int |
nonzero, |
|
|
af_source_t |
src = afHost, |
|
|
unsigned |
ngfor = 0 |
|
) |
| |
| AFAPI array af::sparse |
( |
const int * |
row_idx, |
|
|
const int * |
col_idx, |
|
|
const double * |
values, |
|
|
int |
nrows, |
|
|
int |
ncols, |
|
|
int |
nonzero, |
|
|
af_source_t |
src = afHost, |
|
|
unsigned |
ngfor = 0 |
|
) |
| |
| AFAPI array af::sparse |
( |
const int * |
row_idx, |
|
|
const int * |
col_idx, |
|
|
const cfloat * |
values, |
|
|
int |
nrows, |
|
|
int |
ncols, |
|
|
int |
nonzero, |
|
|
af_source_t |
src = afHost, |
|
|
unsigned |
ngfor = 0 |
|
) |
| |
| AFAPI array af::sparse |
( |
const int * |
row_idx, |
|
|
const int * |
col_idx, |
|
|
const cdouble * |
values, |
|
|
int |
nrows, |
|
|
int |
ncols, |
|
|
int |
nonzero, |
|
|
af_source_t |
src = afHost, |
|
|
unsigned |
ngfor = 0 |
|
) |
| |
| AFAPI array af::sparse |
( |
array |
dense | ) |
|
| AFAPI array af::sparse |
( |
array & |
row_idx, |
|
|
array & |
col_idx, |
|
|
array & |
values, |
|
|
int |
nrows = -1, |
|
|
int |
ncols = -1, |
|
|
af_sparse_t |
format = af_coo |
|
) |
| |