pub fn sparse_from_host<T>(
rows: u64,
cols: u64,
nzz: u64,
values: &[T],
row_indices: &[i32],
col_indices: &[i32],
format: SparseFormat
) -> Array<T> where
T: HasAfEnum + FloatingPoint,
Create sprase matrix from data on host memory
This function converts host array values
into sparse array of format
sparse format using host arrays row_indices
and col_indices
.
rows
is the number of rows in the dense matrixcols
is the number of columns in the dense matrixnzz
is the number of non zero elements in the dense matrixvalues
is the \ref af::array containing the non-zero elements `of the matrixrow_indices
is the row indices for the sparse arraycol_indices
is the column indices for the sparse arrayformat
is the storage format of the sparse arrayArray with data in given sparse format
The rules for deep copy/shallow copy/reference are the same as for creating a regular Array.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4