chsvlib
chsv helper source code

◆ matrix_inverse_inplace_parallel()

bool Chusov::Math::matrix_inverse_inplace_parallel ( ValueType *  column_matrix,
std::size_t  n 
)

Computes a multiplicative inverse of a matrix in place and in parallel.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in,out]column_matrixA column-major two-dimensional array which represents the matrix, of n by n elements, to invert. On output the array receives the calculated reciprocal.
nA number of columns and a number of rows in column_matrix.
Returns
true, if the reciprocal of the matrix is successfully calculated, and false, if 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.

If the function returns false or throws an exception, the content of column_matrix, although unspecified, remains valid.

To write the reciprocal to a different non-overlapping buffer, use either matrix_inverse_copy_parallel, if the destination buffer already is an array of valid ValueType elements, or matrix_inverse_construct_parallel, if the destination buffer only provides uninitialized memory space.

See also
matrix_inverse_inplace The sequential version of the operation.