ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_matrixMulTri::setMatMulTri Interface Reference

Return the matrix solution to the system of linear equations with a triangular coefficient matrix \(\ms{C}\). More...

Detailed Description

Return the matrix solution to the system of linear equations with a triangular coefficient matrix \(\ms{C}\).

The procedures under the generic interface setMatMulTri return the solution of the following corresponding linear triangular system of equations,

System of Equations Solution (corresponding matrix multiplication) BLAS routines
\(\ms{C}^{-1} \ms{X}^{\hphantom{-T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{C}^\hphantom{T} \ms{I} \) \(\ms{?trmv}~/~\ms{?trmm}\)
\(\ms{C}^{-T} \ms{X}^{\hphantom{-T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{C}^{T} \ms{I} \) \(\ms{?trmv}~/~\ms{?trmm}\)
\(\ms{C}^{-H} \ms{X}^{\hphantom{-T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{C}^{H} \ms{I} \) \(\ms{?trmv}~/~\ms{?trmm}\)
\(\ms{X}^{\hphantom{-T}} \ms{C}^{-1} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{I}^{\hphantom{T}} \ms{C} \) \(\ms{?trmv}~/~\ms{?trmm}\)
\(\ms{X}^{\hphantom{-T}} \ms{C}^{-T} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{I}^{\hphantom{T}} \ms{C}^{T} \) \(\ms{?trmv}~/~\ms{?trmm}\)
\(\ms{X}^{\hphantom{-T}} \ms{C}^{-H} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{I}^{\hphantom{T}} \ms{C}^{H} \) \(\ms{?trmv}~/~\ms{?trmm}\)
System of Equations Solution (corresponding matrix multiplication) BLAS routines
\(\ms{C}^{\hphantom{T}} \ms{X}^{\hphantom{T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{C}^{-1} \ms{I} \) \(\ms{?trsv}~/~\ms{?trsm}\)
\(\ms{C}^T \ms{X}^{\hphantom{T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{C}^{-T} \ms{I} \) \(\ms{?trsv}~/~\ms{?trsm}\)
\(\ms{C}^H \ms{X}^{\hphantom{T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{C}^{-H} \ms{I} \) \(\ms{?trsv}~/~\ms{?trsm}\)
\(\ms{X}^{\hphantom{T}} \ms{C}^{\hphantom{T}} = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{I}^{\hphantom{-T}} \ms{C}^{-1} \) \(\ms{?trsv}~/~\ms{?trsm}\)
\(\ms{X}^{\hphantom{T}} \ms{C}^T = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{I}^{\hphantom{-T}} \ms{C}^{-T} \) \(\ms{?trsv}~/~\ms{?trsm}\)
\(\ms{X}^{\hphantom{T}} \ms{C}^H = \alpha\ms{I}\) \( \ms{I} \leftarrow \alpha \ms{I}^{\hphantom{-T}} \ms{C}^{-H} \) \(\ms{?trsv}~/~\ms{?trsm}\)

where

  1. \(\cdot^-\) represents a matrix inversion.
  2. \(\cdot^T\) represents a Symmetric transpose.
  3. \(\cdot^H\) represents a Hermitian transpose.
  4. \(\ms{I}\) represents the Right-Hand-Side (RHS) (i.e., the intercept) of the system of linear equations.
  5. \(\ms{C}\) represents the triangular matrix of coefficients of the system of linear equations.
  6. \(\ms{X}\) represents the unknown matrix for which the system of linear equations must be solved (or equivalently, the result of the corresponding matrix multiplication).

Computational efficiency and practical considerations require the (matrix multiplication) solution to be written to \(\ms{I}\) instead of being returned explicitly to a separate argument as \(\ms{X}\).

Note
For general matrix-matrix or matrix-vector multiplications, see pm_matrixMulAdd.

Multiplication scheme of this generic interface

\(\ms{matA}\) shape and class \(\ms{matB}\) shape and class Solution (corresponding output matrix multiplication)
\(\ms{nrow} \times \ms{nrow}\) triangular \(\ms{nrow}\) column vector \(\ms{matB}(1:\ms{nrow}) \leftarrow \ms{operationA}\left(\ms{matA}(1:\ms{ncol}, 1:\ms{ncol})\right) \times \ms{matB}(1:\ms{nrow})\)
\(\ms{nrow} \times \ms{nrow}\) triangular \(\ms{nrow} \times \ms{ncol}\) general \(\ms{matB}(1:\ms{nrow}, 1:\ms{ncol}) \leftarrow \alpha \times \ms{operationA}\left(\ms{matA}(1:\ms{ncol}, 1:\ms{ncol})\right) \times \ms{matB}(1:\ms{nrow}, 1:\ms{ncol})\)
\(\ms{nrow} \times \ms{ncol}\) general \(\ms{ncol} \times \ms{ncol}\) triangular \(\ms{matA}(1:\ms{nrow}, 1:\ms{ncol}) \leftarrow \alpha \times \ms{matA}(1:\ms{nrow}, 1:\ms{ncol}) \times \ms{operationB}\left(\ms{matB}(1:\ms{ncol}, 1:\ms{ncol})\right)\)
Parameters
[in,out]matA: The input/output contiguous matrix of shape (:,:) of,
  1. type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128), or
  2. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
It can be,
  1. an upper/lower subset of a triangular square matrix \(\ms{C}\) (i.e., the coefficient matrix in the system of linear equations).
    In such a case, matA is read-only with intent(in).
  2. a general matrix in the multiplication (corresponding to the intercept matrix in the right-hand-side of the system of linear equations).
    In such a case, matA has intent(inout) and its contents will be overwritten by the solution on return.
[in]classA: The input scalar that can be either,
  1. the constant upperDiag for matA of any type of any kind, implying that matA is an upper-diagonal triangular matrix.
  2. the constant lowerDiag for matA of any type of any kind, implying that matA is an lower-diagonal triangular matrix.
  3. the constant upperUnit for matA of any type of any kind, implying that matA is an upper-unit triangular matrix.
  4. the constant lowerUnit for matA of any type of any kind, implying that matA is an lower-unit triangular matrix.
This argument is merely a convenience to resolve the different procedure functionalities within this generic interface.
(optional, default = general matrix. It must be present if and only if the input argument operationA is also present and classB is missing.)
[in]operationA: The input scalar that can be either,
  1. the constant nothing for matA of any type of any kind, implying that a Symmetric transpose of matA should be used in the matrix-matrix or matrix-vector multiplication.
  2. the constant transSymm for matA of any type of any kind, implying that a Symmetric transpose of matA should be used in the matrix-matrix or matrix-vector multiplication.
  3. the constant transHerm for matA of any type of any kind, implying that a Hermitian transpose of the specified subset of matA should be used in the matrix-matrix or matrix-vector multiplication.
  4. the constant inversion for matA of any type of any kind, implying that the inverse of matA should be used in the matrix-matrix or matrix-vector multiplication.
  5. the constant transOrth for matA of any type of any kind, implying that an Orthogonal transpose of matA should be used in the matrix-matrix or matrix-vector multiplication.
  6. the constant transUnit for matA of any type of any kind, implying that an Unitary transpose of matA should be used in the matrix-matrix or matrix-vector multiplication.
This argument is merely a convenience to resolve the different procedure functionalities within this generic interface.
(optional. It must be present if and only if classA is also present. If missing, the specified matA will be used as is, without any operations performed on it.)
[in,out]matB: The input/output contiguous matrix of shape (:,:) of the same type and kind as matA, containing the subset of the intercept matrix \(\ms{I}\) in the system of linear equations.
It can be,
  1. an upper/lower subset of a triangular square matrix \(\ms{C}\) (i.e., the coefficient matrix in the system of linear equations).
    In such a case, matB is read-only with intent(in).
  2. a general matrix in the multiplication (corresponding to the intercept matrix in the right-hand-side of the system of linear equations).
    In such a case, matB has intent(inout) and its contents will be overwritten by the solution on return.
[in]classB: The input scalar that can be either,
  1. the constant upperDiag for matB of any type of any kind, implying that matB is an upper-diagonal triangular matrix.
  2. the constant lowerDiag for matB of any type of any kind, implying that matB is an lower-diagonal triangular matrix.
  3. the constant upperUnit for matB of any type of any kind, implying that matB is an upper-unit triangular matrix.
  4. the constant lowerUnit for matB of any type of any kind, implying that matB is an lower-unit triangular matrix.
This argument is merely a convenience to resolve the different procedure functionalities within this generic interface.
(optional, default = general matrix. It must be present if and only if the input argument operationB is also present, matB is of rank 2, and classA is missing.)
[in]operationB: The input scalar that can be either,
  1. the constant transSymm for matB of any type of any kind, implying that a Symmetric transpose of matB should be used in the matrix-matrix or matrix-vector multiplication.
  2. the constant transHerm for matB of any type of any kind, implying that a Hermitian transpose of the specified subset of matB should be used in the matrix-matrix or matrix-vector multiplication.
  3. the constant inversion for matB of any type of any kind, implying that the inverse of matB should be used in the matrix-matrix or matrix-vector multiplication.
  4. the constant transOrth for matB of any type of any kind, implying that an Orthogonal transpose of matB should be used in the matrix-matrix or matrix-vector multiplication.
  5. the constant transUnit for matB of any type of any kind, implying that an Unitary transpose of matB should be used in the matrix-matrix or matrix-vector multiplication.
This argument is merely a convenience to resolve the different procedure functionalities within this generic interface.
(optional. It must be present if and only if classB is also present. If missing, the specified matB will be used as is, without any operations performed on it.)
[in]alpha: The input scalar of the same type and kind as matA, containing the coefficient \(\alpha\) with which the resulting matrix multiplication will be multiplied.
(optional, default = 1. It must be present if both nrow and ncol are also present.)
[in]nrow: The input non-negative scalar of type integer of default kind IK, containing the number of rows of the output general matrix (either matA or matB) in the multiplication.
(optional, default = size(matA, 1) or size(matB, 1), whichever is the general (non-triangular) matrix in the multiplication. It must be present if any of the following arguments are also present.)
[in]ncol: The input non-negative scalar of type integer of default kind IK, containing the number of columns of the general matrix (either matA or matB) in the multiplication:
  1. If matA is the general matrix then the subset matA(roffA + 1 : roffA + nrow, coffA + 1 : coffA + ncol) will be used in the multiplication.
  2. If matB is the general matrix then the subset matB(roffB + 1 : roffB + nrow, coffB + 1 : coffB + ncol) will be used in the multiplication.
(optional, default = size(matA, 2) or size(matB, 2), whichever is the general matrix in the multiplication. It must not be present if the general matrix is a column vector.)
[in]incB: The input non-zero scalar integer of default kind IK, containing the stride of the input argument matB(:).
  1. A positive value implies the multiplication to be performed on the subset matB(1 : 1 + (nrow - 1) * incB : incB).
  2. A negative value implies the multiplication to be performed on the subset matB(1 + (1 - nrow) * incB : 1 : incB).
(optional, default = 1. It can be present only if matB is a column vector of shape (:).)
[in]roffA: The input non-negative scalar of type integer of default kind IK containing the offset from the first row of the input matrix matA, such that matA(1 + roffA, 1 + coffA) marks the top-left corner of the block of matA used in the multiplication.
(optional, default = 0. It must be present if ncol is present.)
[in]coffA: The input non-negative scalar of type integer of default kind IK containing the offset from the first column of the input matrix matA, such that matA(1 + roffA, 1 + coffA) marks the top-left corner of the block of matA used in the multiplication.
(optional, default = 0. It must be present if ncol is present.)
[in]roffB: The input non-negative scalar of type integer of default kind IK containing the offset from the first row of the input matrix matB, such that matB(1 + roffB, 1 + coffB) marks the top-left corner of the block of matB used in the multiplication.
(optional, default = 0. It must be present if ncol is present.)
[in]coffB: The input non-negative scalar of type integer of default kind IK containing the offset from the first column of the input matrix matB, such that matB(1 + roffB, 1 + coffB) marks the top-left corner of the block of matB used in the multiplication.
(optional, default = 0. It must be present if ncol is present.)


Possible calling interfaces

use pm_matrixMulTri, only: inversion, nothing
use pm_matrixMulTri, only: upperDiag, lowerDiag
use pm_matrixMulTri, only: upperUnit, lowerUnit
use pm_matrixMulTri, only: transSymm, transHerm
use pm_matrixMulTri, only: transOrth, transUnit
! BLAS - LEVEL 2: ?TRMV / ?TRSV - SIMPLIFIED INTERFACE.
call setMatMulTri(matA(:,:), classA, operationA, matB(:))
! BLAS - LEVEL 2: ?TRMV / ?TRSV - contiguous interface.
call setMatMulTri(matA(:,:), classA, operationA, matB(:), nrow, roffA, coffA, incB)
! BLAS - LEVEL 3: ?TRMM / ?TRSM - SIMPLIFIED INTERFACE.
call setMatMulTri(matA(:,:), classA, operationA, matB(:,:), alpha = alpha)
call setMatMulTri(matA(:,:), matB(:,:), classB, operationB, alpha = alpha)
! BLAS - LEVEL 3: ?TRMM / ?TRSM - contiguous interface.
call setMatMulTri(matA(:,:), classA, operationA, matB(:,:), alpha, nrow, ncol, roffA, coffA, roffB, coffB)
call setMatMulTri(matA(:,:), matB(:,:), classB, operationB, alpha, nrow, ncol, roffA, coffA, roffB, coffB)
Return the matrix solution to the system of linear equations with a triangular coefficient matrix .
This module contains the procedures for multiplication of a square triangular matrix in various trans...
Warning
The input triangular matrix must be square.
The condition all(0 <= [nrow, ncol]) must hold for the corresponding input arguments.
The condition all(0 <= [roffA, coffA]) must hold for the corresponding input arguments.
The condition all(0 <= [roffB, coffB]) must hold for the corresponding input arguments.
The condition all(0 <= [roffB, coffB]) must hold for the corresponding input arguments.
The shapes of the input matrices must be consistent with each other for the target multiplication setup.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
BLAS/LAPACK equivalent:
The procedures under discussion combine, modernize, and extend the interface and functionalities of Version 3.11 of BLAS/LAPACK routine(s): STRMV, DTRMV, CTRMV, and ZTRMV, STRSV, DTRSV, CTRSV, and ZTRSV, STRMM, DTRMM, CTRMM, and ZTRMM, STRSM, DTRSM, CTRSM, and ZTRSM.
See also
nothing
inversion
lowerDiag
upperDiag
lowerUnit
upperUnit
transSymm
transHerm
transOrth
transUnit
setMatMulAdd


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_kind, only: CKG => CKS ! all processor types and kinds are supported.
5 use pm_kind, only: RKG => RKS ! all processor types and kinds are supported.
6 use pm_matrixMulTri, only: upperDiag, lowerDiag
7 use pm_matrixMulTri, only: upperUnit, lowerUnit
8 use pm_matrixMulTri, only: transSymm, transHerm
9 use pm_matrixMulTri, only: transOrth, transUnit
10 use pm_matrixMulTri, only: inversion, nothing
12 use pm_io, only: display_type
13 use pm_io, only: getFormat
14
15 implicit none
16
17 type(display_type) :: disp
18 character(:, SK), allocatable :: cform, gform
19 integer(IK) :: nrow, ncol, ndim, roffA, coffA, roffB, coffB, incB
20 cform = getFormat([cmplx(0., 0., CKG)], ed = SK_'f', signed = .true.)
21 gform = getFormat([real(0., RKG)], ed = SK_'f', signed = .true.)
22
23 disp = display_type(file = "main.out.F90")
24
25 call disp%skip()
26 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
27 call disp%show("! BLAS 3 TRSV / TRMV: triangular matrix-vector multiplication: complex.")
28 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
29 call disp%skip()
30
31 block
32
33 complex(CKG) :: alpha, beta
34 complex(CKG), parameter :: COMPLEXDUM = cmplx(huge(0._CKG), huge(0._CKG), CKG)
35 complex(CKG), allocatable :: triMat(:,:), genMat(:), genRef(:), solMat(:)
36
37 genRef = [complex(CKG) :: COMPLEXDUM, COMPLEXDUM, (5.0, 5.0), (24.0, 4.0), (49.0, 3.0), (80.0, 2.0), COMPLEXDUM]
38 triMat = reshape([complex(CKG) :: COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
39 , COMPLEXDUM, COMPLEXDUM, (2.0, 2.0), (3.0, 3.0), (2.0, 2.0), COMPLEXDUM, COMPLEXDUM &
40 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, (2.0, 2.0), (5.0, 5.0), COMPLEXDUM, COMPLEXDUM &
41 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, (3.0, 3.0), COMPLEXDUM, COMPLEXDUM &
42 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
43 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
44 ], shape = [6, 7], order = [2, 1])
45 solMat = [complex(CKG) :: COMPLEXDUM, COMPLEXDUM, (5.0, 5.0), (4.0, 4.0), (3.0, 3.0), (2.0, 2.0), COMPLEXDUM]
46 genMat = genRef
47 call disp%skip()
48 call disp%show("triMat")
49 call disp%show( triMat , format = cform )
50 call disp%show("genMat")
51 call disp%show( genMat , format = cform )
52 call disp%show("ndim = 4; roffA = 1; coffA = 1; incB = 1;")
53 ndim = 4; roffA = 1; coffA = 1; incB = 1;
54 call disp%show("call setMatMulTri(triMat, upperUnit, transUnit, genMat(3:6), ndim, roffA, coffA, incB) ! blas trsv contiguous interface.")
55 call setMatMulTri(triMat, upperUnit, transUnit, genMat(3:6), ndim, roffA, coffA, incB) ! blas trsv contiguous interface.
56 call disp%show("genMat")
57 call disp%show( genMat , format = cform )
58 call disp%show("genMat - solMat")
59 call disp%show( genMat - solMat , format = cform )
60 call disp%skip()
61 call disp%show("genMat = genRef")
62 genMat = genRef
63 call disp%show("genMat")
64 call disp%show( genMat , format = cform )
65 call disp%show("call setMatMulTri(triMat(2:5, 2:5), upperUnit, transUnit, genMat(3:6)) ! blas trsv simplified interface.")
66 call setMatMulTri(triMat(2:5, 2:5), upperUnit, transUnit, genMat(3:6)) ! blas trsv simplified interface.
67 call disp%show("genMat")
68 call disp%show( genMat , format = cform )
69 call disp%show("genMat - solMat")
70 call disp%show( genMat - solMat , format = cform )
71 call disp%skip()
72 call disp%show("call setMatMulTri(triMat, upperUnit, transHerm, genMat(3:6), ndim, roffA, coffA, incB) ! blas trmv contiguous interface.")
73 call setMatMulTri(triMat, upperUnit, transHerm, genMat(3:6), ndim, roffA, coffA, incB) ! blas trmv contiguous interface.
74 call disp%show("genMat")
75 call disp%show( genMat , format = cform )
76 call disp%show("genMat - genRef")
77 call disp%show( genMat - genRef , format = cform )
78 call disp%skip()
79 call disp%show("genMat = solMat")
80 genMat = solMat
81 call disp%show("genMat")
82 call disp%show( genMat , format = cform )
83 call disp%show("call setMatMulTri(triMat(2:5, 2:5), upperUnit, transHerm, genMat(3:6)) ! blas trmv simplified interface.")
84 call setMatMulTri(triMat(2:5, 2:5), upperUnit, transHerm, genMat(3:6)) ! blas trmv simplified interface.
85 call disp%show("genMat")
86 call disp%show( genMat , format = cform )
87 call disp%show("genMat - genRef")
88 call disp%show( genMat - genRef , format = cform )
89 call disp%skip()
90
91 end block
92
93 call disp%skip()
94 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
95 call disp%show("! BLAS 3 TRSV / TRMV: triangular matrix-vector multiplication: real.")
96 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
97 call disp%skip()
98
99 block
100
101 real(RKG), parameter :: DUM = huge(DUM)
102 real(RKG), allocatable :: triMat(:,:), genMat(:), genRef(:), solMat(:)
103
104 triMat = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
105 , DUM, DUM, DUM, DUM, DUM, DUM &
106 , DUM, DUM, DUM, DUM, DUM, DUM &
107 , DUM, 1.0, DUM, DUM, DUM, DUM &
108 , DUM, 2.0, 3.0, DUM, DUM, DUM &
109 , DUM, 3.0, 4.0, 3.0, DUM, DUM &
110 , DUM, DUM, DUM, DUM, DUM, DUM &
111 , DUM, DUM, DUM, DUM, DUM, DUM &
112 , DUM, DUM, DUM, DUM, DUM, DUM &
113 , DUM, DUM, DUM, DUM, DUM, DUM &
114 ], shape = [10, 6], order = [2, 1])
115 genRef = [real(RKG):: DUM, DUM, 1.0, DUM, DUM, 3.0, DUM, DUM, 11.0, DUM, DUM, 24.0, DUM]
116 solMat = [real(RKG):: DUM, DUM, 1.0, DUM, DUM, 2.0, DUM, DUM, 3.0, DUM, DUM, 4.0, DUM]
117 genMat = genRef
118 call disp%skip()
119 call disp%show("triMat")
120 call disp%show( triMat , format = gform )
121 call disp%show("genMat")
122 call disp%show( genMat , format = gform )
123 call disp%show("ndim = 4; roffA = 2; coffA = 1; incB = 3;")
124 ndim = 4; roffA = 2; coffA = 1; incB = 3;
125 call disp%show("call setMatMulTri(triMat, lowerUnit, inversion, genMat(3:), ndim, roffA, coffA, incB) ! blas trsv contiguous interface.")
126 call setMatMulTri(triMat, lowerUnit, inversion, genMat(3:), ndim, roffA, coffA, incB) ! blas trsv contiguous interface.
127 call disp%show("genMat")
128 call disp%show( genMat , format = gform )
129 call disp%show("genMat - solMat")
130 call disp%show( genMat - solMat , format = gform )
131 call disp%skip()
132 call disp%show("genMat = genRef")
133 genMat = genRef
134 call disp%show("call setMatMulTri(triMat(3:6, 2:5), lowerUnit, inversion, genMat(3:size(genMat)-1:3)) ! blas trsv simplified interface.")
135 call setMatMulTri(triMat(3:6, 2:5), lowerUnit, inversion, genMat(3:size(genMat)-1:3)) ! blas trsv simplified interface.
136 call disp%show("genMat")
137 call disp%show( genMat , format = gform )
138 call disp%show("genMat - solMat")
139 call disp%show( genMat - solMat , format = gform )
140 call disp%skip()
141 call disp%show("call setMatMulTri(triMat, lowerUnit, nothing, genMat(3:), ndim, roffA, coffA, incB) ! blas trmv contiguous interface.")
142 call setMatMulTri(triMat, lowerUnit, nothing, genMat(3:), ndim, roffA, coffA, incB) ! blas trmv contiguous interface.
143 call disp%show("genMat")
144 call disp%show( genMat , format = gform )
145 call disp%show("genMat - genRef")
146 call disp%show( genMat - genRef , format = gform )
147 call disp%skip()
148 call disp%show("genMat = solMat")
149 genMat = solMat
150 call disp%show("call setMatMulTri(triMat(3:6, 2:5), lowerUnit, nothing, genMat(3:size(genMat)-1:3)) ! blas trmv simplified interface.")
151 call setMatMulTri(triMat(3:6, 2:5), lowerUnit, nothing, genMat(3:size(genMat)-1:3)) ! blas trmv simplified interface.
152 call disp%show("genMat")
153 call disp%show( genMat , format = gform )
154 call disp%show("genMat - genRef")
155 call disp%show( genMat - genRef , format = gform )
156 call disp%skip()
157
158 triMat = reshape([real(RKG):: 1.0, 2.0, 3.0, 2.0, DUM &
159 , DUM, 2.0, 2.0, 5.0, DUM &
160 , DUM, DUM, 3.0, 3.0, DUM &
161 , DUM, DUM, DUM, 1.0, DUM &
162 , DUM, DUM, DUM, DUM, DUM &
163 , DUM, DUM, DUM, DUM, DUM &
164 , DUM, DUM, DUM, DUM, DUM &
165 ], shape = [7, 5], order = [2, 1])
166 genRef = [real(RKG) :: 5.0, 18.0, 32.0, 41.0]
167 solMat = [real(RKG) :: 5.0, 4.0, 3.0, 2.0]
168 genMat = genRef
169 call disp%skip()
170 call disp%show("triMat")
171 call disp%show( triMat , format = gform )
172 call disp%show("genMat")
173 call disp%show( genMat , format = gform )
174 call disp%show("ndim = 4; roffA = 0; coffA = 0; incB = 1;")
175 ndim = 4; roffA = 0; coffA = 0; incB = 1;
176 call disp%show("call setMatMulTri(triMat, upperDiag, transOrth, genMat, ndim, roffA, coffA, incB) ! blas trsm contiguous interface.")
177 call setMatMulTri(triMat, upperDiag, transOrth, genMat, ndim, roffA, coffA, incB) ! blas trsm contiguous interface.
178 call disp%show("genMat")
179 call disp%show( genMat , format = gform )
180 call disp%show("genMat - solMat")
181 call disp%show( genMat - solMat , format = gform )
182 call disp%skip()
183 call disp%show("genMat = genRef")
184 genMat = genRef
185 call disp%show("call setMatMulTri(triMat(1:4, 1:4), upperDiag, transOrth, genMat) ! blas trsv simplified interface.")
186 call setMatMulTri(triMat(1:4, 1:4), upperDiag, transOrth, genMat) ! blas trsv simplified interface.
187 call disp%show("genMat")
188 call disp%show( genMat , format = gform )
189 call disp%show("genMat - solMat")
190 call disp%show( genMat - solMat , format = gform )
191 call disp%skip()
192 call disp%show("call setMatMulTri(triMat, upperDiag, transSymm, genMat, ndim, roffA, coffA, incB) ! blas trmv contiguous interface.")
193 call setMatMulTri(triMat, upperDiag, transSymm, genMat, ndim, roffA, coffA, incB) ! blas trmv contiguous interface.
194 call disp%show("genMat")
195 call disp%show( genMat , format = gform )
196 call disp%show("genMat - genRef")
197 call disp%show( genMat - genRef , format = gform )
198 call disp%skip()
199 call disp%show("genMat = solMat")
200 genMat = solMat
201 call disp%show("call setMatMulTri(triMat(1:4, 1:4), upperDiag, transSymm, genMat) ! blas trmv simplified interface.")
202 call setMatMulTri(triMat(1:4, 1:4), upperDiag, transSymm, genMat) ! blas trmv simplified interface.
203 call disp%show("genMat")
204 call disp%show( genMat , format = gform )
205 call disp%show("genMat - genRef")
206 call disp%show( genMat - genRef , format = gform )
207 call disp%skip()
208
209 end block
210
211 call disp%skip()
212 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
213 call disp%show("! BLAS 3 TRSM / TRMM: triangular-general / general-triangular matrix multiplication: complex.")
214 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
215 call disp%skip()
216
217 block
218
219 complex(CKG) :: alpha, beta
220 complex(CKG), parameter :: COMPLEXDUM = cmplx(huge(0._CKG), huge(0._CKG), CKG)
221 complex(CKG), allocatable, dimension(:,:) :: triMat, genMat, genRef, solMat
222
223 genRef = reshape([complex(CKG) :: COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
224 , COMPLEXDUM, (22.0, -41.0), (7.0, -26.0), (9.0, 0.0), (-15.0, -3.0), (-15.0, 8.0) &
225 , COMPLEXDUM, (29.0, -18.0), (24.0, -10.0), (9.0, 6.0), (-12.0, -24.0), (-19.0, -8.0) &
226 , COMPLEXDUM, (-15.0, 2.0), (-3.0, -21.0), (-2.0, 4.0), (-4.0, -12.0), (-10.0, -6.0) &
227 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
228 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
229 ], shape = [6, 6], order = [2, 1])
230 triMat = reshape([complex(CKG) :: COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
231 , COMPLEXDUM, COMPLEXDUM, (2.0, -3.0), COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
232 , COMPLEXDUM, COMPLEXDUM, (2.0, -4.0), (3.0, -1.0), COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
233 , COMPLEXDUM, COMPLEXDUM, (2.0, 2.0), (1.0, 2.0), (1.0, 1.0), COMPLEXDUM, COMPLEXDUM &
234 , COMPLEXDUM, COMPLEXDUM, (0.0, 0.0), (3.0, -1.0), (0.0, -1.0), (-2.0, 1.0), COMPLEXDUM &
235 , COMPLEXDUM, COMPLEXDUM, (2.0, 2.0), (4.0, 0.0), (-1.0, 2.0), (2.0, -4.0), (-1.0, -4.0) &
236 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
237 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
238 ], shape = [8, 7], order = [2, 1])
239 solMat = reshape([complex(CKG) :: COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
240 , COMPLEXDUM, (3.0, 0.0), (4.0, 0.0), (-1.0, -2.0), (-1.0, -1.0), (-1.0, -4.0) &
241 , COMPLEXDUM, (2.0, -1.0), (1.0, 2.0), (-1.0, -3.0), (0.0, 2.0), (3.0, -4.0) &
242 , COMPLEXDUM, (-2.0, 1.0), (-1.0, -3.0), (-3.0, 1.0), (0.0, 0.0), (2.0, -2.0) &
243 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
244 , COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM, COMPLEXDUM &
245 ], shape = [6, 6], order = [2, 1])
246 genMat = genRef
247 call disp%skip()
248 call disp%show("triMat")
249 call disp%show( triMat , format = cform )
250 call disp%show("genMat")
251 call disp%show( genMat , format = cform )
252 call disp%show("alpha = (1._CKG, 0._CKG); nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 1; coffB = 2;")
253 alpha = (1._CKG, 0._CKG); nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 1; coffB = 2;
254 call disp%show("call setMatMulTri(genMat, triMat, lowerDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.")
255 call setMatMulTri(genMat, triMat, lowerDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
256 call disp%show("genMat")
257 call disp%show( genMat , format = cform )
258 call disp%show("genMat - solMat")
259 call disp%show( genMat - solMat , format = cform )
260 call disp%skip()
261 call disp%show("genMat = genRef")
262 genMat = genRef
263 call disp%show("genMat")
264 call disp%show( genMat , format = cform )
265 call disp%show("call setMatMulTri(genMat(2:4, 2:), triMat(2:6, 3:), lowerDiag, inversion) ! blas trsm simplified interface.")
266 call setMatMulTri(genMat(2:4, 2:), triMat(2:6, 3:), lowerDiag, inversion) ! blas trsm simplified interface.
267 call disp%show("genMat")
268 call disp%show( genMat , format = cform )
269 call disp%show("genMat - solMat")
270 call disp%show( genMat - solMat , format = cform )
271 call disp%skip()
272 call disp%show("call setMatMulTri(genMat, triMat, lowerDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.")
273 call setMatMulTri(genMat, triMat, lowerDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
274 call disp%show("genMat")
275 call disp%show( genMat , format = cform )
276 call disp%show("genMat - genRef")
277 call disp%show( genMat - genRef , format = cform )
278 call disp%skip()
279 call disp%show("genMat = solMat")
280 genMat = solMat
281 call disp%show("genMat")
282 call disp%show( genMat , format = cform )
283 call disp%show("call setMatMulTri(genMat(2:4, 2:), triMat(2:6, 3:), lowerDiag, nothing) ! blas trmm simplified interface.")
284 call setMatMulTri(genMat(2:4, 2:), triMat(2:6, 3:), lowerDiag, nothing) ! blas trmm simplified interface.
285 call disp%show("genMat")
286 call disp%show( genMat , format = cform )
287 call disp%show("genMat - genRef")
288 call disp%show( genMat - genRef , format = cform )
289 call disp%skip()
290
291
292 genMat = genRef
293 call disp%skip()
294 call disp%show("triMat")
295 call disp%show( triMat , format = cform )
296 call disp%show("genMat")
297 call disp%show( genMat , format = cform )
298 call disp%show("alpha = (1._CKG, 0._CKG); nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 2; coffB = 1;")
299 alpha = (1._CKG, 0._CKG); nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 2; coffB = 1;
300 call disp%show("call setMatMulTri(genMat, transpose(triMat), upperDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.")
301 call setMatMulTri(genMat, transpose(triMat), upperDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
302 call disp%show("genMat")
303 call disp%show( genMat , format = cform )
304 call disp%show("genMat - solMat")
305 call disp%show( genMat - solMat , format = cform )
306 call disp%skip()
307 call disp%show("genMat = genRef")
308 genMat = genRef
309 call disp%show("genMat")
310 call disp%show( genMat , format = cform )
311 call disp%show("call setMatMulTri(genMat(2:4, 2:), transpose(triMat(2:6, 3:)), upperDiag, inversion) ! blas trsm simplified interface.")
312 call setMatMulTri(genMat(2:4, 2:), transpose(triMat(2:6, 3:)), upperDiag, inversion) ! blas trsm simplified interface.
313 call disp%show("genMat")
314 call disp%show( genMat , format = cform )
315 call disp%show("genMat - solMat")
316 call disp%show( genMat - solMat , format = cform )
317 call disp%skip()
318 call disp%show("call setMatMulTri(genMat, transpose(triMat), upperDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.")
319 call setMatMulTri(genMat, transpose(triMat), upperDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
320 call disp%show("genMat")
321 call disp%show( genMat , format = cform )
322 call disp%show("genMat - genRef")
323 call disp%show( genMat - genRef , format = cform )
324 call disp%skip()
325 call disp%show("genMat = solMat")
326 genMat = solMat
327 call disp%show("genMat")
328 call disp%show( genMat , format = cform )
329 call disp%show("call setMatMulTri(genMat(2:4, 2:), transpose(triMat(2:6, 3:)), upperDiag, nothing) ! blas trmm simplified interface.")
330 call setMatMulTri(genMat(2:4, 2:), transpose(triMat(2:6, 3:)), upperDiag, nothing) ! blas trmm simplified interface.
331 call disp%show("genMat")
332 call disp%show( genMat , format = cform )
333 call disp%show("genMat - genRef")
334 call disp%show( genMat - genRef , format = cform )
335 call disp%skip()
336
337 end block
338
339 call disp%skip()
340 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
341 call disp%show("! BLAS 3 TRSM / TRMM: triangular-general / general-triangular matrix multiplication: real.")
342 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
343 call disp%skip()
344
345 block
346
347 real(RKG):: alpha
348 real(RKG), parameter :: DUM = huge(DUM), ONE_THIRD = 1._RKG / 3._RKG
349 real(RKG), allocatable, dimension(:,:) :: triMat, genMat, genRef, solMat
350
351 triMat = reshape([real(RKG):: 3.0, -1.0, 2.0, 2.0, 1.0 &
352 , DUM, -2.0, 4.0, -1.0, 3.0 &
353 , DUM, DUM, -3.0, 0.0, 2.0 &
354 , DUM, DUM, DUM, 4.0, -2.0 &
355 , DUM, DUM, DUM, DUM, 1.0 &
356 , DUM, DUM, DUM, DUM, DUM &
357 , DUM, DUM, DUM, DUM, DUM &
358 ], shape = [7, 5], order = [2, 1])
359 genRef = reshape([real(RKG):: 6.0, 10.0, -2.0 &
360 , -16.0, -1.0, 6.0 &
361 , -2.0, 1.0, -4.0 &
362 , 14.0, 0.0, -14.0 &
363 , -1.0, 2.0, 1.0 &
364 , DUM, DUM, DUM &
365 ], shape = [6, 3], order = [2, 1])
366 solMat = reshape([real(RKG):: 2.0, 3.0, 1.0 &
367 , 5.0, 5.0, 4.0 &
368 , 0.0, 1.0, 2.0 &
369 , 3.0, 1.0, -3.0 &
370 , -1.0, 2.0, 1.0 &
371 , DUM, DUM, DUM &
372 ], shape = [6, 3], order = [2, 1])
373 genMat = genRef
374 call disp%skip()
375 call disp%show("triMat")
376 call disp%show( triMat , format = gform )
377 call disp%show("genMat")
378 call disp%show( genMat , format = gform )
379 call disp%show("alpha = 1._RKG; nrow = 5; ncol = 3; roffA = 0; coffA = 0; roffB = 0; coffB = 0;")
380 alpha = 1._RKG; nrow = 5; ncol = 3; roffA = 0; coffA = 0; roffB = 0; coffB = 0;
381 call disp%show("call setMatMulTri(triMat, upperDiag, inversion, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.")
382 call setMatMulTri(triMat, upperDiag, inversion, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
383 call disp%show("genMat")
384 call disp%show( genMat , format = gform )
385 call disp%show("genMat - solMat")
386 call disp%show( genMat - solMat , format = gform )
387 call disp%skip()
388 call disp%show("genMat = genRef")
389 genMat = genRef
390 call disp%show("call setMatMulTri(triMat(1:5, 1:5), upperDiag, inversion, genMat(1:5, 1:3), alpha) ! blas trsm simplified interface.")
391 call setMatMulTri(triMat(1:5, 1:5), upperDiag, inversion, genMat(1:5, 1:3), alpha) ! blas trsm simplified interface.
392 call disp%show("genMat")
393 call disp%show( genMat , format = gform )
394 call disp%show("genMat - solMat")
395 call disp%show( genMat - solMat , format = gform )
396 call disp%skip()
397 call disp%show("call setMatMulTri(triMat, upperDiag, nothing, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.")
398 call setMatMulTri(triMat, upperDiag, nothing, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
399 call disp%show("genMat")
400 call disp%show( genMat , format = gform )
401 call disp%show("genMat - genRef")
402 call disp%show( genMat - genRef , format = gform )
403 call disp%skip()
404 call disp%show("genMat = solMat")
405 genMat = solMat
406 call disp%show("call setMatMulTri(triMat(1:5, 1:5), upperDiag, nothing, genMat(1:5, 1:3), alpha) ! blas trmm simplified interface.")
407 call setMatMulTri(triMat(1:5, 1:5), upperDiag, nothing, genMat(1:5, 1:3), alpha) ! blas trmm simplified interface.
408 call disp%show("genMat")
409 call disp%show( genMat , format = gform )
410 call disp%show("genMat - genRef")
411 call disp%show( genMat - genRef , format = gform )
412 call disp%skip()
413
414 triMat = reshape([real(RKG):: -1.0, -4.0, -2.0, 2.0, 3.0 &
415 , DUM, -2.0, 2.0, 2.0, 2.0 &
416 , DUM, DUM, -3.0, -1.0, 4.0 &
417 , DUM, DUM, DUM, 1.0, 0.0 &
418 , DUM, DUM, DUM, DUM, -2.0 &
419 , DUM, DUM, DUM, DUM, DUM &
420 , DUM, DUM, DUM, DUM, DUM &
421 ], shape = [7, 5], order = [2, 1])
422 genRef = reshape([real(RKG):: -1.0, -2.0, -3.0, -4.0 &
423 , 2.0, -2.0, -14.0, -12.0 &
424 , 10.0, 5.0, -8.0, -7.0 &
425 , 14.0, 15.0, 1.0, 8.0 &
426 , -3.0, 4.0, 3.0, 16.0 &
427 , DUM, DUM, DUM, DUM &
428 ], shape = [6, 4], order = [2, 1])
429 solMat = reshape([real(RKG):: 1._RKG, 2._RKG, 3._RKG, 4._RKG &
430 , -3._RKG, -3._RKG, 1._RKG, -2._RKG &
431 , -6._RKG, -5._RKG, 1._RKG + ONE_THIRD, -2._RKG + ONE_THIRD &
432 , 12._RKG, 12._RKG, -6._RKG + ONE_THIRD, 2._RKG + ONE_THIRD &
433 ,-12._RKG, -12._RKG, +7._RKG - ONE_THIRD, -7._RKG - ONE_THIRD &
434 , DUM, DUM, DUM, DUM &
435 ], shape = [6, 4], order = [2, 1])
436 genMat = genRef
437 call disp%skip()
438 call disp%show("triMat")
439 call disp%show( triMat , format = gform )
440 call disp%show("genMat")
441 call disp%show( genMat , format = gform )
442 call disp%show("alpha = 1._RKG; nrow = 5; ncol = 4; roffA = 0; coffA = 0; roffB = 0; coffB = 0;")
443 alpha = 1._RKG; nrow = 5; ncol = 4; roffA = 0; coffA = 0; roffB = 0; coffB = 0;
444 call disp%show("call setMatMulTri(triMat, upperDiag, transOrth, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.")
445 call setMatMulTri(triMat, upperDiag, transOrth, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
446 call disp%show("genMat")
447 call disp%show( genMat , format = gform )
448 call disp%show("genMat - solMat")
449 call disp%show( genMat - solMat , format = gform )
450 call disp%skip()
451 call disp%show("genMat = genRef")
452 genMat = genRef
453 call disp%show("call setMatMulTri(triMat(1:5, 1:5), upperDiag, transOrth, genMat(1:5, 1:4)) ! trsm simplified interface.")
454 call setMatMulTri(triMat(1:5, 1:5), upperDiag, transOrth, genMat(1:5, 1:4)) ! trsm simplified interface.
455 call disp%show("genMat")
456 call disp%show( genMat , format = gform )
457 call disp%show("genMat - solMat")
458 call disp%show( genMat - solMat , format = gform )
459 call disp%skip()
460 call disp%show("call setMatMulTri(triMat, upperDiag, transSymm, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.")
461 call setMatMulTri(triMat, upperDiag, transSymm, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
462 call disp%show("genMat")
463 call disp%show( genMat , format = gform )
464 call disp%show("genMat - genRef")
465 call disp%show( genMat - genRef , format = gform )
466 call disp%skip()
467 call disp%show("genMat = solMat")
468 genMat = solMat
469 call disp%show("call setMatMulTri(triMat(1:5, 1:5), upperDiag, transSymm, genMat(1:5, 1:4)) ! trmm simplified interface.")
470 call setMatMulTri(triMat(1:5, 1:5), upperDiag, transSymm, genMat(1:5, 1:4)) ! trmm simplified interface.
471 call disp%show("genMat")
472 call disp%show( genMat , format = gform )
473 call disp%show("genMat - genRef")
474 call disp%show( genMat - genRef , format = gform )
475 call disp%skip()
476
477 genRef = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
478 , DUM, 10.0, 4.0, 0.0, 0.0, 1.0 &
479 , DUM, 10.0, 14.0, -4.0, 6.0, -3.0 &
480 , DUM, -8.0, 2.0, -5.0, 4.0, -2.0 &
481 , DUM, DUM, DUM, DUM, DUM, DUM &
482 ], shape = [5, 6], order = [2, 1])
483 triMat = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
484 , DUM, DUM, DUM, DUM, DUM, DUM &
485 , DUM, DUM, DUM, DUM, DUM, DUM &
486 , DUM, 2.0, DUM, DUM, DUM, DUM &
487 , DUM, 2.0, 3.0, DUM, DUM, DUM &
488 , DUM, 2.0, 1.0, 1.0, DUM, DUM &
489 , DUM, 0.0, 3.0, 0.0, -2.0, DUM &
490 , DUM, 2.0, 4.0, -1.0, 2.0, -1.0 &
491 , DUM, DUM, DUM, DUM, DUM, DUM &
492 , DUM, DUM, DUM, DUM, DUM, DUM &
493 ], shape = [10, 6], order = [2, 1])
494 solMat = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
495 , DUM, 3.0, 4.0, -1.0, -1.0, -1.0 &
496 , DUM, 2.0, 1.0, -1.0, 0.0, 3.0 &
497 , DUM, -2.0, -1.0, -3.0, 0.0, 2.0 &
498 , DUM, DUM, DUM, DUM, DUM, DUM &
499 ], shape = [5, 6], order = [2, 1])
500 genMat = genRef
501 call disp%skip()
502 call disp%show("triMat")
503 call disp%show( triMat , format = gform )
504 call disp%show("genMat")
505 call disp%show( genMat , format = gform )
506 call disp%show("alpha = 1._RKG; nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 3; coffB = 1;")
507 alpha = 1._RKG; nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 3; coffB = 1;
508 call disp%show("call setMatMulTri(genMat, triMat, lowerDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.")
509 call setMatMulTri(genMat, triMat, lowerDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
510 call disp%show("genMat")
511 call disp%show( genMat , format = gform )
512 call disp%show("genMat - solMat")
513 call disp%show( genMat - solMat , format = gform )
514 call disp%skip()
515 call disp%show("genMat = genRef")
516 genMat = genRef
517 call disp%show("call setMatMulTri(genMat(2:4, 2:6), triMat(4:8, 2:6), lowerDiag, inversion) ! trsm simplified interface.")
518 call setMatMulTri(genMat(2:4, 2:6), triMat(4:8, 2:6), lowerDiag, inversion) ! trsm simplified interface.
519 call disp%show("genMat")
520 call disp%show( genMat , format = gform )
521 call disp%show("genMat - solMat")
522 call disp%show( genMat - solMat , format = gform )
523 call disp%skip()
524 call disp%show("call setMatMulTri(genMat, triMat, lowerDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.")
525 call setMatMulTri(genMat, triMat, lowerDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
526 call disp%show("genMat")
527 call disp%show( genMat , format = gform )
528 call disp%show("genMat - genRef")
529 call disp%show( genMat - genRef , format = gform )
530 call disp%skip()
531 call disp%show("genMat = solMat")
532 genMat = solMat
533 call disp%show("call setMatMulTri(genMat(2:4, 2:6), triMat(4:8, 2:6), lowerDiag, nothing) ! trmm simplified interface.")
534 call setMatMulTri(genMat(2:4, 2:6), triMat(4:8, 2:6), lowerDiag, nothing) ! trmm simplified interface.
535 call disp%show("genMat")
536 call disp%show( genMat , format = gform )
537 call disp%show("genMat - genRef")
538 call disp%show( genMat - genRef , format = gform )
539 call disp%skip()
540
541 genRef = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
542 , DUM, DUM, DUM, DUM, DUM, DUM &
543 , 1.0, 4.0, -2.0, 10.0, 2.0, -6.0 &
544 , DUM, DUM, DUM, DUM, DUM, DUM &
545 ], shape = [4, 6], order = [2, 1])
546 triMat = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
547 , DUM, 2.0, -3.0, 1.0, 2.0, 4.0 &
548 , DUM, DUM, 0.0, 1.0, 1.0, -2.0 &
549 , DUM, DUM, DUM, 4.0, -1.0, 1.0 &
550 , DUM, DUM, DUM, DUM, 0.0, -1.0 &
551 , DUM, DUM, DUM, DUM, DUM, 2.0 &
552 , DUM, DUM, DUM, DUM, DUM, DUM &
553 , DUM, DUM, DUM, DUM, DUM, DUM &
554 ], shape = [8, 6], order = [2, 1])
555 solMat = reshape([real(RKG):: DUM, DUM, DUM, DUM, DUM, DUM &
556 , DUM, DUM, DUM, DUM, DUM, DUM &
557 , 1.0, 2.0, 1.0, 3.0, -1.0, -2.0 &
558 , DUM, DUM, DUM, DUM, DUM, DUM &
559 ], shape = [4, 6], order = [2, 1])
560 genMat = genRef
561 call disp%skip()
562 call disp%show("genMat")
563 call disp%show( genMat , format = gform )
564 call disp%show("triMat")
565 call disp%show( triMat , format = gform )
566 call disp%show("alpha = 1._RKG; nrow = 1; ncol = 6; roffA = 2; coffA = 0; roffB = 1; coffB = 0;")
567 alpha = 1._RKG; nrow = 1; ncol = 6; roffA = 2; coffA = 0; roffB = 1; coffB = 0;
568 call disp%show("call setMatMulTri(genMat, triMat, upperUnit, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.")
569 call setMatMulTri(genMat, triMat, upperUnit, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
570 call disp%show("genMat")
571 call disp%show( genMat , format = gform )
572 call disp%show("genMat - solMat")
573 call disp%show( genMat - solMat , format = gform )
574 call disp%skip()
575 call disp%show("genMat = genRef")
576 genMat = genRef
577 call disp%show("call setMatMulTri(genMat(3:3, 1:), triMat(2:7, 1:), upperUnit, inversion) ! trsm simplified interface.")
578 call setMatMulTri(genMat(3:3, 1:), triMat(2:7, 1:), upperUnit, inversion) ! trsm simplified interface.
579 call disp%show("genMat")
580 call disp%show( genMat , format = gform )
581 call disp%show("genMat - solMat")
582 call disp%show( genMat - solMat , format = gform )
583 call disp%skip()
584 call disp%show("call setMatMulTri(genMat, triMat, upperUnit, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.")
585 call setMatMulTri(genMat, triMat, upperUnit, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
586 call disp%show("genMat")
587 call disp%show( genMat , format = gform )
588 call disp%show("genMat - genRef")
589 call disp%show( genMat - genRef , format = gform )
590 call disp%skip()
591 call disp%show("genMat = solMat")
592 genMat = solMat
593 call disp%show("call setMatMulTri(genMat(3:3, 1:), triMat(2:7, 1:), upperUnit, nothing) ! trmm simplified interface.")
594 call setMatMulTri(genMat(3:3, 1:), triMat(2:7, 1:), upperUnit, nothing) ! trmm simplified interface.
595 call disp%show("genMat")
596 call disp%show( genMat , format = gform )
597 call disp%show("genMat - genRef")
598 call disp%show( genMat - genRef , format = gform )
599 call disp%skip()
600
601 end block
602
603end program example
Generate and return a generic or type/kind-specific IO format with the requested specifications that ...
Definition: pm_io.F90:18485
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
Definition: pm_kind.F90:570
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! BLAS 3 TRSV / TRMV: triangular matrix-vector multiplication: complex.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7triMat
8(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
9(***************, ***************), (***************, ***************), ( +2.000000, +2.000000), ( +3.000000, +3.000000), ( +2.000000, +2.000000), (***************, ***************), (***************, ***************)
10(***************, ***************), (***************, ***************), (***************, ***************), ( +2.000000, +2.000000), ( +5.000000, +5.000000), (***************, ***************), (***************, ***************)
11(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), ( +3.000000, +3.000000), (***************, ***************), (***************, ***************)
12(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
13(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
14genMat
15(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +24.000000, +4.000000), ( +49.000000, +3.000000), ( +80.000000, +2.000000), (***************, ***************)
16ndim = 4; roffA = 1; coffA = 1; incB = 1;
17call setMatMulTri(triMat, upperUnit, transUnit, genMat(3:6), ndim, roffA, coffA, incB) ! blas trsv contiguous interface.
18genMat
19(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +4.000000, +4.000000), ( +3.000000, +3.000000), ( +2.000000, +2.000000), (***************, ***************)
20genMat - solMat
21( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
22
23genMat = genRef
24genMat
25(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +24.000000, +4.000000), ( +49.000000, +3.000000), ( +80.000000, +2.000000), (***************, ***************)
26call setMatMulTri(triMat(2:5, 2:5), upperUnit, transUnit, genMat(3:6)) ! blas trsv simplified interface.
27genMat
28(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +4.000000, +4.000000), ( +3.000000, +3.000000), ( +2.000000, +2.000000), (***************, ***************)
29genMat - solMat
30( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
31
32call setMatMulTri(triMat, upperUnit, transHerm, genMat(3:6), ndim, roffA, coffA, incB) ! blas trmv contiguous interface.
33genMat
34(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +24.000000, +4.000000), ( +49.000000, +3.000000), ( +80.000000, +2.000000), (***************, ***************)
35genMat - genRef
36( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
37
38genMat = solMat
39genMat
40(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +4.000000, +4.000000), ( +3.000000, +3.000000), ( +2.000000, +2.000000), (***************, ***************)
41call setMatMulTri(triMat(2:5, 2:5), upperUnit, transHerm, genMat(3:6)) ! blas trmv simplified interface.
42genMat
43(***************, ***************), (***************, ***************), ( +5.000000, +5.000000), ( +24.000000, +4.000000), ( +49.000000, +3.000000), ( +80.000000, +2.000000), (***************, ***************)
44genMat - genRef
45( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
46
47
48!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49! BLAS 3 TRSV / TRMV: triangular matrix-vector multiplication: real.
50!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51
52
53triMat
54***************, ***************, ***************, ***************, ***************, ***************
55***************, ***************, ***************, ***************, ***************, ***************
56***************, ***************, ***************, ***************, ***************, ***************
57***************, +1.000000, ***************, ***************, ***************, ***************
58***************, +2.000000, +3.000000, ***************, ***************, ***************
59***************, +3.000000, +4.000000, +3.000000, ***************, ***************
60***************, ***************, ***************, ***************, ***************, ***************
61***************, ***************, ***************, ***************, ***************, ***************
62***************, ***************, ***************, ***************, ***************, ***************
63***************, ***************, ***************, ***************, ***************, ***************
64genMat
65***************, ***************, +1.000000, ***************, ***************, +3.000000, ***************, ***************, +11.000000, ***************, ***************, +24.000000, ***************
66ndim = 4; roffA = 2; coffA = 1; incB = 3;
67call setMatMulTri(triMat, lowerUnit, inversion, genMat(3:), ndim, roffA, coffA, incB) ! blas trsv contiguous interface.
68genMat
69***************, ***************, +1.000000, ***************, ***************, +2.000000, ***************, ***************, +3.000000, ***************, ***************, +4.000000, ***************
70genMat - solMat
71 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
72
73genMat = genRef
74call setMatMulTri(triMat(3:6, 2:5), lowerUnit, inversion, genMat(3:size(genMat)-1:3)) ! blas trsv simplified interface.
75genMat
76***************, ***************, +1.000000, ***************, ***************, +2.000000, ***************, ***************, +3.000000, ***************, ***************, +4.000000, ***************
77genMat - solMat
78 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
79
80call setMatMulTri(triMat, lowerUnit, nothing, genMat(3:), ndim, roffA, coffA, incB) ! blas trmv contiguous interface.
81genMat
82***************, ***************, +1.000000, ***************, ***************, +3.000000, ***************, ***************, +11.000000, ***************, ***************, +24.000000, ***************
83genMat - genRef
84 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
85
86genMat = solMat
87call setMatMulTri(triMat(3:6, 2:5), lowerUnit, nothing, genMat(3:size(genMat)-1:3)) ! blas trmv simplified interface.
88genMat
89***************, ***************, +1.000000, ***************, ***************, +3.000000, ***************, ***************, +11.000000, ***************, ***************, +24.000000, ***************
90genMat - genRef
91 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
92
93
94triMat
95 +1.000000, +2.000000, +3.000000, +2.000000, ***************
96***************, +2.000000, +2.000000, +5.000000, ***************
97***************, ***************, +3.000000, +3.000000, ***************
98***************, ***************, ***************, +1.000000, ***************
99***************, ***************, ***************, ***************, ***************
100***************, ***************, ***************, ***************, ***************
101***************, ***************, ***************, ***************, ***************
102genMat
103 +5.000000, +18.000000, +32.000000, +41.000000
104ndim = 4; roffA = 0; coffA = 0; incB = 1;
105call setMatMulTri(triMat, upperDiag, transOrth, genMat, ndim, roffA, coffA, incB) ! blas trsm contiguous interface.
106genMat
107 +5.000000, +4.000000, +3.000000, +2.000000
108genMat - solMat
109 +0.000000, +0.000000, +0.000000, +0.000000
110
111genMat = genRef
112call setMatMulTri(triMat(1:4, 1:4), upperDiag, transOrth, genMat) ! blas trsv simplified interface.
113genMat
114 +5.000000, +4.000000, +3.000000, +2.000000
115genMat - solMat
116 +0.000000, +0.000000, +0.000000, +0.000000
117
118call setMatMulTri(triMat, upperDiag, transSymm, genMat, ndim, roffA, coffA, incB) ! blas trmv contiguous interface.
119genMat
120 +5.000000, +18.000000, +32.000000, +41.000000
121genMat - genRef
122 +0.000000, +0.000000, +0.000000, +0.000000
123
124genMat = solMat
125call setMatMulTri(triMat(1:4, 1:4), upperDiag, transSymm, genMat) ! blas trmv simplified interface.
126genMat
127 +5.000000, +18.000000, +32.000000, +41.000000
128genMat - genRef
129 +0.000000, +0.000000, +0.000000, +0.000000
130
131
132!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133! BLAS 3 TRSM / TRMM: triangular-general / general-triangular matrix multiplication: complex.
134!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135
136
137triMat
138(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
139(***************, ***************), (***************, ***************), ( +2.000000, -3.000000), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
140(***************, ***************), (***************, ***************), ( +2.000000, -4.000000), ( +3.000000, -1.000000), (***************, ***************), (***************, ***************), (***************, ***************)
141(***************, ***************), (***************, ***************), ( +2.000000, +2.000000), ( +1.000000, +2.000000), ( +1.000000, +1.000000), (***************, ***************), (***************, ***************)
142(***************, ***************), (***************, ***************), ( +0.000000, +0.000000), ( +3.000000, -1.000000), ( +0.000000, -1.000000), ( -2.000000, +1.000000), (***************, ***************)
143(***************, ***************), (***************, ***************), ( +2.000000, +2.000000), ( +4.000000, +0.000000), ( -1.000000, +2.000000), ( +2.000000, -4.000000), ( -1.000000, -4.000000)
144(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
145(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
146genMat
147(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
148(***************, ***************), ( +22.000000, -41.000000), ( +7.000000, -26.000000), ( +9.000000, +0.000000), ( -15.000000, -3.000000), ( -15.000000, +8.000000)
149(***************, ***************), ( +29.000000, -18.000000), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000000), ( -19.000000, -8.000000)
150(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -4.000000, -12.000000), ( -10.000000, -6.000000)
151(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
152(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
153alpha = (1._CKG, 0._CKG); nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 1; coffB = 2;
154call setMatMulTri(genMat, triMat, lowerDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
155genMat
156(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
157(***************, ***************), ( +3.000000, -0.000000), ( +4.000000, +0.000000), ( -1.000000, -2.000000), ( -1.000000, -1.000000), ( -1.000000, -4.000000)
158(***************, ***************), ( +2.000000, -1.000000), ( +1.000000, +2.000000), ( -1.000000, -3.000000), ( +0.000000, +2.000000), ( +3.000000, -4.000000)
159(***************, ***************), ( -2.000000, +1.000000), ( -1.000000, -3.000000), ( -3.000000, +1.000000), ( +0.000000, -0.000000), ( +2.000000, -2.000000)
160(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
161(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
162genMat - solMat
163( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
164( +0.000000, +0.000000), ( +0.000000, -0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
165( +0.000000, +0.000000), ( -0.000000, +0.000000), ( -0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
166( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, -0.000000), ( +0.000000, +0.000000)
167( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
168( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
169
170genMat = genRef
171genMat
172(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
173(***************, ***************), ( +22.000000, -41.000000), ( +7.000000, -26.000000), ( +9.000000, +0.000000), ( -15.000000, -3.000000), ( -15.000000, +8.000000)
174(***************, ***************), ( +29.000000, -18.000000), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000000), ( -19.000000, -8.000000)
175(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -4.000000, -12.000000), ( -10.000000, -6.000000)
176(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
177(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
178call setMatMulTri(genMat(2:4, 2:), triMat(2:6, 3:), lowerDiag, inversion) ! blas trsm simplified interface.
179genMat
180(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
181(***************, ***************), ( +3.000000, -0.000000), ( +4.000000, +0.000000), ( -1.000000, -2.000000), ( -1.000000, -1.000000), ( -1.000000, -4.000000)
182(***************, ***************), ( +2.000000, -1.000000), ( +1.000000, +2.000000), ( -1.000000, -3.000000), ( +0.000000, +2.000000), ( +3.000000, -4.000000)
183(***************, ***************), ( -2.000000, +1.000000), ( -1.000000, -3.000000), ( -3.000000, +1.000000), ( +0.000000, -0.000000), ( +2.000000, -2.000000)
184(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
185(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
186genMat - solMat
187( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
188( +0.000000, +0.000000), ( +0.000000, -0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
189( +0.000000, +0.000000), ( -0.000000, +0.000000), ( -0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
190( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, -0.000000), ( +0.000000, +0.000000)
191( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
192( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
193
194call setMatMulTri(genMat, triMat, lowerDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
195genMat
196(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
197(***************, ***************), ( +22.000000, -41.000000), ( +7.000000, -26.000000), ( +9.000000, +0.000000), ( -15.000000, -3.000000), ( -15.000000, +8.000000)
198(***************, ***************), ( +29.000000, -18.000000), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000000), ( -19.000000, -8.000000)
199(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -4.000000, -12.000000), ( -10.000000, -6.000000)
200(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
201(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
202genMat - genRef
203( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
204( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
205( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
206( +0.000000, +0.000000), ( +0.000000, -0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
207( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
208( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
209
210genMat = solMat
211genMat
212(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
213(***************, ***************), ( +3.000000, +0.000000), ( +4.000000, +0.000000), ( -1.000000, -2.000000), ( -1.000000, -1.000000), ( -1.000000, -4.000000)
214(***************, ***************), ( +2.000000, -1.000000), ( +1.000000, +2.000000), ( -1.000000, -3.000000), ( +0.000000, +2.000000), ( +3.000000, -4.000000)
215(***************, ***************), ( -2.000000, +1.000000), ( -1.000000, -3.000000), ( -3.000000, +1.000000), ( +0.000000, +0.000000), ( +2.000000, -2.000000)
216(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
217(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
218call setMatMulTri(genMat(2:4, 2:), triMat(2:6, 3:), lowerDiag, nothing) ! blas trmm simplified interface.
219genMat
220(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
221(***************, ***************), ( +22.000000, -41.000000), ( +7.000000, -26.000000), ( +9.000000, +0.000000), ( -15.000000, -3.000000), ( -15.000000, +8.000000)
222(***************, ***************), ( +29.000000, -18.000000), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000000), ( -19.000000, -8.000000)
223(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -4.000000, -12.000000), ( -10.000000, -6.000000)
224(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
225(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
226genMat - genRef
227( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
228( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
229( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
230( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
231( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
232( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
233
234
235triMat
236(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
237(***************, ***************), (***************, ***************), ( +2.000000, -3.000000), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
238(***************, ***************), (***************, ***************), ( +2.000000, -4.000000), ( +3.000000, -1.000000), (***************, ***************), (***************, ***************), (***************, ***************)
239(***************, ***************), (***************, ***************), ( +2.000000, +2.000000), ( +1.000000, +2.000000), ( +1.000000, +1.000000), (***************, ***************), (***************, ***************)
240(***************, ***************), (***************, ***************), ( +0.000000, +0.000000), ( +3.000000, -1.000000), ( +0.000000, -1.000000), ( -2.000000, +1.000000), (***************, ***************)
241(***************, ***************), (***************, ***************), ( +2.000000, +2.000000), ( +4.000000, +0.000000), ( -1.000000, +2.000000), ( +2.000000, -4.000000), ( -1.000000, -4.000000)
242(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
243(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
244genMat
245(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
246(***************, ***************), ( +22.000000, -41.000000), ( +7.000000, -26.000000), ( +9.000000, +0.000000), ( -15.000000, -3.000000), ( -15.000000, +8.000000)
247(***************, ***************), ( +29.000000, -18.000000), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000000), ( -19.000000, -8.000000)
248(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -4.000000, -12.000000), ( -10.000000, -6.000000)
249(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
250(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
251alpha = (1._CKG, 0._CKG); nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 2; coffB = 1;
252call setMatMulTri(genMat, transpose(triMat), upperDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
253genMat
254(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
255(***************, ***************), ( +12.846153, -1.230770), ( -6.915384, +6.976923), ( -7.330768, -9.046153), ( -10.761538, +13.707692), ( +29.774204, -11.112217)
256(***************, ***************), ( +8.615385, +3.923077), ( -4.338462, +4.092309), ( -1.176923, -13.315385), ( -12.453847, +14.669232), ( +37.109055, -8.874660)
257(***************, ***************), ( -2.769231, -3.153846), ( +7.123077, -6.215385), ( -7.253847, +15.069231), ( +14.992308, +4.238461), ( -22.576021, -21.472851)
258(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
259(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
260genMat - solMat
261( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
262( +0.000000, +0.000000), ( +9.846153, -1.230770), ( -10.915384, +6.976923), ( -6.330768, -7.046153), ( -9.761538, +14.707692), ( +30.774204, -7.112217)
263( +0.000000, +0.000000), ( +6.615385, +4.923077), ( -5.338462, +2.092309), ( -0.176923, -10.315385), ( -12.453847, +12.669232), ( +34.109055, -4.874660)
264( +0.000000, +0.000000), ( -0.769231, -4.153846), ( +8.123077, -3.215385), ( -4.253847, +14.069231), ( +14.992308, +4.238461), ( -24.576021, -19.472851)
265( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
266( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
267
268genMat = genRef
269genMat
270(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
271(***************, ***************), ( +22.000000, -41.000000), ( +7.000000, -26.000000), ( +9.000000, +0.000000), ( -15.000000, -3.000000), ( -15.000000, +8.000000)
272(***************, ***************), ( +29.000000, -18.000000), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000000), ( -19.000000, -8.000000)
273(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -4.000000, -12.000000), ( -10.000000, -6.000000)
274(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
275(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
276call setMatMulTri(genMat(2:4, 2:), transpose(triMat(2:6, 3:)), upperDiag, inversion) ! blas trsm simplified interface.
277genMat
278(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
279(***************, ***************), ( +12.846153, -1.230770), ( -6.915384, +6.976923), ( -7.330768, -9.046153), ( -10.761538, +13.707692), ( +29.774204, -11.112217)
280(***************, ***************), ( +8.615385, +3.923077), ( -4.338462, +4.092309), ( -1.176923, -13.315385), ( -12.453847, +14.669232), ( +37.109055, -8.874660)
281(***************, ***************), ( -2.769231, -3.153846), ( +7.123077, -6.215385), ( -7.253847, +15.069231), ( +14.992308, +4.238461), ( -22.576021, -21.472851)
282(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
283(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
284genMat - solMat
285( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
286( +0.000000, +0.000000), ( +9.846153, -1.230770), ( -10.915384, +6.976923), ( -6.330768, -7.046153), ( -9.761538, +14.707692), ( +30.774204, -7.112217)
287( +0.000000, +0.000000), ( +6.615385, +4.923077), ( -5.338462, +2.092309), ( -0.176923, -10.315385), ( -12.453847, +12.669232), ( +34.109055, -4.874660)
288( +0.000000, +0.000000), ( -0.769231, -4.153846), ( +8.123077, -3.215385), ( -4.253847, +14.069231), ( +14.992308, +4.238461), ( -24.576021, -19.472851)
289( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
290( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
291
292call setMatMulTri(genMat, transpose(triMat), upperDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
293genMat
294(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
295(***************, ***************), ( +21.999998, -41.000000), ( +6.999998, -25.999998), ( +9.000000, +0.000000), ( -15.000000, -2.999999), ( -14.999992, +8.000004)
296(***************, ***************), ( +29.000000, -18.000002), ( +24.000000, -10.000000), ( +9.000000, +6.000000), ( -12.000000, -24.000004), ( -19.000000, -8.000008)
297(***************, ***************), ( -15.000000, +2.000000), ( -3.000000, -21.000000), ( -2.000000, +4.000000), ( -3.999998, -12.000000), ( -10.000000, -6.000000)
298(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
299(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
300genMat - genRef
301( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
302( +0.000000, +0.000000), ( -0.000002, +0.000000), ( -0.000002, +0.000002), ( +0.000000, +0.000000), ( +0.000000, +0.000001), ( +0.000008, +0.000004)
303( +0.000000, +0.000000), ( +0.000000, -0.000002), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, -0.000004), ( +0.000000, -0.000008)
304( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000002, +0.000000), ( +0.000000, +0.000000)
305( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
306( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
307
308genMat = solMat
309genMat
310(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
311(***************, ***************), ( +3.000000, +0.000000), ( +4.000000, +0.000000), ( -1.000000, -2.000000), ( -1.000000, -1.000000), ( -1.000000, -4.000000)
312(***************, ***************), ( +2.000000, -1.000000), ( +1.000000, +2.000000), ( -1.000000, -3.000000), ( +0.000000, +2.000000), ( +3.000000, -4.000000)
313(***************, ***************), ( -2.000000, +1.000000), ( -1.000000, -3.000000), ( -3.000000, +1.000000), ( +0.000000, +0.000000), ( +2.000000, -2.000000)
314(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
315(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
316call setMatMulTri(genMat(2:4, 2:), transpose(triMat(2:6, 3:)), upperDiag, nothing) ! blas trmm simplified interface.
317genMat
318(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
319(***************, ***************), ( +6.000000, -9.000000), ( +18.000000, -16.000000), ( +11.000000, +11.000000), ( +13.000000, -2.000000), ( +6.000000, +16.000000)
320(***************, ***************), ( +1.000000, -8.000000), ( +5.000000, -5.000000), ( +5.000000, +2.000000), ( +0.000000, +2.000000), ( +6.000000, +7.000000)
321(***************, ***************), ( -1.000000, +8.000000), ( -6.000000, +2.000000), ( -5.000000, -9.000000), ( -5.000000, -5.000000), ( -19.000000, -27.000000)
322(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
323(***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************), (***************, ***************)
324genMat - genRef
325( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
326( +0.000000, +0.000000), ( -16.000000, +32.000000), ( +11.000000, +10.000000), ( +2.000000, +11.000000), ( +28.000000, +1.000000), ( +21.000000, +8.000000)
327( +0.000000, +0.000000), ( -28.000000, +10.000000), ( -19.000000, +5.000000), ( -4.000000, -4.000000), ( +12.000000, +26.000000), ( +25.000000, +15.000000)
328( +0.000000, +0.000000), ( +14.000000, +6.000000), ( -3.000000, +23.000000), ( -3.000000, -13.000000), ( -1.000000, +7.000000), ( -9.000000, -21.000000)
329( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
330( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000), ( +0.000000, +0.000000)
331
332
333!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
334! BLAS 3 TRSM / TRMM: triangular-general / general-triangular matrix multiplication: real.
335!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
336
337
338triMat
339 +3.000000, -1.000000, +2.000000, +2.000000, +1.000000
340***************, -2.000000, +4.000000, -1.000000, +3.000000
341***************, ***************, -3.000000, +0.000000, +2.000000
342***************, ***************, ***************, +4.000000, -2.000000
343***************, ***************, ***************, ***************, +1.000000
344***************, ***************, ***************, ***************, ***************
345***************, ***************, ***************, ***************, ***************
346genMat
347 +6.000000, +10.000000, -2.000000
348 -16.000000, -1.000000, +6.000000
349 -2.000000, +1.000000, -4.000000
350 +14.000000, +0.000000, -14.000000
351 -1.000000, +2.000000, +1.000000
352***************, ***************, ***************
353alpha = 1._RKG; nrow = 5; ncol = 3; roffA = 0; coffA = 0; roffB = 0; coffB = 0;
354call setMatMulTri(triMat, upperDiag, inversion, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
355genMat
356 +2.000000, +3.000000, +1.000000
357 +5.000000, +5.000000, +4.000000
358 +0.000000, +1.000000, +2.000000
359 +3.000000, +1.000000, -3.000000
360 -1.000000, +2.000000, +1.000000
361***************, ***************, ***************
362genMat - solMat
363 +0.000000, +0.000000, +0.000000
364 +0.000000, +0.000000, +0.000000
365 +0.000000, +0.000000, +0.000000
366 +0.000000, +0.000000, +0.000000
367 +0.000000, +0.000000, +0.000000
368 +0.000000, +0.000000, +0.000000
369
370genMat = genRef
371call setMatMulTri(triMat(1:5, 1:5), upperDiag, inversion, genMat(1:5, 1:3), alpha) ! blas trsm simplified interface.
372genMat
373 +2.000000, +3.000000, +1.000000
374 +5.000000, +5.000000, +4.000000
375 +0.000000, +1.000000, +2.000000
376 +3.000000, +1.000000, -3.000000
377 -1.000000, +2.000000, +1.000000
378***************, ***************, ***************
379genMat - solMat
380 +0.000000, +0.000000, +0.000000
381 +0.000000, +0.000000, +0.000000
382 +0.000000, +0.000000, +0.000000
383 +0.000000, +0.000000, +0.000000
384 +0.000000, +0.000000, +0.000000
385 +0.000000, +0.000000, +0.000000
386
387call setMatMulTri(triMat, upperDiag, nothing, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
388genMat
389 +6.000000, +10.000000, -2.000000
390 -16.000000, -1.000000, +6.000000
391 -2.000000, +1.000000, -4.000000
392 +14.000000, +0.000000, -14.000000
393 -1.000000, +2.000000, +1.000000
394***************, ***************, ***************
395genMat - genRef
396 +0.000000, +0.000000, +0.000000
397 +0.000000, +0.000000, +0.000000
398 +0.000000, +0.000000, +0.000000
399 +0.000000, +0.000000, +0.000000
400 +0.000000, +0.000000, +0.000000
401 +0.000000, +0.000000, +0.000000
402
403genMat = solMat
404call setMatMulTri(triMat(1:5, 1:5), upperDiag, nothing, genMat(1:5, 1:3), alpha) ! blas trmm simplified interface.
405genMat
406 +6.000000, +10.000000, -2.000000
407 -16.000000, -1.000000, +6.000000
408 -2.000000, +1.000000, -4.000000
409 +14.000000, +0.000000, -14.000000
410 -1.000000, +2.000000, +1.000000
411***************, ***************, ***************
412genMat - genRef
413 +0.000000, +0.000000, +0.000000
414 +0.000000, +0.000000, +0.000000
415 +0.000000, +0.000000, +0.000000
416 +0.000000, +0.000000, +0.000000
417 +0.000000, +0.000000, +0.000000
418 +0.000000, +0.000000, +0.000000
419
420
421triMat
422 -1.000000, -4.000000, -2.000000, +2.000000, +3.000000
423***************, -2.000000, +2.000000, +2.000000, +2.000000
424***************, ***************, -3.000000, -1.000000, +4.000000
425***************, ***************, ***************, +1.000000, +0.000000
426***************, ***************, ***************, ***************, -2.000000
427***************, ***************, ***************, ***************, ***************
428***************, ***************, ***************, ***************, ***************
429genMat
430 -1.000000, -2.000000, -3.000000, -4.000000
431 +2.000000, -2.000000, -14.000000, -12.000000
432 +10.000000, +5.000000, -8.000000, -7.000000
433 +14.000000, +15.000000, +1.000000, +8.000000
434 -3.000000, +4.000000, +3.000000, +16.000000
435***************, ***************, ***************, ***************
436alpha = 1._RKG; nrow = 5; ncol = 4; roffA = 0; coffA = 0; roffB = 0; coffB = 0;
437call setMatMulTri(triMat, upperDiag, transOrth, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
438genMat
439 +1.000000, +2.000000, +3.000000, +4.000000
440 -3.000000, -3.000000, +1.000000, -2.000000
441 -6.000000, -5.000000, +1.333333, -1.666667
442 +12.000000, +12.000000, -5.666667, +2.333333
443 -12.000000, -12.000000, +6.666667, -7.333333
444***************, ***************, ***************, ***************
445genMat - solMat
446 +0.000000, +0.000000, +0.000000, +0.000000
447 +0.000000, +0.000000, +0.000000, +0.000000
448 +0.000000, +0.000000, +0.000000, +0.000000
449 +0.000000, +0.000000, +0.000000, +0.000000
450 +0.000000, +0.000000, +0.000000, +0.000000
451 +0.000000, +0.000000, +0.000000, +0.000000
452
453genMat = genRef
454call setMatMulTri(triMat(1:5, 1:5), upperDiag, transOrth, genMat(1:5, 1:4)) ! trsm simplified interface.
455genMat
456 +1.000000, +2.000000, +3.000000, +4.000000
457 -3.000000, -3.000000, +1.000000, -2.000000
458 -6.000000, -5.000000, +1.333333, -1.666667
459 +12.000000, +12.000000, -5.666667, +2.333333
460 -12.000000, -12.000000, +6.666667, -7.333333
461***************, ***************, ***************, ***************
462genMat - solMat
463 +0.000000, +0.000000, +0.000000, +0.000000
464 +0.000000, +0.000000, +0.000000, +0.000000
465 +0.000000, +0.000000, +0.000000, +0.000000
466 +0.000000, +0.000000, +0.000000, +0.000000
467 +0.000000, +0.000000, +0.000000, +0.000000
468 +0.000000, +0.000000, +0.000000, +0.000000
469
470call setMatMulTri(triMat, upperDiag, transSymm, genMat, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
471genMat
472 -1.000000, -2.000000, -3.000000, -4.000000
473 +2.000000, -2.000000, -14.000000, -12.000000
474 +10.000000, +5.000000, -8.000000, -7.000000
475 +14.000000, +15.000000, +1.000000, +8.000001
476 -3.000000, +4.000000, +3.000000, +16.000000
477***************, ***************, ***************, ***************
478genMat - genRef
479 +0.000000, +0.000000, +0.000000, +0.000000
480 +0.000000, +0.000000, +0.000000, +0.000000
481 +0.000000, +0.000000, +0.000000, +0.000000
482 +0.000000, +0.000000, +0.000000, +0.000001
483 +0.000000, +0.000000, -0.000000, +0.000000
484 +0.000000, +0.000000, +0.000000, +0.000000
485
486genMat = solMat
487call setMatMulTri(triMat(1:5, 1:5), upperDiag, transSymm, genMat(1:5, 1:4)) ! trmm simplified interface.
488genMat
489 -1.000000, -2.000000, -3.000000, -4.000000
490 +2.000000, -2.000000, -14.000000, -12.000000
491 +10.000000, +5.000000, -8.000000, -7.000000
492 +14.000000, +15.000000, +1.000000, +8.000000
493 -3.000000, +4.000000, +3.000000, +16.000002
494***************, ***************, ***************, ***************
495genMat - genRef
496 +0.000000, +0.000000, +0.000000, +0.000000
497 +0.000000, +0.000000, +0.000000, +0.000000
498 +0.000000, +0.000000, +0.000000, +0.000000
499 +0.000000, +0.000000, +0.000000, -0.000000
500 +0.000000, +0.000000, +0.000000, +0.000002
501 +0.000000, +0.000000, +0.000000, +0.000000
502
503
504triMat
505***************, ***************, ***************, ***************, ***************, ***************
506***************, ***************, ***************, ***************, ***************, ***************
507***************, ***************, ***************, ***************, ***************, ***************
508***************, +2.000000, ***************, ***************, ***************, ***************
509***************, +2.000000, +3.000000, ***************, ***************, ***************
510***************, +2.000000, +1.000000, +1.000000, ***************, ***************
511***************, +0.000000, +3.000000, +0.000000, -2.000000, ***************
512***************, +2.000000, +4.000000, -1.000000, +2.000000, -1.000000
513***************, ***************, ***************, ***************, ***************, ***************
514***************, ***************, ***************, ***************, ***************, ***************
515genMat
516***************, ***************, ***************, ***************, ***************, ***************
517***************, +10.000000, +4.000000, +0.000000, +0.000000, +1.000000
518***************, +10.000000, +14.000000, -4.000000, +6.000000, -3.000000
519***************, -8.000000, +2.000000, -5.000000, +4.000000, -2.000000
520***************, ***************, ***************, ***************, ***************, ***************
521alpha = 1._RKG; nrow = 3; ncol = 5; roffA = 1; coffA = 1; roffB = 3; coffB = 1;
522call setMatMulTri(genMat, triMat, lowerDiag, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
523genMat
524***************, ***************, ***************, ***************, ***************, ***************
525***************, +3.000000, +4.000000, -1.000000, -1.000000, -1.000000
526***************, +2.000000, +1.000000, -1.000000, -0.000000, +3.000000
527***************, -2.000000, -1.000000, -3.000000, -0.000000, +2.000000
528***************, ***************, ***************, ***************, ***************, ***************
529genMat - solMat
530 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
531 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
532 +0.000000, +0.000000, +0.000000, +0.000000, -0.000000, +0.000000
533 +0.000000, +0.000000, +0.000000, +0.000000, -0.000000, +0.000000
534 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
535
536genMat = genRef
537call setMatMulTri(genMat(2:4, 2:6), triMat(4:8, 2:6), lowerDiag, inversion) ! trsm simplified interface.
538genMat
539***************, ***************, ***************, ***************, ***************, ***************
540***************, +3.000000, +4.000000, -1.000000, -1.000000, -1.000000
541***************, +2.000000, +1.000000, -1.000000, -0.000000, +3.000000
542***************, -2.000000, -1.000000, -3.000000, -0.000000, +2.000000
543***************, ***************, ***************, ***************, ***************, ***************
544genMat - solMat
545 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
546 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
547 +0.000000, +0.000000, +0.000000, +0.000000, -0.000000, +0.000000
548 +0.000000, +0.000000, +0.000000, +0.000000, -0.000000, +0.000000
549 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
550
551call setMatMulTri(genMat, triMat, lowerDiag, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
552genMat
553***************, ***************, ***************, ***************, ***************, ***************
554***************, +10.000000, +4.000000, +0.000000, +0.000000, +1.000000
555***************, +10.000000, +14.000000, -4.000000, +6.000000, -3.000000
556***************, -8.000000, +2.000000, -5.000000, +4.000000, -2.000000
557***************, ***************, ***************, ***************, ***************, ***************
558genMat - genRef
559 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
560 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
561 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
562 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
563 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
564
565genMat = solMat
566call setMatMulTri(genMat(2:4, 2:6), triMat(4:8, 2:6), lowerDiag, nothing) ! trmm simplified interface.
567genMat
568***************, ***************, ***************, ***************, ***************, ***************
569***************, +10.000000, +4.000000, +0.000000, +0.000000, +1.000000
570***************, +10.000000, +14.000000, -4.000000, +6.000000, -3.000000
571***************, -8.000000, +2.000000, -5.000000, +4.000000, -2.000000
572***************, ***************, ***************, ***************, ***************, ***************
573genMat - genRef
574 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
575 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
576 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
577 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
578 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
579
580
581genMat
582***************, ***************, ***************, ***************, ***************, ***************
583***************, ***************, ***************, ***************, ***************, ***************
584 +1.000000, +4.000000, -2.000000, +10.000000, +2.000000, -6.000000
585***************, ***************, ***************, ***************, ***************, ***************
586triMat
587***************, ***************, ***************, ***************, ***************, ***************
588***************, +2.000000, -3.000000, +1.000000, +2.000000, +4.000000
589***************, ***************, +0.000000, +1.000000, +1.000000, -2.000000
590***************, ***************, ***************, +4.000000, -1.000000, +1.000000
591***************, ***************, ***************, ***************, +0.000000, -1.000000
592***************, ***************, ***************, ***************, ***************, +2.000000
593***************, ***************, ***************, ***************, ***************, ***************
594***************, ***************, ***************, ***************, ***************, ***************
595alpha = 1._RKG; nrow = 1; ncol = 6; roffA = 2; coffA = 0; roffB = 1; coffB = 0;
596call setMatMulTri(genMat, triMat, upperUnit, inversion, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trsm contiguous interface.
597genMat
598***************, ***************, ***************, ***************, ***************, ***************
599***************, ***************, ***************, ***************, ***************, ***************
600 +1.000000, +2.000000, +1.000000, +3.000000, -1.000000, -2.000000
601***************, ***************, ***************, ***************, ***************, ***************
602genMat - solMat
603 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
604 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
605 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
606 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
607
608genMat = genRef
609call setMatMulTri(genMat(3:3, 1:), triMat(2:7, 1:), upperUnit, inversion) ! trsm simplified interface.
610genMat
611***************, ***************, ***************, ***************, ***************, ***************
612***************, ***************, ***************, ***************, ***************, ***************
613 +1.000000, +2.000000, +1.000000, +3.000000, -1.000000, -2.000000
614***************, ***************, ***************, ***************, ***************, ***************
615genMat - solMat
616 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
617 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
618 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
619 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
620
621call setMatMulTri(genMat, triMat, upperUnit, nothing, alpha, nrow, ncol, roffA, coffA, roffB, coffB) ! blas trmm contiguous interface.
622genMat
623***************, ***************, ***************, ***************, ***************, ***************
624***************, ***************, ***************, ***************, ***************, ***************
625 +1.000000, +4.000000, -2.000000, +10.000000, +2.000000, -6.000000
626***************, ***************, ***************, ***************, ***************, ***************
627genMat - genRef
628 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
629 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
630 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
631 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
632
633genMat = solMat
634call setMatMulTri(genMat(3:3, 1:), triMat(2:7, 1:), upperUnit, nothing) ! trmm simplified interface.
635genMat
636***************, ***************, ***************, ***************, ***************, ***************
637***************, ***************, ***************, ***************, ***************, ***************
638 +1.000000, +4.000000, -2.000000, +10.000000, +2.000000, -6.000000
639***************, ***************, ***************, ***************, ***************, ***************
640genMat - genRef
641 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
642 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
643 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
644 +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000
645
646
Test:
test_pm_matrixMul
Internal naming convention:
The following illustrates the internal naming convention used for the procedures within this generic interface.
trsm_ASS_CLDA_INVA_CGMB_ONOB_CK5
|||| ||| |||| |||| |||| |||| |||
|||| ||| |||| |||| |||| |||| The output type and type kind parameter.
|||| ||| |||| |||| |||| The operation to be performed on `matB`: ONO => Operation NOne, OTS => Operation Transposition Symmetric, INV => INVersion, OTH => Operation Transposition Hermitian, OTO => Operation Transposition Orthonormal, OTU => Operation Transposition Unitary.
|||| ||| |||| |||| The class of `matB`: CGM => Class General Matrix, CLD => Class Lower-Diagonal triangular, CLU => Class Lower-Unit triangular, CUD => Class Upper-Diagonal triangular, CUU => Class Upper-Unit triangular.
|||| ||| |||| The operation to be performed on `matA`: ONO => Operation NOne, OTS => Operation Transposition Symmetric, INV => INVersion, OTH => Operation Transposition Hermitian, OTO => Operation Transposition Orthonormal, OTU => Operation Transposition Unitary.
|||| ||| The class of `matB`: CGM => Class General Matrix, CLD => Class Lower-Diagonal triangular, CLU => Class Lower-Unit triangular, CUD => Class Upper-Diagonal triangular, CUU => Class Upper-Unit triangular.
|||| The explicitness of the array bounds: ASS/EXP => ASSumed bounds passed / EXPlicit bounds passed.
The BLAS routine implemented: trmv, trsv, trsm, trmm.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Friday 1:54 AM, April 21, 2017, Institute for Computational Engineering and Sciences (ICES), The University of Texas, Austin, TX

Definition at line 393 of file pm_matrixMulTri.F90.


The documentation for this interface was generated from the following file: