Forces any values recently added to the matrix to be put into the internal sparse storage format.


func sparse_commit(_ A: UnsafeMutableRawPointer!) -> sparse_status



The sparse matrix, which has had values recently inserted into the object.

Return Value

On success, SPARSE_SUCCESS, and A has all values inserted into the internal sparse representation.


Values inserted into a matrix object may not go directly into the sparse representation until needed, for example when a computation occurs. In some cases is may be beneficial to the caller to know when the cost of the update will occur. This routine allows the caller to trigger adding values to the internal sparse format.

Adding values to the sparse format can be costly, and batch updates to the matrices are recommended. Similarly, use of this routine may be expensive, so it is best to insert all values of a batch and call this routine once.

See Also

General Sparse Matrix Management Operations