bool Chusov::Math::matrix_inverse_construct_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 constructs the reciprocal matrix in an uninitialized memory buffer.
ValueType | A type of a matrix element. |
[in] | column_matrix | A column-major two-dimensional array which represents the input matrix, of b by b elements, to invert. |
n | A number of columns and a number of rows on column_matrix . | |
[out] | inverse | Points to a buffer capable of holding n2 elements of the type ValueType . On successful invocation the buffer receives the reciprocal of column_matrix . |
true
, if the reciprocal of the matrix is successfully obtained, and false
, if the input matrix is singular and thus does not have a reciprocal. std::bad_alloc | The function failed to allocate memory necessary to complete the operation. |
If the function returns false
or throws an exception, the content of inverse
is left uninitialized.
The output buffer addressed by inverse
is assumed uninitialized on input. No destruction of anything that was in inverse
prior to the invocation of the function takes place.
To replace an array of existing n2
elements in a buffer different from the input one, use matrix_inverse_copy_parallel.
To compute the inverse in place of the input matrix, use matrix_inverse_inplace_parallel.