chsvlib
chsv helper source code

◆ matrix_inverse_copy_parallel()

bool Chusov::Math::matrix_inverse_copy_parallel ( const ValueType *restrict  column_matrix,
std::size_t  n,
ValueType *restrict  inverse 
)

Performs a parallel evaluation of a multiplicative inverse of a matrix and assigns the result to a different matrix.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]column_matrixA column-major two-dimensional array which represents the input matrix, of n by n elements, to invert.
nA number of columns and a number of rows in column_matrix.
[in,out]inversePoints to a two-dimensional array of n2 elements which accepts the reciprocal of column_matrix. The buffer must not overlap one addressed by column_matrix.
Returns
true, if the reciprocal of the matrix is successfully obtained, and false, it the input matrix is singular and thus does not have a reciprocal.
Exceptions
std::bad_allocThe function failed to allocate memory necessary to complete the operation.

The function performs assignment of the result of computation to the buffer pointed to by inverse which implies that on input inverse must address an array in which all n2 elements are valid prior to the call. To write the reciprocal into an uninitialized buffer, use matrix_inverse_construct_parallel.

To compute the inverse in place of the original matrix, use matrix_inverse_inplace_parallel.

See also
matrix_inverse_copy The sequential version of the operation.