self_blas_matrixop_1d Subroutine

public subroutine self_blas_matrixop_1d(A, f, Af, opArows, opAcols, bcols, handle)

Arguments

TypeIntentOptionalAttributesName
type(c_ptr), intent(in) :: A
real(kind=prec), intent(in), pointer:: f(:,:,:)
real(kind=prec), intent(inout), pointer:: Af(:,:,:)
integer, intent(in) :: opArows
integer, intent(in) :: opAcols
integer, intent(in) :: bcols
type(c_ptr), intent(inout) :: handle

Contents

Source Code


Source Code

                          subroutine self_blas_matrixop_1d(A,f,Af,opArows,opAcols,bcols,handle)
                            type(c_ptr),intent(in) :: A
                            real(prec),pointer,intent(in) :: f(:,:,:)
                            real(prec),pointer,intent(inout) :: Af(:,:,:)
                            integer,intent(in) :: opArows,opAcols,bcols
                            type(c_ptr),intent(inout) :: handle
                            ! Local
                            integer(c_int) :: m
                            integer(c_int) :: n
                            integer(c_int) :: k
                            real(c_prec) :: alpha
                            integer(c_int) :: lda
                            integer(c_int) :: ldb
                            integer(c_int) :: ldc
                            real(c_prec) :: beta

                            m = opArows ! number of rows of A^T
                            n = bcols ! number of columns of B
                            k = opAcols ! number of columns of A^T
                            alpha = 1.0_c_prec
                            lda = k ! leading dimension of A (matrix)
                            ldb = k ! leading dimension of B (f)
                            ldc = m ! leading dimension of C (Af)
                            beta = 0.0_c_prec

                            call hipblasCheck(hipblasgemm(handle, &
                                                          HIPBLAS_OP_T,HIPBLAS_OP_N, &
                                                          m,n,k,alpha, &
                                                          A,lda, &
                                                          c_loc(f),ldb, &
                                                          beta, &
                                                          c_loc(Af),ldc))

                          endsubroutine self_blas_matrixop_1d