Skip to main content

spgemm_work_estimation

Function spgemm_work_estimation 

Source
pub unsafe fn spgemm_work_estimation<T: SparseScalar>(
    handle: &Handle,
    op_a: Op,
    op_b: Op,
    alpha: &T,
    a: &SpMat<'_, T>,
    b: &SpMat<'_, T>,
    beta: &T,
    c: &mut SpMat<'_, T>,
    alg: SpGEMMAlg,
    plan: &SpGEMMPlan,
    size1: &mut usize,
    buffer1: *mut c_void,
) -> Result<()>
Expand description

Phase 1: work-estimation. The caller provides buffer1 whose size is returned in size1; pass null the first time, then allocate & re-call.

ยงSafety

buffer1 must be either null (size-query mode) or a valid device pointer to at least *size1 bytes of writable scratch memory that remains live for the duration of the underlying cuSPARSE call.