[][src]Function arrayfire::sparse_from_host

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.

Parameters

Return Values

Array with data in given sparse format

Note

The rules for deep copy/shallow copy/reference are the same as for creating a regular Array.