Performs a parallel evaluation of a multiplicative inverse of a matrix and assigns the result to a different matrix.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in] | column_matrix | A column-major two-dimensional array which represents the input matrix, of n by n elements, to invert. |
| n | A number of columns and a number of rows in column_matrix . |
[in,out] | inverse | Points 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_alloc | The 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.