<!--
{
  "availability" : [
    "iOS: 8.0.0 - 14.0.0",
    "iPadOS: 8.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "macOS: 10.10.0 - 11.0.0",
    "tvOS: 8.0.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 1.0.0 - 7.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/la_matrix_to_float_buffer(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@la_matrix_to_float_buffer"
  },
  "title" : "la_matrix_to_float_buffer(_:_:_:)"
}
-->

# la_matrix_to_float_buffer(_:_:_:)

```
func la_matrix_to_float_buffer(_ buffer: UnsafeMutablePointer<Float>, _ buffer_row_stride: la_count_t, _ matrix: la_object_t) -> la_status_t
```

## Parameters

`buffer`

Pointer to the destination buffer.

`buffer_row_stride`

Offset (measured in floats) between the destinations of corresponding elements
of consecutive rows of the matrix.  Must be positive.

`matrix`

The matrix to store.

## Discussion\abstract Stores the elements of a matrix to a buffer.
\discussion The buffer must be large enough to accomodate the matrix being stored.
Specifically, it must have sufficient space to hold

buffer_row_stride*(la_matrix_rows(matrix)-1) + la_matrix_cols(matrix)

float elements.

This function supports storing the contents of a vector as well as a matrix.
A vector of length n will be interpreted as a rows(matrix) x cols(matrix) by
this function.  If the object is a vector or matrix and does not have an error
status, its contents are stored to the buffer.  If it has an error status, NaNs
are stored to the buffer.

If the object is not a matrix or vector, nothing is written to the buffer and
LA_INVALID_PARAMETER_ERROR is returned.

---

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)