Computes a multiplicative inverse of a matrix in place and in parallel.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in,out] | column_matrix | A column-major two-dimensional array which represents the matrix, of n by n elements, to invert. On output the array receives the calculated reciprocal. |
| n | A 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_alloc | The 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.