Performs a matrix multiplication.
+-------------------------------IBM Extension--------------------------------+
The significance of the value of MINDIM is:
By default, MATMUL employs the conventional O(N**3) method of matrix multiplication.
If you link the libxlf90_r.a library, a parallel implementation of matrix multiplication is employed, which improves performance on SMP machines.
If you link the libxlf90.a or libxlf90_t.a library, the Winograd variation of the O(N**2.81) Strassen method is employed under these conditions:
+----------------------------End of IBM Extension----------------------------+
At least one of the arguments must be of rank two. The size of the first or only dimension of MATRIX_B must be equal to the last or only dimension of MATRIX_A.
Class
Transformational function
Result Value
The result is an array. If one of the arguments is of rank one, the result has a rank of one. If both arguments are of rank two, the result has a rank of two.
The data type of the result depends on the data type of the arguments, according to the rules in Table 3 and Table 4.
If MATRIX_A and MATRIX_B have a numeric data type, the array elements of the result are:
If MATRIX_A and MATRIX_B are of type logical, the array elements of the result are:
Examples
! A is the array | 1 2 3 |, B is the array | 7 10 |
! | 4 5 6 | | 8 11 |
! | 9 12 |
RES = MATMUL(A, B)
! The result is | 50 68 |
! | 122 167 |
+-------------------------------IBM Extension--------------------------------+
! HUGE_ARRAY and GIGANTIC_ARRAY in this example are
! large arrays of real or complex type, so the operation
! might be faster with the Strassen algorithm.
RES = MATMUL(HUGE_ARRAY, GIGANTIC_ARRAY, MINDIM=196)
+----------------------------End of IBM Extension----------------------------+
+-------------------------------IBM Extension--------------------------------+
Related Information
The compiler will try to use the ESSL library instead of the Fortran run-time library if the -qessl compiler option is used. See User's Guide for more information.
The numerical stability of Strassen's method for matrix multiplication is discussed in:
+----------------------------End of IBM Extension----------------------------+