https://www.cdslab.org/paramonte/fortran/2
Current view: top level - main - pm_matrixIndex@routines.F90 (source / functions) Hit Total Coverage
Test: ParaMonte 2.0.0 :: Serial Fortran - Code Coverage Report Lines: 16 16 100.0 %
Date: 2024-04-08 03:18:57 Functions: 8 8 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       2             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       3             : !!!!                                                                                                                            !!!!
       4             : !!!!    ParaMonte: Parallel Monte Carlo and Machine Learning Library.                                                           !!!!
       5             : !!!!                                                                                                                            !!!!
       6             : !!!!    Copyright (C) 2012-present, The Computational Data Science Lab                                                          !!!!
       7             : !!!!                                                                                                                            !!!!
       8             : !!!!    This file is part of the ParaMonte library.                                                                             !!!!
       9             : !!!!                                                                                                                            !!!!
      10             : !!!!    LICENSE                                                                                                                 !!!!
      11             : !!!!                                                                                                                            !!!!
      12             : !!!!       https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md                                                          !!!!
      13             : !!!!                                                                                                                            !!!!
      14             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      15             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      16             : 
      17             : !>  \brief
      18             : !>  This file contains procedure implementations of [pm_matrixIndex](@ref pm_matrixIndex).
      19             : !>
      20             : !>  \finmain
      21             : !>
      22             : !>  \author
      23             : !>  \AmirShahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
      24             : 
      25             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      26             : 
      27             : submodule (pm_matrixIndex) routines ! LCOV_EXCL_LINE
      28             : 
      29             : #if CHECK_ENABLED
      30             :     use pm_err, only: getFine
      31             :     use pm_val2str, only: getStr
      32             :     use pm_err, only: setAsserted
      33             : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) \
      34             : call setAsserted(ASSERTION,getFine(__FILE__,LINE)//MODULE_NAME//MSG);
      35             : #else
      36             : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) continue;
      37             : #endif
      38             : 
      39             :     implicit none
      40             : 
      41             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      42             : 
      43             : contains
      44             : 
      45             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      46             : 
      47             : #define getMatIndex_ENABLED 1
      48             : 
      49             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      50             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      51             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      52             : 
      53             : #define AIO_ENABLED 1
      54             : 
      55             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      56             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      57             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      58             : 
      59             : #define D0_ENABLED 1
      60             : 
      61             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      62             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      63             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      64             : 
      65             : #define LFP_RDP_ENABLED 1
      66             : 
      67             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      68             : 
      69             : #define UXD_ENABLED 1
      70        3283 :     module procedure getMatIndex_D0_LFP_RDP_UXD_AIO
      71             : #include "pm_matrixIndex@routines.inc.F90"
      72        3283 :     end procedure
      73             : #undef UXD_ENABLED
      74             : 
      75             : #define XLD_ENABLED 1
      76        3301 :     module procedure getMatIndex_D0_LFP_RDP_XLD_AIO
      77             : #include "pm_matrixIndex@routines.inc.F90"
      78        3301 :     end procedure
      79             : #undef XLD_ENABLED
      80             : 
      81             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      82             : 
      83             : #undef LFP_RDP_ENABLED
      84             : 
      85             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      86             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      87             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      88             : 
      89             : #define RDP_LFP_ENABLED 1
      90             : 
      91             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      92             : 
      93             : #define UXD_ENABLED 1
      94           4 :     module procedure getMatIndex_D0_RDP_LFP_UXD_AIO
      95             : #include "pm_matrixIndex@routines.inc.F90"
      96           4 :     end procedure
      97             : #undef UXD_ENABLED
      98             : 
      99             : #define XLD_ENABLED 1
     100           5 :     module procedure getMatIndex_D0_RDP_LFP_XLD_AIO
     101             : #include "pm_matrixIndex@routines.inc.F90"
     102           5 :     end procedure
     103             : #undef XLD_ENABLED
     104             : 
     105             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     106             : 
     107             : #undef RDP_LFP_ENABLED
     108             : 
     109             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     110             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     111             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     112             : 
     113             : #define RFP_RDP_ENABLED 1
     114             : 
     115             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     116             : 
     117             : #define UXD_ENABLED 1
     118           8 :     module procedure getMatIndex_D0_RFP_RDP_UXD_AIO
     119             : #include "pm_matrixIndex@routines.inc.F90"
     120           8 :     end procedure
     121             : #undef UXD_ENABLED
     122             : 
     123             : #define XLD_ENABLED 1
     124           8 :     module procedure getMatIndex_D0_RFP_RDP_XLD_AIO
     125             : #include "pm_matrixIndex@routines.inc.F90"
     126           8 :     end procedure
     127             : #undef XLD_ENABLED
     128             : 
     129             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     130             : 
     131             : #undef RFP_RDP_ENABLED
     132             : 
     133             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     134             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     135             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     136             : 
     137             : #define RDP_RFP_ENABLED 1
     138             : 
     139             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     140             : 
     141             : #define UXD_ENABLED 1
     142           8 :     module procedure getMatIndex_D0_RDP_RFP_UXD_AIO
     143             : #include "pm_matrixIndex@routines.inc.F90"
     144           8 :     end procedure
     145             : #undef UXD_ENABLED
     146             : 
     147             : #define XLD_ENABLED 1
     148           8 :     module procedure getMatIndex_D0_RDP_RFP_XLD_AIO
     149             : #include "pm_matrixIndex@routines.inc.F90"
     150           8 :     end procedure
     151             : #undef XLD_ENABLED
     152             : 
     153             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     154             : 
     155             : #undef RDP_RFP_ENABLED
     156             : 
     157             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     158             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     159             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     160             : 
     161             : #undef D0_ENABLED
     162             : 
     163             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     164             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     165             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     166             : 
     167             : #undef AIO_ENABLED
     168             : 
     169             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     170             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     171             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     172             : 
     173             : #undef getMatIndex_ENABLED
     174             : 
     175             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     176             : !
     177             : !    ! get the lower triangular matrix element.
     178             : !    pure function getVecIndexLower(rank, row, col) result(index)
     179             : !#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     180             : !        !DEC$ ATTRIBUTES DLLEXPORT :: getVecIndexLower
     181             : !#endif
     182             : !        integer(IK), intent(in) :: rank, row, col
     183             : !        integer(IK) :: index
     184             : !        if (row > col) then
     185             : !            index = rank * (col - 1_IK) + row
     186             : !        else
     187             : !            index = rank * (row - 1_IK) + col
     188             : !        end if
     189             : !    end function
     190             : !
     191             : !!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     192             : 
     193             : #undef CHECK_ASSERTION
     194             : 
     195             : end submodule routines

ParaMonte: Parallel Monte Carlo and Machine Learning Library 
The Computational Data Science Lab
© Copyright 2012 - 2024