<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/general-sparse-matrix-management-operations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "General Sparse Matrix Management Operations"
}
-->

# General Sparse Matrix Management Operations

Manage and work with the properties of a sparse matrix.

## Topics

### General Sparse Matrix Management Operations

[`func sparse_commit(UnsafeMutableRawPointer!) -> sparse_status`](/documentation/Accelerate/sparse_commit(_:))

Puts values that you recently added to the matrix into the internal sparse storage format.

[`func sparse_matrix_destroy(UnsafeMutableRawPointer!) -> sparse_status`](/documentation/Accelerate/sparse_matrix_destroy(_:))

Releases any memory associated with the matrix object.

[`func sparse_set_matrix_property(UnsafeMutableRawPointer!, sparse_matrix_property) -> sparse_status`](/documentation/Accelerate/sparse_set_matrix_property(_:_:))

Sets the given property for a matrix object.

[`func sparse_get_matrix_property(UnsafeMutableRawPointer!, sparse_matrix_property) -> Int`](/documentation/Accelerate/sparse_get_matrix_property(_:_:))

Returns the value of the given property name.

[`func sparse_get_matrix_number_of_rows(UnsafeMutableRawPointer!) -> sparse_dimension`](/documentation/Accelerate/sparse_get_matrix_number_of_rows(_:))

Returns the number of rows of a matrix.

[`func sparse_get_matrix_number_of_columns(UnsafeMutableRawPointer!) -> sparse_dimension`](/documentation/Accelerate/sparse_get_matrix_number_of_columns(_:))

Returns the number of columns of a matrix.

[`func sparse_get_matrix_nonzero_count(UnsafeMutableRawPointer!) -> Int`](/documentation/Accelerate/sparse_get_matrix_nonzero_count(_:))

Returns the number of nonzero values of a matrix.

[`func sparse_get_matrix_nonzero_count_for_row(UnsafeMutableRawPointer!, sparse_index) -> Int`](/documentation/Accelerate/sparse_get_matrix_nonzero_count_for_row(_:_:))

Returns the number of nonzero values in a row of a matrix.

[`func sparse_get_matrix_nonzero_count_for_column(UnsafeMutableRawPointer!, sparse_index) -> Int`](/documentation/Accelerate/sparse_get_matrix_nonzero_count_for_column(_:_:))

Returns the number of nonzero values in a column of a matrix.

### Supporting Types

[`typealias sparse_dimension`](/documentation/Accelerate/sparse_dimension)

The dimension type.

[`typealias sparse_index`](/documentation/Accelerate/sparse_index)

The index type.

[`struct sparse_matrix_property`](/documentation/Accelerate/sparse_matrix_property)

The matrix property type.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)