QR_MUMPS
Functions/Subroutines | Variables
dqrm_rfpf_mod Module Reference

This module contains an implementation of some operations on triangular/trapezoidal matrices stored in Rectangular Full Packed Format. More...

Functions/Subroutines

subroutine dqrm_to_rfpf (uplo, unit, n, a, lda, b)
 
subroutine drpmv (uplo, trans, diag, n, a, x)
 
subroutine drpsv (uplo, trans, diag, n, a, x)
 
subroutine drprft (direct, storev, m, k, v1, v2, ldv2, tau, t, ldt)
 
subroutine drprfb (side, trans, direct, storev, m, n, k, v1, v2, ldv2, t, ldt, c, ldc, work, ldwork)
 
subroutine drpmm (side, uplo, trans, diag, m, n, alpha, a, x, ldx)
 
subroutine drpsm (side, uplo, trans, diag, m, n, alpha, a, x, ldx)
 
subroutine dqrm_print_rfpf (uplo, n, b)
 

Variables

character, parameter tran ='t'
 
character, parameter notran ='n'
 

Detailed Description

This module contains an implementation of some operations on triangular/trapezoidal matrices stored in Rectangular Full Packed Format.

For more details on this format please refer to:

Fred G. Gustavson, Jerzy Wasniewski, and Jack J. Dongarra. "Rectangular Full Packed Format for Cholesky’s Algorithm: Factorization, Solution and Inversion." LAPACK Working Note 199, April 2008.

According to this format, a triangular matrix can be stored in a 2D array like described below.

The RFPF format is obtained by "cutting" the upper-leftmost corner of a triangular matrix, transposing it and the appending it on the right or at the bottom for lower or upper triangular matrices, respectively.

A lower triangular matrix with odd dimension:

 01
 02 03             
 04 05 06           is stored like    04 05 06 01 02
 07 08 09 10                          07 08 09 10 03
 11 12 13 14 15                       11 12 13 14 15

A lower triangular matrix with even dimension:

 01
 02 03
 04 05 06
 07 08 09 10        is stored like    07 08 09 10 01 02 04
 11 12 13 14 15                       11 12 13 14 15 03 05
 16 17 18 19 20 21                    16 17 18 19 20 21 06

An upper triangular matrix with odd dimension

 01 02 03 04 05                       03 04 05
    06 07 08 09                       07 08 09
       10 11 12     is stored like    10 11 12
          13 14                       01 13 14
             15                       02 06 15

An upper triangular matrix with even dimension

 01 02 03 04 05 06                    04 05 06
    07 08 09 10 11                    09 10 11
       12 13 14 15                    13 14 15
          16 17 18  is stored like    16 17 18
             19 20                    01 19 20
                21                    02 07 21

03 08 12

In general a matrix in RFPF can be split into three components (e.g., in the last even, upper triangular case):

         04 05 06
         09 10 11
         13 14 15

           16 17 18
     01       19 20
     02 07       21
     03 08 12

and thus an operation like a TRMM (triangular matrix times a dense matrix) can be translated into three sub-operations: TRMM, GEMM and TRMM.

A general, trapezoidal matrix can be split into a rectangular block, stored in conventional column-major format and a triangular one stored in RFPF.

Routines in this module will have an old-style f77 interface a la LAPACK. This is risky because the fortran standard doesn't say a word about storing arrays/allocatables in contiguous memory areas although compilers always do it. However, in such a case all the BLAS and LAPACK routines won't work so we're ruined anyway.

Function/Subroutine Documentation

subroutine dqrm_rfpf_mod::dqrm_print_rfpf ( character  uplo,
integer  n,
real(kind(1.d0)), dimension(*)  b 
)

Definition at line 734 of file dqrm_rfpf_mod.F90.

subroutine dqrm_rfpf_mod::dqrm_to_rfpf ( character  uplo,
character  unit,
integer  n,
real(kind(1.d0)), dimension(lda,*)  a,
integer  lda,
real(kind(1.d0)), dimension(*)  b 
)

Definition at line 135 of file dqrm_rfpf_mod.F90.

subroutine dqrm_rfpf_mod::drpmm ( character  side,
character  uplo,
character  trans,
character  diag,
integer  m,
integer  n,
real(kind(1.d0))  alpha,
real(kind(1.d0)), dimension(*)  a,
real(kind(1.d0)), dimension(ldx,*)  x,
integer  ldx 
)

Definition at line 508 of file dqrm_rfpf_mod.F90.

References notran, and tran.

Referenced by drprfb().

subroutine dqrm_rfpf_mod::drpmv ( character  uplo,
character  trans,
character  diag,
integer  n,
real(kind(1.d0)), dimension(*)  a,
real(kind(1.d0)), dimension(*)  x 
)

Definition at line 209 of file dqrm_rfpf_mod.F90.

References notran, and tran.

subroutine dqrm_rfpf_mod::drprfb ( character  side,
character  trans,
character  direct,
character  storev,
integer  m,
integer  n,
integer  k,
real(kind(1.d0)), dimension(*)  v1,
real(kind(1.d0)), dimension(ldv2,*)  v2,
integer  ldv2,
real(kind(1.d0)), dimension(ldt,*)  t,
integer  ldt,
real(kind(1.d0)), dimension(ldc,*)  c,
integer  ldc,
real(kind(1.d0)), dimension(ldwork, *)  work,
integer  ldwork 
)

Definition at line 422 of file dqrm_rfpf_mod.F90.

References drpmm(), notran, and tran.

subroutine dqrm_rfpf_mod::drprft ( character  direct,
character  storev,
integer  m,
integer  k,
real(kind(1.d0)), dimension(*)  v1,
real(kind(1.d0)), dimension(ldv2,*)  v2,
integer  ldv2,
real(kind(1.d0)), dimension(*)  tau,
real(kind(1.d0)), dimension(ldt,*)  t,
integer  ldt 
)

Definition at line 331 of file dqrm_rfpf_mod.F90.

References notran, and tran.

subroutine dqrm_rfpf_mod::drpsm ( character  side,
character  uplo,
character  trans,
character  diag,
integer  m,
integer  n,
real(kind(1.d0))  alpha,
real(kind(1.d0)), dimension(*)  a,
real(kind(1.d0)), dimension(ldx,*)  x,
integer  ldx 
)

Definition at line 622 of file dqrm_rfpf_mod.F90.

References notran, and tran.

subroutine dqrm_rfpf_mod::drpsv ( character  uplo,
character  trans,
character  diag,
integer  n,
real(kind(1.d0)), dimension(*)  a,
real(kind(1.d0)), dimension(*)  x 
)

Definition at line 269 of file dqrm_rfpf_mod.F90.

References notran, and tran.

Variable Documentation

character parameter dqrm_rfpf_mod::notran ='n'

Definition at line 126 of file dqrm_rfpf_mod.F90.

Referenced by drpmm(), drpmv(), drprfb(), drprft(), drpsm(), and drpsv().

character parameter dqrm_rfpf_mod::tran ='t'

Definition at line 126 of file dqrm_rfpf_mod.F90.

Referenced by drpmm(), drpmv(), drprfb(), drprft(), drpsm(), and drpsv().