Contents

la_matrix_to_double_buffer(_:_:_:)

Declaration

func la_matrix_to_double_buffer(_ buffer: UnsafeMutablePointer<Double>, _ 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 doubles) between the destinations of corresponding elements of consecutive rows of the matrix. Must be positive.

  • matrix:

    The matrix to store.

Discussion

Stores the elements of a matrix to a buffer.

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)

double 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.

See Also

Functions