The routine may be called by the names f01crf or nagf_matop_real_gen_trans_inplace.
f01crf requires that the elements of an matrix are stored consecutively by columns in a one-dimensional array. It reorders the elements so that on exit the array holds the transpose of stored in the same way. For example, if and , on entry the array must hold:
and on exit it holds
Cate E G and Twigg D W (1977) Algorithm 513: Analysis of in-situ transposition ACM Trans. Math. Software3 104–110
1: – Real (Kind=nag_wp) arrayInput/Output
On entry: the elements of the matrix , stored by columns.
On exit: the elements of the transpose matrix, also stored by columns.
2: – IntegerInput
On entry: , the number of rows of the matrix .
3: – IntegerInput
On entry: , the number of columns of the matrix .
4: – IntegerInput
On entry: , the value .
5: – Integer arrayWorkspace
6: – IntegerInput
On entry: the dimension of the array move as declared in the (sub)program from which f01crf is called.
7: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, , and .
On entry, .
A serious internal error has occurred in f01crf.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
Exact results are produced.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f01crf is not threaded in any implementation.
The time taken by f01crf is approximately proportional to .
This example transposes a matrix and prints out, for convenience, its transpose.