25 use,
intrinsic :: iso_fortran_env
192 subroutine dgemm_simple(a, b, c, transa, transb, alpha, beta)
193 real(real64),
contiguous,
intent(in ) :: a(:,:)
194 real(real64),
contiguous,
intent(in ) :: b(:,:)
195 real(real64),
contiguous,
intent(inout) :: c(:,:)
197 character(len=1),
optional,
intent(in ) :: transa, transb
198 real(real64),
optional,
intent(in ) :: alpha
199 real(real64),
optional,
intent(in ) :: beta
203 integer :: m, k, l, n
204 character(len=1) :: ta, tb
205 real(real64) :: p_alpha, p_beta
211 if (
present(transa)) ta = transa
212 if (
present(transb)) tb = transb
217 if (ta ==
'n' .or. ta ==
'N')
then
224 if (tb ==
'n' .or. tb ==
'N')
then
231 assert(
size(c, 1) == m)
232 assert(
size(c, 2) == n)
242# define N_ARG_TYPES 2
243# include "lalg_basic_blas_inc.F90"
246# define N_ARG_TYPES 4
247# include "lalg_basic_blas_inc.F90"
--------------— gemm ---------------— performs one of the matrix-matrix operations
constant times a vector plus a vector
Copies a vector x, to a vector y.
lalg_gemm with both the (Hermitian) transpose of A and B.
The same as above but with (Hermitian) transpose of A.
The same as lalg_gemm but with (Hermitian) transpose of B.
Matrix-matrix multiplication plus matrix.
Returns the euclidean norm of a vector.
scales a vector by a constant
The following matrix multiplications all expect upper triangular matrices for a. For real matrices,...
Matrix-vector multiplication plus vector.
Matrix-matrix multiplication.
This module contains interfaces for BLAS routines You should not use these routines directly....
subroutine symv_2_4(n1, n2, alpha, a, x, beta, y)
subroutine gemm_cc_1_2(m, n, k, alpha, a, b, beta, c)
GEMM when both a and b are (Hermitian) transposes.
subroutine trmm_1_2(m, n, uplo, transa, side, alpha, a, b)
subroutine axpy_1_4(n1, da, dx, dy)
subroutine axpy_4_2(n1, n2, n3, n4, da, dx, dy)
subroutine swap_4_2(n1, n2, n3, n4, dx, dy)
subroutine copy_2_4(n1, n2, dx, dy)
subroutine swap_2_2(n1, n2, dx, dy)
subroutine gemm_1_2(m, n, k, alpha, a, b, beta, c)
subroutine gemm_2_4(m1, m2, n, k, alpha, a, b, beta, c)
subroutine axpy_6_4(n1, n2, da, dx, dy)
subroutine axpy_2_2(n1, n2, da, dx, dy)
subroutine trmm_1_4(m, n, uplo, transa, side, alpha, a, b)
subroutine swap_3_2(n1, n2, n3, dx, dy)
subroutine copy_3_2(n1, n2, n3, dx, dy)
subroutine scal_5_4(n1, da, dx)
subroutine copy_4_2(n1, n2, n3, n4, dx, dy)
subroutine swap_3_4(n1, n2, n3, dx, dy)
subroutine gemm_nc_2_2(m1, m2, n1, n2, k, alpha, a, b, beta, c)
subroutine scal_2_4(n1, n2, da, dx)
subroutine swap_4_4(n1, n2, n3, n4, dx, dy)
subroutine gemm_cn_1_2(m, n, k, alpha, a, b, beta, c)
The same as above but with (Hermitian) transpose of a. Note, in this also works when a and b are real...
subroutine gemm_cn_2_4(m1, m2, n1, n2, k, alpha, a, b, beta, c)
subroutine scal_1_2(n1, da, dx)
subroutine scal_4_4(n1, n2, n3, n4, da, dx)
subroutine swap_1_2(n1, dx, dy)
subroutine axpy_3_4(n1, n2, n3, da, dx, dy)
subroutine swap_1_4(n1, dx, dy)
subroutine axpy_4_4(n1, n2, n3, n4, da, dx, dy)
subroutine gemv_2_2(m1, m2, n, alpha, a, x, beta, y)
subroutine dgemm_simple(a, b, c, transa, transb, alpha, beta)
GEMM with a simplified API for two matrices of consistent shape and type.
subroutine scal_6_4(n1, n2, da, dx)
subroutine gemm_2_2(m1, m2, n, k, alpha, a, b, beta, c)
subroutine gemm_cc_1_4(m, n, k, alpha, a, b, beta, c)
GEMM when both a and b are (Hermitian) transposes.
subroutine scal_1_4(n1, da, dx)
subroutine copy_1_2(n1, dx, dy)
subroutine gemv_2_4(m1, m2, n, alpha, a, x, beta, y)
subroutine gemm_cn_2_2(m1, m2, n1, n2, k, alpha, a, b, beta, c)
subroutine scal_2_2(n1, n2, da, dx)
subroutine axpy_5_4(n1, da, dx, dy)
subroutine copy_2_2(n1, n2, dx, dy)
subroutine axpy_7_4(n1, n2, n3, da, dx, dy)
subroutine axpy_3_2(n1, n2, n3, da, dx, dy)
subroutine scal_3_4(n1, n2, n3, da, dx)
subroutine gemm_nc_2_4(m1, m2, n1, n2, k, alpha, a, b, beta, c)
subroutine axpy_1_2(n1, da, dx, dy)
real(real64) function nrm2_4(n, dx)
subroutine symv_1_2(n, alpha, a, x, beta, y)
subroutine gemm_1_4(m, n, k, alpha, a, b, beta, c)
subroutine gemv_1_2(m, n, alpha, a, x, beta, y)
subroutine copy_1_4(n1, dx, dy)
subroutine symm_1_4(m, n, side, alpha, a, b, beta, c)
The following matrix multiplications all expect upper triangular matrices for a. For real matrices,...
subroutine gemm_nc_1_2(m, n, k, alpha, a, b, beta, c)
The same as gemm but with (Hermitian) transpose of b. Note, in this also works when a and b are real.
subroutine symv_2_2(n1, n2, alpha, a, x, beta, y)
subroutine swap_2_4(n1, n2, dx, dy)
subroutine copy_4_4(n1, n2, n3, n4, dx, dy)
real(real64) function nrm2_2(n, dx)
subroutine gemm_cn_1_4(m, n, k, alpha, a, b, beta, c)
The same as above but with (Hermitian) transpose of a. Note, in this also works when a and b are real...
subroutine gemm_nc_1_4(m, n, k, alpha, a, b, beta, c)
The same as gemm but with (Hermitian) transpose of b. Note, in this also works when a and b are real.
subroutine symm_1_2(m, n, side, alpha, a, b, beta, c)
The following matrix multiplications all expect upper triangular matrices for a. For real matrices,...
subroutine axpy_2_4(n1, n2, da, dx, dy)
subroutine gemv_1_4(m, n, alpha, a, x, beta, y)
subroutine copy_3_4(n1, n2, n3, dx, dy)
subroutine scal_4_2(n1, n2, n3, n4, da, dx)
subroutine symv_1_4(n, alpha, a, x, beta, y)
subroutine scal_3_2(n1, n2, n3, da, dx)
This module is intended to contain simple general-purpose utility functions and procedures.