https://www.cdslab.org/paramonte/fortran/2
Current view: top level - main - pm_distCov.F90 (source / functions) Hit Total Coverage
Test: ParaMonte 2.0.0 :: Serial Fortran - Code Coverage Report Lines: 0 1 0.0 %
Date: 2024-04-08 03:18:57 Functions: 0 3 0.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 module contains classes and procedures for generating random matrices distributed
      19             : !>  on the space of positive definite matrices, such that their determinants is uniformly or power-law distributed.
      20             : !>
      21             : !>  \details
      22             : !>  The procedures of this module generate random covariance matrices based on the following approaches:<br>
      23             : !>  <ol>
      24             : !>      <li>    The first class of methods is based on the observation that every real positive definite matrix \f$M\f$ has a Cholesky factorization
      25             : !>              \f{equation}{
      26             : !>                  M = LL*
      27             : !>              \f}
      28             : !>              where \f$L\f$ is a uniquely defined lower triangular matrix with positive diagonal entries.<br>
      29             : !>              Therefore, \f$M\f$ can be constructed from a given random \f$L\f$.<br>
      30             : !>              The **Gram method** is fast, however, the resulting matrix \f$M\f$ does not possess any particular structure.<br>
      31             : !>      <li>    The second class of methods is based on a modified version of the Vine algorithm of *Lewandowski, Kurowicka, and Joe (2009),
      32             : !>              "Generating random correlation matrices based on vines and extended onion method"*.<br>
      33             : !>              The resulting matrices generated by procedures of this module are randomly distributed over the space of the correlation matrices such that,
      34             : !>              \f{equation}{
      35             : !>                  \pi(\left|\ms{rand}\right| ~\big|~ \eta) \propto \left|\ms{rand}\right|^{\eta} ~,
      36             : !>              \f}
      37             : !>              where,
      38             : !>              <ol>
      39             : !>                  <li>    \f$\left|\ms{rand}\right|\f$ represents the determinant of the generated matrix \f$\ms{rand}\f$, and
      40             : !>                  <li>    \f$\eta\f$ is an arbitrary scalar non-negative constant.
      41             : !>              </ol>
      42             : !>              Note that the definition of \f$\eta\f$ in this module corresponds to \f$\eta - 1\f$ in the proposed algorithm of Lewandowski et al. (2009).<br>
      43             : !>              Setting \f$\eta = 0.\f$ corresponds to a uniform distribution of the random matrices on the space of the correlation matrices.<br>
      44             : !>              The off-diagonal elements of the random correlation matrix follow the [Beta distribution](@ref pm_distBeta):
      45             : !>              \f{equation}{
      46             : !>                  \ms{rand}_{ij} \sim \mathcal{B}(\eta + \ms{ndim} / 2, \eta + \ms{ndim} / 2) ~,~ i \neq j ~,~ 1 \leq i, j \leq \ms{ndim} ~,
      47             : !>              \f}
      48             : !>              over the range \f$(-1, +1)\f$, where \f$\ms{ndim}\f$ represents the rank of the correlation matrix.<br>
      49             : !>              Larger values of \f$\eta\f$ lead to random correlation matrices with more homogeneous structure.<br>
      50             : !>              Smaller values of \f$\eta\f$ lead to random correlation matrices with more heterogeneous structure with strong correlations along some dimensions.<br>
      51             : !>              The resulting correlation matrix can be arbitrarily scaled along different dimensions to generate power-law randomly-distributed **covariance matrix**.<br>
      52             : !>  </ol>
      53             : !>
      54             : !>  \test
      55             : !>  [test_pm_distCov](@ref test_pm_distCov)<br>
      56             : !>
      57             : !>  \todo
      58             : !>  \pvhigh
      59             : !>  The output square matrices from the onion method are frequently non-positive-definite, particularly in higher dimensions.<br>
      60             : !>  A closer look into the root causes of this instability must be done.<br>
      61             : !>
      62             : !>  \see
      63             : !>  [pm_distBeta](@ref pm_distBeta)<br>
      64             : !>
      65             : !>  \finmain
      66             : !>
      67             : !>  \author
      68             : !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
      69             : 
      70             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      71             : 
      72             : module pm_distCov
      73             : 
      74             :     use pm_distUnif, only: rngf_type, xoshiro256ssw_type
      75             :     use pm_kind, only: SK, IK, LK
      76             : 
      77             :     implicit none
      78             : 
      79             :     character(*, SK), parameter :: MODULE_NAME = "@pm_distCov"
      80             : 
      81             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      82             : 
      83             :     !>  \brief
      84             :     !>  This the derived type whose instances imply the use of the Gram
      85             :     !>  algorithm for generating random covariance matrices.<br>
      86             :     !>
      87             :     !>  \brief
      88             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
      89             :     !>
      90             :     !>  \interface{gram_type}
      91             :     !>  \code{.F90}
      92             :     !>
      93             :     !>      use pm_distCov, only: gram_type
      94             :     !>      type(gram_type), parameter :: gram
      95             :     !>
      96             :     !>      gram = gram_type()
      97             :     !>
      98             :     !>  \endcode
      99             :     !>
     100             :     !>  \note
     101             :     !>  See the documentation of [getCovRand](@ref pm_distCov::getCovRand) for example usage.
     102             :     !>
     103             :     !>  \see
     104             :     !>  [gram](@ref pm_distCov::gram)<br>
     105             :     !>  [dvine](@ref pm_distCov::dvine)<br>
     106             :     !>  [onion](@ref pm_distCov::onion)<br>
     107             :     !>  [gram_type](@ref pm_distCov::gram_type)<br>
     108             :     !>  [dvine_type](@ref pm_distCov::dvine_type)<br>
     109             :     !>  [onion_type](@ref pm_distCov::onion_type)<br>
     110             :     !>  [getCovRand](@ref pm_distCov::getCovRand)<br>
     111             :     !>  [setCovRand](@ref pm_distCov::setCovRand)<br>
     112             :     !>
     113             :     !>  \test
     114             :     !>  [test_pm_distCov](@ref test_pm_distCov)<br>
     115             :     !>
     116             :     !>  \finmain{gram_type}
     117             :     !>
     118             :     !>  \author
     119             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     120             :     type gram_type
     121             :     end type gram_type
     122             : 
     123             :     !>  \brief
     124             :     !>  The scalar constant of type [gram_type](@ref pm_distCov::gram_type) implying the use of the Gram
     125             :     !>  algorithm for generating random covariance matrices.<br>
     126             :     !>
     127             :     !>  \brief
     128             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
     129             :     !>
     130             :     !>  \interface{gram}
     131             :     !>  \code{.F90}
     132             :     !>
     133             :     !>      use pm_distCov, only: gram
     134             :     !>
     135             :     !>  \endcode
     136             :     !>
     137             :     !>  \note
     138             :     !>  See the documentation of [getCovRand](@ref pm_distCov::getCovRand) for example usage.
     139             :     !>
     140             :     !>  \see
     141             :     !>  [gram](@ref pm_distCov::gram)<br>
     142             :     !>  [dvine](@ref pm_distCov::dvine)<br>
     143             :     !>  [onion](@ref pm_distCov::onion)<br>
     144             :     !>  [gram_type](@ref pm_distCov::gram_type)<br>
     145             :     !>  [dvine_type](@ref pm_distCov::dvine_type)<br>
     146             :     !>  [onion_type](@ref pm_distCov::onion_type)<br>
     147             :     !>  [getCovRand](@ref pm_distCov::getCovRand)<br>
     148             :     !>  [setCovRand](@ref pm_distCov::setCovRand)<br>
     149             :     !>
     150             :     !>  \test
     151             :     !>  [test_pm_distCov](@ref test_pm_distCov)<br>
     152             :     !>
     153             :     !>  \finmain{gram}
     154             :     !>
     155             :     !>  \author
     156             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     157             :     type(gram_type), parameter :: gram = gram_type()
     158             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     159             :     !DIR$ ATTRIBUTES DLLEXPORT :: gram
     160             : #endif
     161             : 
     162             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     163             : 
     164             :     !>  \brief
     165             :     !>  This the derived type whose instances imply the use of the Dvine
     166             :     !>  algorithm for generating random covariance matrices as described in algorithm of Lewandowski et al. (2009).<br>
     167             :     !>
     168             :     !>  \brief
     169             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
     170             :     !>
     171             :     !>  \interface{dvine_type}
     172             :     !>  \code{.F90}
     173             :     !>
     174             :     !>      use pm_distCov, only: dvine_type
     175             :     !>      type(dvine_type), parameter :: dvine
     176             :     !>
     177             :     !>      dvine = dvine_type()
     178             :     !>
     179             :     !>  \endcode
     180             :     !>
     181             :     !>  \note
     182             :     !>  See the documentation of [getCovRand](@ref pm_distCov::getCovRand) for example usage.
     183             :     !>
     184             :     !>  \see
     185             :     !>  [gram](@ref pm_distCov::gram)<br>
     186             :     !>  [dvine](@ref pm_distCov::dvine)<br>
     187             :     !>  [onion](@ref pm_distCov::onion)<br>
     188             :     !>  [gram_type](@ref pm_distCov::gram_type)<br>
     189             :     !>  [dvine_type](@ref pm_distCov::dvine_type)<br>
     190             :     !>  [onion_type](@ref pm_distCov::onion_type)<br>
     191             :     !>  [getCovRand](@ref pm_distCov::getCovRand)<br>
     192             :     !>  [setCovRand](@ref pm_distCov::setCovRand)<br>
     193             :     !>
     194             :     !>  \test
     195             :     !>  [test_pm_distCov](@ref test_pm_distCov)<br>
     196             :     !>
     197             :     !>  \finmain{dvine_type}
     198             :     !>
     199             :     !>  \author
     200             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     201             :     type dvine_type
     202             :     end type dvine_type
     203             : 
     204             :     !>  \brief
     205             :     !>  The scalar constant of type [dvine_type](@ref pm_distCov::dvine_type) implying the use of the Dvine
     206             :     !>  algorithm for generating random covariance matrices as described in algorithm of Lewandowski et al. (2009).<br>
     207             :     !>
     208             :     !>  \brief
     209             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
     210             :     !>
     211             :     !>  \interface{dvine}
     212             :     !>  \code{.F90}
     213             :     !>
     214             :     !>      use pm_distCov, only: dvine
     215             :     !>
     216             :     !>  \endcode
     217             :     !>
     218             :     !>  \note
     219             :     !>  See the documentation of [getCovRand](@ref pm_distCov::getCovRand) for example usage.
     220             :     !>
     221             :     !>  \see
     222             :     !>  [gram](@ref pm_distCov::gram)<br>
     223             :     !>  [dvine](@ref pm_distCov::dvine)<br>
     224             :     !>  [onion](@ref pm_distCov::onion)<br>
     225             :     !>  [gram_type](@ref pm_distCov::gram_type)<br>
     226             :     !>  [dvine_type](@ref pm_distCov::dvine_type)<br>
     227             :     !>  [onion_type](@ref pm_distCov::onion_type)<br>
     228             :     !>  [getCovRand](@ref pm_distCov::getCovRand)<br>
     229             :     !>  [setCovRand](@ref pm_distCov::setCovRand)<br>
     230             :     !>
     231             :     !>  \test
     232             :     !>  [test_pm_distCov](@ref test_pm_distCov)<br>
     233             :     !>
     234             :     !>  \finmain{dvine}
     235             :     !>
     236             :     !>  \author
     237             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     238             :     type(dvine_type), parameter :: dvine = dvine_type()
     239             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     240             :     !DIR$ ATTRIBUTES DLLEXPORT :: dvine
     241             : #endif
     242             : 
     243             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     244             : 
     245             :     !>  \brief
     246             :     !>  This the derived type whose instances imply the use of the Onion algorithm for generating
     247             :     !>  random covariance matrices as described in algorithm of Lewandowski et al. (2009).<br>
     248             :     !>
     249             :     !>  \brief
     250             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
     251             :     !>
     252             :     !>  \interface{onion_type}
     253             :     !>  \code{.F90}
     254             :     !>
     255             :     !>      use pm_distCov, only: onion_type
     256             :     !>      type(onion_type), parameter :: onion
     257             :     !>
     258             :     !>      onion = onion_type()
     259             :     !>      print *, onion%info
     260             :     !>
     261             :     !>  \endcode
     262             :     !>
     263             :     !>  \note
     264             :     !>  See the documentation of [getCovRand](@ref pm_distCov::getCovRand) for example usage.
     265             :     !>
     266             :     !>  \see
     267             :     !>  [gram](@ref pm_distCov::gram)<br>
     268             :     !>  [dvine](@ref pm_distCov::dvine)<br>
     269             :     !>  [onion](@ref pm_distCov::onion)<br>
     270             :     !>  [gram_type](@ref pm_distCov::gram_type)<br>
     271             :     !>  [dvine_type](@ref pm_distCov::dvine_type)<br>
     272             :     !>  [onion_type](@ref pm_distCov::onion_type)<br>
     273             :     !>  [getCovRand](@ref pm_distCov::getCovRand)<br>
     274             :     !>  [setCovRand](@ref pm_distCov::setCovRand)<br>
     275             :     !>
     276             :     !>  \test
     277             :     !>  [test_pm_distCov](@ref test_pm_distCov)<br>
     278             :     !>
     279             :     !>  \finmain{onion_type}
     280             :     !>
     281             :     !>  \author
     282             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     283             :     type onion_type
     284             :         integer(IK) :: info = 0_IK  !<  The scalar `integer` of default kind \IK, whose non-zero value indicates the Cholesky factorization failure within the Onion method.
     285             :     end type onion_type
     286             : 
     287             :     !>  \brief
     288             :     !>  The scalar module variable object of type [onion_type](@ref pm_distCov::onion_type) implying the use of the Onion
     289             :     !>  algorithm for generating random covariance matrices as described in algorithm of Lewandowski et al. (2009).<br>
     290             :     !>
     291             :     !>  \details
     292             :     !>  Unlike [dvine](@ref pm_distCov::dvine) which is a scalar `parameter`,
     293             :     !>  [onion](@ref pm_distCov::onion) is a **module variable**, whose presence is merely for convenience.<br>
     294             :     !>  As such, this variable's usage must be restricted to only experimental or serial applications, because **this object is not thread-safe**.<br>
     295             :     !>
     296             :     !>  \brief
     297             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
     298             :     !>
     299             :     !>  \interface{onion}
     300             :     !>  \code{.F90}
     301             :     !>
     302             :     !>      use pm_distCov, only: onion
     303             :     !>      print *, onion%info
     304             :     !>
     305             :     !>  \endcode
     306             :     !>
     307             :     !>  \warning
     308             :     !>  The use of module variable can become a thread safety problem in parallel shared memory applications.<br>
     309             :     !>  All it takes to resolve this thread safety is to not use this variable and declare a local object of type [onion_type](@ref pm_distCov::onion_type) instead.<br>
     310             :     !>
     311             :     !>  \note
     312             :     !>  See the documentation of [getCovRand](@ref pm_distCov::getCovRand) for example usage.<br>
     313             :     !>
     314             :     !>  \see
     315             :     !>  [gram](@ref pm_distCov::gram)<br>
     316             :     !>  [dvine](@ref pm_distCov::dvine)<br>
     317             :     !>  [onion](@ref pm_distCov::onion)<br>
     318             :     !>  [gram_type](@ref pm_distCov::gram_type)<br>
     319             :     !>  [dvine_type](@ref pm_distCov::dvine_type)<br>
     320             :     !>  [onion_type](@ref pm_distCov::onion_type)<br>
     321             :     !>  [getCovRand](@ref pm_distCov::getCovRand)<br>
     322             :     !>  [setCovRand](@ref pm_distCov::setCovRand)<br>
     323             :     !>
     324             :     !>  \test
     325             :     !>  [test_pm_distCov](@ref test_pm_distCov)<br>
     326             :     !>
     327             :     !>  \finmain{onion}
     328             :     !>
     329             :     !>  \author
     330             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     331             :     type(onion_type) :: onion = onion_type()
     332             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     333             :     !DIR$ ATTRIBUTES DLLEXPORT :: onion
     334             : #endif
     335             : 
     336             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     337             : 
     338             :     !>  \brief
     339             :     !>  Generate and return a random positive-definite (correlation or covariance) matrix using the Gram method.<br>
     340             :     !>
     341             :     !>  \brief
     342             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.<br>
     343             :     !>  See also [setCovRand](@ref pm_distCov::setCovRand) for generating random covariance matrices using the method of Dvine or Onion.<br>
     344             :     !>
     345             :     !>  \param[in]  mold        :   The input scalar of,
     346             :     !>                              <ol>
     347             :     !>                                  <li>    type `complex` of kind \CKALL,
     348             :     !>                                  <li>    type `real` of kind \RKALL,
     349             :     !>                              </ol>
     350             :     !>                              whose type and kind determines the type and kind of the output `rand`.<br>
     351             :     !>                              The value of `mold` is ignored entirely within the algorithm.<br>
     352             :     !>  \param[in]  ndim        :   The input positive scalar of type `integer` of default kind \IK,
     353             :     !>                              representing the rank of the matrix (the number of dimensions) of shape `(ndim, ndim)`.<br>
     354             :     !>                              (**optional**. It must be present **if and only if** the input `scale` argument is missing or is a scalar.)
     355             :     !>  \param[in]  scale       :   The input scalar or `contiguous` vector of size `ndim` of type `real` of the same kind as the output argument `rand`,
     356             :     !>                              representing the scale of the matrix (e.g., the standard deviation of a covariance matrix) along each dimension.<br>
     357             :     !>                              (**optional**. default = `1.`. It can be present **if and only if** it is a scalar or, it is a vector **and** the input argument `ndim` is missing.)
     358             :     !>
     359             :     !>  \return
     360             :     !>  `rand`                  :   The output matrix of shape `(1:ndim, 1:ndim)` of the same type and kind as the input argument `mold`,
     361             :     !>                              containing a random positive-definite matrix.<br>
     362             :     !>
     363             :     !>  \interface{getCovRand}
     364             :     !>  \code{.F90}
     365             :     !>
     366             :     !>      use pm_distCov, only: getCovRand
     367             :     !>
     368             :     !>      rand(1:ndim, 1:ndim) = getCovRand(mold, scale(1:ndim))
     369             :     !>      rand(1:ndim, 1:ndim) = getCovRand(mold, ndim, scale = scale)
     370             :     !>
     371             :     !>  \endcode
     372             :     !>
     373             :     !>  \warning
     374             :     !>  The condition `all([0 < scale])` must hold for the corresponding input arguments.<br>
     375             :     !>  \vericons
     376             :     !>
     377             :     !>  \example{getCovRand}
     378             :     !>  \include{lineno} example/pm_distCov/getCovRand/main.F90
     379             :     !>  \compilef{getCovRand}
     380             :     !>  \output{getCovRand}
     381             :     !>  \include{lineno} example/pm_distCov/getCovRand/main.out.F90
     382             :     !>
     383             :     !>  \test
     384             :     !>  [test_pm_distCov](@ref test_pm_distCov)
     385             :     !>
     386             :     !>  \finmain{getCovRand}
     387             :     !>
     388             :     !>  \author
     389             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     390             :     interface getCovRand
     391             : 
     392             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     393             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     394             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     395             : 
     396             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     397             : 
     398             : #if CK5_ENABLED
     399             :     impure module function getCovRandGRNGDS0_CK5(mold, ndim, scale) result(rand)
     400             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     401             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_CK5
     402             : #endif
     403             :         use pm_kind, only: CKC => CK5
     404             :         integer(IK)             , intent(in)                    :: ndim
     405             :         complex(CKC)            , intent(in)                    :: mold
     406             :         real(CKC)               , intent(in)    , optional      :: scale
     407             :         complex(CKC)                                            :: rand(ndim, ndim)
     408             :     end function
     409             : #endif
     410             : 
     411             : #if CK4_ENABLED
     412             :     impure module function getCovRandGRNGDS0_CK4(mold, ndim, scale) result(rand)
     413             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     414             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_CK4
     415             : #endif
     416             :         use pm_kind, only: CKC => CK4
     417             :         integer(IK)             , intent(in)                    :: ndim
     418             :         complex(CKC)            , intent(in)                    :: mold
     419             :         real(CKC)               , intent(in)    , optional      :: scale
     420             :         complex(CKC)                                            :: rand(ndim, ndim)
     421             :     end function
     422             : #endif
     423             : 
     424             : #if CK3_ENABLED
     425             :     impure module function getCovRandGRNGDS0_CK3(mold, ndim, scale) result(rand)
     426             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     427             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_CK3
     428             : #endif
     429             :         use pm_kind, only: CKC => CK3
     430             :         integer(IK)             , intent(in)                    :: ndim
     431             :         complex(CKC)            , intent(in)                    :: mold
     432             :         real(CKC)               , intent(in)    , optional      :: scale
     433             :         complex(CKC)                                            :: rand(ndim, ndim)
     434             :     end function
     435             : #endif
     436             : 
     437             : #if CK2_ENABLED
     438             :     impure module function getCovRandGRNGDS0_CK2(mold, ndim, scale) result(rand)
     439             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     440             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_CK2
     441             : #endif
     442             :         use pm_kind, only: CKC => CK2
     443             :         integer(IK)             , intent(in)                    :: ndim
     444             :         complex(CKC)            , intent(in)                    :: mold
     445             :         real(CKC)               , intent(in)    , optional      :: scale
     446             :         complex(CKC)                                            :: rand(ndim, ndim)
     447             :     end function
     448             : #endif
     449             : 
     450             : #if CK1_ENABLED
     451             :     impure module function getCovRandGRNGDS0_CK1(mold, ndim, scale) result(rand)
     452             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     453             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_CK1
     454             : #endif
     455             :         use pm_kind, only: CKC => CK1
     456             :         integer(IK)             , intent(in)                    :: ndim
     457             :         complex(CKC)            , intent(in)                    :: mold
     458             :         real(CKC)               , intent(in)    , optional      :: scale
     459             :         complex(CKC)                                            :: rand(ndim, ndim)
     460             :     end function
     461             : #endif
     462             : 
     463             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     464             : 
     465             : #if RK5_ENABLED
     466             :     impure module function getCovRandGRNGDS0_RK5(mold, ndim, scale) result(rand)
     467             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     468             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_RK5
     469             : #endif
     470             :         use pm_kind, only: RKC => RK5
     471             :         integer(IK)             , intent(in)                    :: ndim
     472             :         real(RKC)               , intent(in)                    :: mold
     473             :         real(RKC)               , intent(in)    , optional      :: scale
     474             :         real(RKC)                                               :: rand(ndim, ndim)
     475             :     end function
     476             : #endif
     477             : 
     478             : #if RK4_ENABLED
     479             :     impure module function getCovRandGRNGDS0_RK4(mold, ndim, scale) result(rand)
     480             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     481             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_RK4
     482             : #endif
     483             :         use pm_kind, only: RKC => RK4
     484             :         integer(IK)             , intent(in)                    :: ndim
     485             :         real(RKC)               , intent(in)                    :: mold
     486             :         real(RKC)               , intent(in)    , optional      :: scale
     487             :         real(RKC)                                               :: rand(ndim, ndim)
     488             :     end function
     489             : #endif
     490             : 
     491             : #if RK3_ENABLED
     492             :     impure module function getCovRandGRNGDS0_RK3(mold, ndim, scale) result(rand)
     493             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     494             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_RK3
     495             : #endif
     496             :         use pm_kind, only: RKC => RK3
     497             :         integer(IK)             , intent(in)                    :: ndim
     498             :         real(RKC)               , intent(in)                    :: mold
     499             :         real(RKC)               , intent(in)    , optional      :: scale
     500             :         real(RKC)                                               :: rand(ndim, ndim)
     501             :     end function
     502             : #endif
     503             : 
     504             : #if RK2_ENABLED
     505             :     impure module function getCovRandGRNGDS0_RK2(mold, ndim, scale) result(rand)
     506             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     507             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_RK2
     508             : #endif
     509             :         use pm_kind, only: RKC => RK2
     510             :         integer(IK)             , intent(in)                    :: ndim
     511             :         real(RKC)               , intent(in)                    :: mold
     512             :         real(RKC)               , intent(in)    , optional      :: scale
     513             :         real(RKC)                                               :: rand(ndim, ndim)
     514             :     end function
     515             : #endif
     516             : 
     517             : #if RK1_ENABLED
     518             :     impure module function getCovRandGRNGDS0_RK1(mold, ndim, scale) result(rand)
     519             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     520             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS0_RK1
     521             : #endif
     522             :         use pm_kind, only: RKC => RK1
     523             :         integer(IK)             , intent(in)                    :: ndim
     524             :         real(RKC)               , intent(in)                    :: mold
     525             :         real(RKC)               , intent(in)    , optional      :: scale
     526             :         real(RKC)                                               :: rand(ndim, ndim)
     527             :     end function
     528             : #endif
     529             : 
     530             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     531             : 
     532             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     533             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     534             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     535             : 
     536             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     537             : 
     538             : #if CK5_ENABLED
     539             :     impure module function getCovRandGRNGDS1_CK5(mold, scale) result(rand)
     540             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     541             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_CK5
     542             : #endif
     543             :         use pm_kind, only: CKC => CK5
     544             :         complex(CKC)            , intent(in)                    :: mold
     545             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
     546             :         complex(CKC)                                            :: rand(size(scale, 1, IK), size(scale, 1, IK))
     547             :     end function
     548             : #endif
     549             : 
     550             : #if CK4_ENABLED
     551             :     impure module function getCovRandGRNGDS1_CK4(mold, scale) result(rand)
     552             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     553             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_CK4
     554             : #endif
     555             :         use pm_kind, only: CKC => CK4
     556             :         complex(CKC)            , intent(in)                    :: mold
     557             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
     558             :         complex(CKC)                                            :: rand(size(scale, 1, IK), size(scale, 1, IK))
     559             :     end function
     560             : #endif
     561             : 
     562             : #if CK3_ENABLED
     563             :     impure module function getCovRandGRNGDS1_CK3(mold, scale) result(rand)
     564             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     565             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_CK3
     566             : #endif
     567             :         use pm_kind, only: CKC => CK3
     568             :         complex(CKC)            , intent(in)                    :: mold
     569             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
     570             :         complex(CKC)                                            :: rand(size(scale, 1, IK), size(scale, 1, IK))
     571             :     end function
     572             : #endif
     573             : 
     574             : #if CK2_ENABLED
     575             :     impure module function getCovRandGRNGDS1_CK2(mold, scale) result(rand)
     576             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     577             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_CK2
     578             : #endif
     579             :         use pm_kind, only: CKC => CK2
     580             :         complex(CKC)            , intent(in)                    :: mold
     581             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
     582             :         complex(CKC)                                            :: rand(size(scale, 1, IK), size(scale, 1, IK))
     583             :     end function
     584             : #endif
     585             : 
     586             : #if CK1_ENABLED
     587             :     impure module function getCovRandGRNGDS1_CK1(mold, scale) result(rand)
     588             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     589             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_CK1
     590             : #endif
     591             :         use pm_kind, only: CKC => CK1
     592             :         complex(CKC)            , intent(in)                    :: mold
     593             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
     594             :         complex(CKC)                                            :: rand(size(scale, 1, IK), size(scale, 1, IK))
     595             :     end function
     596             : #endif
     597             : 
     598             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     599             : 
     600             : #if RK5_ENABLED
     601             :     impure module function getCovRandGRNGDS1_RK5(mold, scale) result(rand)
     602             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     603             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_RK5
     604             : #endif
     605             :         use pm_kind, only: RKC => RK5
     606             :         real(RKC)               , intent(in)                    :: mold
     607             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     608             :         real(RKC)                                               :: rand(size(scale, 1, IK), size(scale, 1, IK))
     609             :     end function
     610             : #endif
     611             : 
     612             : #if RK4_ENABLED
     613             :     impure module function getCovRandGRNGDS1_RK4(mold, scale) result(rand)
     614             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     615             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_RK4
     616             : #endif
     617             :         use pm_kind, only: RKC => RK4
     618             :         real(RKC)               , intent(in)                    :: mold
     619             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     620             :         real(RKC)                                               :: rand(size(scale, 1, IK), size(scale, 1, IK))
     621             :     end function
     622             : #endif
     623             : 
     624             : #if RK3_ENABLED
     625             :     impure module function getCovRandGRNGDS1_RK3(mold, scale) result(rand)
     626             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     627             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_RK3
     628             : #endif
     629             :         use pm_kind, only: RKC => RK3
     630             :         real(RKC)               , intent(in)                    :: mold
     631             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     632             :         real(RKC)                                               :: rand(size(scale, 1, IK), size(scale, 1, IK))
     633             :     end function
     634             : #endif
     635             : 
     636             : #if RK2_ENABLED
     637             :     impure module function getCovRandGRNGDS1_RK2(mold, scale) result(rand)
     638             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     639             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_RK2
     640             : #endif
     641             :         use pm_kind, only: RKC => RK2
     642             :         real(RKC)               , intent(in)                    :: mold
     643             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     644             :         real(RKC)                                               :: rand(size(scale, 1, IK), size(scale, 1, IK))
     645             :     end function
     646             : #endif
     647             : 
     648             : #if RK1_ENABLED
     649             :     impure module function getCovRandGRNGDS1_RK1(mold, scale) result(rand)
     650             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     651             :         !DEC$ ATTRIBUTES DLLEXPORT :: getCovRandGRNGDS1_RK1
     652             : #endif
     653             :         use pm_kind, only: RKC => RK1
     654             :         real(RKC)               , intent(in)                    :: mold
     655             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     656             :         real(RKC)                                               :: rand(size(scale, 1, IK), size(scale, 1, IK))
     657             :     end function
     658             : #endif
     659             : 
     660             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     661             : 
     662             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     663             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     664             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     665             : 
     666             :     end interface
     667             : 
     668             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     669             : 
     670             :     !>  \brief
     671             :     !>  Return a random positive-definite power-law-distributed (correlation) matrix.<br>
     672             :     !>
     673             :     !>  \brief
     674             :     !>  See the documentation of [pm_distCov](@ref pm_distCov) for details.
     675             :     !>
     676             :     !>  \param[inout]   rng     :   The input/output scalar that can be an object of,
     677             :     !>                              <ol>
     678             :     !>                                  <li>    type [rngf_type](@ref pm_distUnif::rngf_type),
     679             :     !>                                          implying the use of intrinsic Fortran uniform RNG.<br>
     680             :     !>                                  <li>    type [xoshiro256ssw_type](@ref pm_distUnif::xoshiro256ssw_type),
     681             :     !>                                          implying the use of [xoshiro256**](https://prng.di.unimi.it/) uniform RNG.<br>
     682             :     !>                              </ol>
     683             :     !>  \param[out]     rand    :   The output matrix of shape `(1:ndim, 1:ndim)` of,<br>
     684             :     !>                              <ol>
     685             :     !>                                  <li>    type `complex` of kind \CKALL,
     686             :     !>                                  <li>    type `real` of kind \RKALL,
     687             :     !>                              </ol>
     688             :     !>                              containing a random (optionally power-law-distributed determinant) positive-definite matrix.<br>
     689             :     !>                              The output `rand` can of `complex` type **if and only if** the optional input argument `method` is missing.<br>
     690             :     !>  \param[inout]   method  :   The input/output scalar constant that can be one of the following:
     691             :     !>                              <ol>
     692             :     !>                                  <li>    The scalar input constant [dvine](@ref pm_distCov::dvine) implying the use of the Dvine
     693             :     !>                                          algorithm for generating random covariance matrices whose determinants are
     694             :     !>                                          [power-law distributed](@ref pm_distPower) with exponent `eta`.<br>
     695             :     !>                                          In this case, the argument `method` has `intent(in)`.<br>
     696             :     !>                                  <li>    A scalar output variable of type [onion_type](@ref pm_distCov::onion_type)
     697             :     !>                                          such as [onion](@ref pm_distCov::onion) implying the use of the Onion
     698             :     !>                                          algorithm for generating random covariance matrices whose determinants are
     699             :     !>                                          [power-law distributed](@ref pm_distPower) with exponent `eta`.<br>
     700             :     !>                                          In this case, the argument `method` has `intent(out)`.<br>
     701             :     !>                                          If the Cholesky factorization within the Onion algorithm fails,
     702             :     !>                                          `method%info` will be set to the order of the leading minor of
     703             :     !>                                          the specified input subset of `mat` that is not positive definite,
     704             :     !>                                          indicating the occurrence of an error and that the factorization could not be completed.<br>
     705             :     !>                                          Otherwise, the `info` component of the onion `method` is set to `0`.<br>
     706             :     !>                              </ol>
     707             :     !>                              The resulting matrix distribution from [dvine](@ref pm_distCov::dvine) and [onion](@ref pm_distCov::onion)
     708             :     !>                              are identically distributed but [onion](@ref pm_distCov::onion) method tends to have slightly faster runtime.<br>
     709             :     !>                              The larger `eta` is, the more the output random matrix looks like the Identity matrix.<br>
     710             :     !>                              Setting `eta = 0.` corresponds to a uniform distribution of the output matrix
     711             :     !>                              over the space of positive-definite correlation matrices.<br>
     712             :     !>                              See the description of the output argument `rand` for more information on the
     713             :     !>                              effects of `eta` on the off-diagonal elements of the output positive-definite matrix.<br>
     714             :     !>                              (**optional**. If missing the Gram method is used for random matrix generation. It must be missing for output `rand` of type `complex`.)
     715             :     !>  \param[in]      eta     :   The input non-negative scalar of type `real` of the same kind as the output argument `rand`.<br>
     716             :     !>                              The larger `eta` is, the more the output random matrix looks like the Identity matrix.<br>
     717             :     !>                              Setting `eta = 0.` corresponds to a uniform distribution of the output matrix
     718             :     !>                              over the space of positive-definite correlation matrices.<br>
     719             :     !>                              See the description of the output argument `rand` for more information on the
     720             :     !>                              effects of `eta` on the off-diagonal elements of the output positive-definite matrix.<br>
     721             :     !>                              (**optional**. It must be present **if and only if** the input argument `method` is also present.)
     722             :     !>  \param[in]      scale   :   The input scalar or `contiguous` vector of size `ndim` of type `real` of the same kind as the output argument `rand`,
     723             :     !>                              representing the scale of the matrix (e.g., the standard deviation of a covariance matrix) along each dimension.<br>
     724             :     !>                              (**optional**. default = `1.`)
     725             :     !>
     726             :     !>  \interface{setCovRand}
     727             :     !>  \code{.F90}
     728             :     !>
     729             :     !>      use pm_distCov, only: setCovRand
     730             :     !>
     731             :     !>      ! Default (Gram) method.
     732             :     !>
     733             :     !>      call setCovRand(rng, rand(1:ndim, 1:ndim))
     734             :     !>      call setCovRand(rng, rand(1:ndim, 1:ndim), scale)
     735             :     !>      call setCovRand(rng, rand(1:ndim, 1:ndim), scale(1:ndim))
     736             :     !>
     737             :     !>      ! Other methods.
     738             :     !>
     739             :     !>      call setCovRand(rng, rand(1:ndim, 1:ndim), method, eta)
     740             :     !>      call setCovRand(rng, rand(1:ndim, 1:ndim), method, eta, scale)
     741             :     !>      call setCovRand(rng, rand(1:ndim, 1:ndim), method, eta, scale(1:ndim))
     742             :     !>
     743             :     !>  \endcode
     744             :     !>
     745             :     !>  \warning
     746             :     !>  The condition `0 <= eta` must hold for the corresponding input arguments.<br>
     747             :     !>  The condition `all([0 < scale])` must hold for the corresponding input arguments.<br>
     748             :     !>  The condition `size(rand, 1) == size(rand, 2)` must hold for the corresponding input arguments.<br>
     749             :     !>  The condition `rank(scale) == 0 .or. all(size(scale) == shape(rand))` must hold for the corresponding input arguments.<br>
     750             :     !>  \vericons
     751             :     !>
     752             :     !>  \example{setCovRand}
     753             :     !>  \include{lineno} example/pm_distCov/setCovRand/main.F90
     754             :     !>  \compilef{setCovRand}
     755             :     !>  \output{setCovRand}
     756             :     !>  \include{lineno} example/pm_distCov/setCovRand/main.out.F90
     757             :     !>
     758             :     !>  \test
     759             :     !>  [test_pm_distCov](@ref test_pm_distCov)
     760             :     !>
     761             :     !>  \todo
     762             :     !>  \phigh
     763             :     !>  The current implementation of this generic interface uses a naive method of computing the Cholesky factorization with a default matrix packing for the Onion method.<br>
     764             :     !>  The RFP packing format must be also implemented for this generic interface.<br>
     765             :     !>
     766             :     !>  \todo
     767             :     !>  \phigh
     768             :     !>  The current implementation of the Gram method can be significantly improved, both computationally and functionally.<br>
     769             :     !>
     770             :     !>  \finmain{setCovRand}
     771             :     !>
     772             :     !>  \author
     773             :     !>  \AmirShahmoradi, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.<br>
     774             : 
     775             :     ! setCovRandG RK
     776             : 
     777             :     interface setCovRand
     778             : 
     779             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     780             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     781             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     782             : 
     783             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     784             : 
     785             : #if RK5_ENABLED
     786             :     module subroutine setCovRandGRNGFSD_RK5(rng, rand)
     787             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     788             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_RK5
     789             : #endif
     790             :         use pm_kind, only: RKC => RK5
     791             :         type(rngf_type)         , intent(in)                    :: rng
     792             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     793             :     end subroutine
     794             : #endif
     795             : 
     796             : #if RK4_ENABLED
     797             :     module subroutine setCovRandGRNGFSD_RK4(rng, rand)
     798             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     799             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_RK4
     800             : #endif
     801             :         use pm_kind, only: RKC => RK4
     802             :         type(rngf_type)         , intent(in)                    :: rng
     803             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     804             :     end subroutine
     805             : #endif
     806             : 
     807             : #if RK3_ENABLED
     808             :     module subroutine setCovRandGRNGFSD_RK3(rng, rand)
     809             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     810             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_RK3
     811             : #endif
     812             :         use pm_kind, only: RKC => RK3
     813             :         type(rngf_type)         , intent(in)                    :: rng
     814             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     815             :     end subroutine
     816             : #endif
     817             : 
     818             : #if RK2_ENABLED
     819             :     module subroutine setCovRandGRNGFSD_RK2(rng, rand)
     820             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     821             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_RK2
     822             : #endif
     823             :         use pm_kind, only: RKC => RK2
     824             :         type(rngf_type)         , intent(in)                    :: rng
     825             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     826             :     end subroutine
     827             : #endif
     828             : 
     829             : #if RK1_ENABLED
     830             :     module subroutine setCovRandGRNGFSD_RK1(rng, rand)
     831             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     832             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_RK1
     833             : #endif
     834             :         use pm_kind, only: RKC => RK1
     835             :         type(rngf_type)         , intent(in)                    :: rng
     836             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     837             :     end subroutine
     838             : #endif
     839             : 
     840             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     841             : 
     842             : #if RK5_ENABLED
     843             :     module subroutine setCovRandGRNGFS0_RK5(rng, rand, scale)
     844             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     845             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_RK5
     846             : #endif
     847             :         use pm_kind, only: RKC => RK5
     848             :         type(rngf_type)         , intent(in)                    :: rng
     849             :         real(RKC)               , intent(in)                    :: scale
     850             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     851             :     end subroutine
     852             : #endif
     853             : 
     854             : #if RK4_ENABLED
     855             :     module subroutine setCovRandGRNGFS0_RK4(rng, rand, scale)
     856             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     857             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_RK4
     858             : #endif
     859             :         use pm_kind, only: RKC => RK4
     860             :         type(rngf_type)         , intent(in)                    :: rng
     861             :         real(RKC)               , intent(in)                    :: scale
     862             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     863             :     end subroutine
     864             : #endif
     865             : 
     866             : #if RK3_ENABLED
     867             :     module subroutine setCovRandGRNGFS0_RK3(rng, rand, scale)
     868             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     869             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_RK3
     870             : #endif
     871             :         use pm_kind, only: RKC => RK3
     872             :         type(rngf_type)         , intent(in)                    :: rng
     873             :         real(RKC)               , intent(in)                    :: scale
     874             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     875             :     end subroutine
     876             : #endif
     877             : 
     878             : #if RK2_ENABLED
     879             :     module subroutine setCovRandGRNGFS0_RK2(rng, rand, scale)
     880             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     881             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_RK2
     882             : #endif
     883             :         use pm_kind, only: RKC => RK2
     884             :         type(rngf_type)         , intent(in)                    :: rng
     885             :         real(RKC)               , intent(in)                    :: scale
     886             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     887             :     end subroutine
     888             : #endif
     889             : 
     890             : #if RK1_ENABLED
     891             :     module subroutine setCovRandGRNGFS0_RK1(rng, rand, scale)
     892             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     893             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_RK1
     894             : #endif
     895             :         use pm_kind, only: RKC => RK1
     896             :         type(rngf_type)         , intent(in)                    :: rng
     897             :         real(RKC)               , intent(in)                    :: scale
     898             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     899             :     end subroutine
     900             : #endif
     901             : 
     902             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     903             : 
     904             : #if RK5_ENABLED
     905             :     module subroutine setCovRandGRNGFS1_RK5(rng, rand, scale)
     906             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     907             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_RK5
     908             : #endif
     909             :         use pm_kind, only: RKC => RK5
     910             :         type(rngf_type)         , intent(in)                    :: rng
     911             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     912             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     913             :     end subroutine
     914             : #endif
     915             : 
     916             : #if RK4_ENABLED
     917             :     module subroutine setCovRandGRNGFS1_RK4(rng, rand, scale)
     918             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     919             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_RK4
     920             : #endif
     921             :         use pm_kind, only: RKC => RK4
     922             :         type(rngf_type)         , intent(in)                    :: rng
     923             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     924             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     925             :     end subroutine
     926             : #endif
     927             : 
     928             : #if RK3_ENABLED
     929             :     module subroutine setCovRandGRNGFS1_RK3(rng, rand, scale)
     930             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     931             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_RK3
     932             : #endif
     933             :         use pm_kind, only: RKC => RK3
     934             :         type(rngf_type)         , intent(in)                    :: rng
     935             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     936             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     937             :     end subroutine
     938             : #endif
     939             : 
     940             : #if RK2_ENABLED
     941             :     module subroutine setCovRandGRNGFS1_RK2(rng, rand, scale)
     942             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     943             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_RK2
     944             : #endif
     945             :         use pm_kind, only: RKC => RK2
     946             :         type(rngf_type)         , intent(in)                    :: rng
     947             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     948             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     949             :     end subroutine
     950             : #endif
     951             : 
     952             : #if RK1_ENABLED
     953             :     module subroutine setCovRandGRNGFS1_RK1(rng, rand, scale)
     954             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     955             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_RK1
     956             : #endif
     957             :         use pm_kind, only: RKC => RK1
     958             :         type(rngf_type)         , intent(in)                    :: rng
     959             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
     960             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     961             :     end subroutine
     962             : #endif
     963             : 
     964             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     965             : 
     966             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     967             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     968             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     969             : 
     970             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     971             : 
     972             : #if RK5_ENABLED
     973             :     PURE module subroutine setCovRandGRNGXSD_RK5(rng, rand)
     974             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     975             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_RK5
     976             : #endif
     977             :         use pm_kind, only: RKC => RK5
     978             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
     979             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     980             :     end subroutine
     981             : #endif
     982             : 
     983             : #if RK4_ENABLED
     984             :     PURE module subroutine setCovRandGRNGXSD_RK4(rng, rand)
     985             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     986             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_RK4
     987             : #endif
     988             :         use pm_kind, only: RKC => RK4
     989             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
     990             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
     991             :     end subroutine
     992             : #endif
     993             : 
     994             : #if RK3_ENABLED
     995             :     PURE module subroutine setCovRandGRNGXSD_RK3(rng, rand)
     996             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
     997             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_RK3
     998             : #endif
     999             :         use pm_kind, only: RKC => RK3
    1000             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1001             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1002             :     end subroutine
    1003             : #endif
    1004             : 
    1005             : #if RK2_ENABLED
    1006             :     PURE module subroutine setCovRandGRNGXSD_RK2(rng, rand)
    1007             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1008             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_RK2
    1009             : #endif
    1010             :         use pm_kind, only: RKC => RK2
    1011             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1012             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1013             :     end subroutine
    1014             : #endif
    1015             : 
    1016             : #if RK1_ENABLED
    1017             :     PURE module subroutine setCovRandGRNGXSD_RK1(rng, rand)
    1018             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1019             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_RK1
    1020             : #endif
    1021             :         use pm_kind, only: RKC => RK1
    1022             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1023             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1024             :     end subroutine
    1025             : #endif
    1026             : 
    1027             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1028             : 
    1029             : #if RK5_ENABLED
    1030             :     PURE module subroutine setCovRandGRNGXS0_RK5(rng, rand, scale)
    1031             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1032             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_RK5
    1033             : #endif
    1034             :         use pm_kind, only: RKC => RK5
    1035             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1036             :         real(RKC)               , intent(in)                    :: scale
    1037             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1038             :     end subroutine
    1039             : #endif
    1040             : 
    1041             : #if RK4_ENABLED
    1042             :     PURE module subroutine setCovRandGRNGXS0_RK4(rng, rand, scale)
    1043             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1044             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_RK4
    1045             : #endif
    1046             :         use pm_kind, only: RKC => RK4
    1047             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1048             :         real(RKC)               , intent(in)                    :: scale
    1049             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1050             :     end subroutine
    1051             : #endif
    1052             : 
    1053             : #if RK3_ENABLED
    1054             :     PURE module subroutine setCovRandGRNGXS0_RK3(rng, rand, scale)
    1055             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1056             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_RK3
    1057             : #endif
    1058             :         use pm_kind, only: RKC => RK3
    1059             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1060             :         real(RKC)               , intent(in)                    :: scale
    1061             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1062             :     end subroutine
    1063             : #endif
    1064             : 
    1065             : #if RK2_ENABLED
    1066             :     PURE module subroutine setCovRandGRNGXS0_RK2(rng, rand, scale)
    1067             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1068             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_RK2
    1069             : #endif
    1070             :         use pm_kind, only: RKC => RK2
    1071             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1072             :         real(RKC)               , intent(in)                    :: scale
    1073             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1074             :     end subroutine
    1075             : #endif
    1076             : 
    1077             : #if RK1_ENABLED
    1078             :     PURE module subroutine setCovRandGRNGXS0_RK1(rng, rand, scale)
    1079             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1080             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_RK1
    1081             : #endif
    1082             :         use pm_kind, only: RKC => RK1
    1083             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1084             :         real(RKC)               , intent(in)                    :: scale
    1085             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1086             :     end subroutine
    1087             : #endif
    1088             : 
    1089             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1090             : 
    1091             : #if RK5_ENABLED
    1092             :     PURE module subroutine setCovRandGRNGXS1_RK5(rng, rand, scale)
    1093             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1094             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_RK5
    1095             : #endif
    1096             :         use pm_kind, only: RKC => RK5
    1097             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1098             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1099             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1100             :     end subroutine
    1101             : #endif
    1102             : 
    1103             : #if RK4_ENABLED
    1104             :     PURE module subroutine setCovRandGRNGXS1_RK4(rng, rand, scale)
    1105             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1106             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_RK4
    1107             : #endif
    1108             :         use pm_kind, only: RKC => RK4
    1109             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1110             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1111             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1112             :     end subroutine
    1113             : #endif
    1114             : 
    1115             : #if RK3_ENABLED
    1116             :     PURE module subroutine setCovRandGRNGXS1_RK3(rng, rand, scale)
    1117             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1118             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_RK3
    1119             : #endif
    1120             :         use pm_kind, only: RKC => RK3
    1121             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1122             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1123             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1124             :     end subroutine
    1125             : #endif
    1126             : 
    1127             : #if RK2_ENABLED
    1128             :     PURE module subroutine setCovRandGRNGXS1_RK2(rng, rand, scale)
    1129             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1130             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_RK2
    1131             : #endif
    1132             :         use pm_kind, only: RKC => RK2
    1133             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1134             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1135             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1136             :     end subroutine
    1137             : #endif
    1138             : 
    1139             : #if RK1_ENABLED
    1140             :     PURE module subroutine setCovRandGRNGXS1_RK1(rng, rand, scale)
    1141             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1142             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_RK1
    1143             : #endif
    1144             :         use pm_kind, only: RKC => RK1
    1145             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1146             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1147             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1148             :     end subroutine
    1149             : #endif
    1150             : 
    1151             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1152             : 
    1153             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1154             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1155             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1156             : 
    1157             :     end interface
    1158             : 
    1159             :     ! setCovRandG CK
    1160             : 
    1161             :     interface setCovRand
    1162             : 
    1163             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1164             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1165             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1166             : 
    1167             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1168             : 
    1169             : #if CK5_ENABLED
    1170             :     module subroutine setCovRandGRNGFSD_CK5(rng, rand)
    1171             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1172             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_CK5
    1173             : #endif
    1174             :         use pm_kind, only: CKC => CK5
    1175             :         type(rngf_type)         , intent(in)                    :: rng
    1176             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1177             :     end subroutine
    1178             : #endif
    1179             : 
    1180             : #if CK4_ENABLED
    1181             :     module subroutine setCovRandGRNGFSD_CK4(rng, rand)
    1182             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1183             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_CK4
    1184             : #endif
    1185             :         use pm_kind, only: CKC => CK4
    1186             :         type(rngf_type)         , intent(in)                    :: rng
    1187             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1188             :     end subroutine
    1189             : #endif
    1190             : 
    1191             : #if CK3_ENABLED
    1192             :     module subroutine setCovRandGRNGFSD_CK3(rng, rand)
    1193             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1194             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_CK3
    1195             : #endif
    1196             :         use pm_kind, only: CKC => CK3
    1197             :         type(rngf_type)         , intent(in)                    :: rng
    1198             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1199             :     end subroutine
    1200             : #endif
    1201             : 
    1202             : #if CK2_ENABLED
    1203             :     module subroutine setCovRandGRNGFSD_CK2(rng, rand)
    1204             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1205             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_CK2
    1206             : #endif
    1207             :         use pm_kind, only: CKC => CK2
    1208             :         type(rngf_type)         , intent(in)                    :: rng
    1209             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1210             :     end subroutine
    1211             : #endif
    1212             : 
    1213             : #if CK1_ENABLED
    1214             :     module subroutine setCovRandGRNGFSD_CK1(rng, rand)
    1215             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1216             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFSD_CK1
    1217             : #endif
    1218             :         use pm_kind, only: CKC => CK1
    1219             :         type(rngf_type)         , intent(in)                    :: rng
    1220             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1221             :     end subroutine
    1222             : #endif
    1223             : 
    1224             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1225             : 
    1226             : #if CK5_ENABLED
    1227             :     module subroutine setCovRandGRNGFS0_CK5(rng, rand, scale)
    1228             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1229             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_CK5
    1230             : #endif
    1231             :         use pm_kind, only: CKC => CK5
    1232             :         type(rngf_type)         , intent(in)                    :: rng
    1233             :         real(CKC)               , intent(in)                    :: scale
    1234             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1235             :     end subroutine
    1236             : #endif
    1237             : 
    1238             : #if CK4_ENABLED
    1239             :     module subroutine setCovRandGRNGFS0_CK4(rng, rand, scale)
    1240             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1241             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_CK4
    1242             : #endif
    1243             :         use pm_kind, only: CKC => CK4
    1244             :         type(rngf_type)         , intent(in)                    :: rng
    1245             :         real(CKC)               , intent(in)                    :: scale
    1246             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1247             :     end subroutine
    1248             : #endif
    1249             : 
    1250             : #if CK3_ENABLED
    1251             :     module subroutine setCovRandGRNGFS0_CK3(rng, rand, scale)
    1252             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1253             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_CK3
    1254             : #endif
    1255             :         use pm_kind, only: CKC => CK3
    1256             :         type(rngf_type)         , intent(in)                    :: rng
    1257             :         real(CKC)               , intent(in)                    :: scale
    1258             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1259             :     end subroutine
    1260             : #endif
    1261             : 
    1262             : #if CK2_ENABLED
    1263             :     module subroutine setCovRandGRNGFS0_CK2(rng, rand, scale)
    1264             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1265             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_CK2
    1266             : #endif
    1267             :         use pm_kind, only: CKC => CK2
    1268             :         type(rngf_type)         , intent(in)                    :: rng
    1269             :         real(CKC)               , intent(in)                    :: scale
    1270             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1271             :     end subroutine
    1272             : #endif
    1273             : 
    1274             : #if CK1_ENABLED
    1275             :     module subroutine setCovRandGRNGFS0_CK1(rng, rand, scale)
    1276             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1277             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS0_CK1
    1278             : #endif
    1279             :         use pm_kind, only: CKC => CK1
    1280             :         type(rngf_type)         , intent(in)                    :: rng
    1281             :         real(CKC)               , intent(in)                    :: scale
    1282             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1283             :     end subroutine
    1284             : #endif
    1285             : 
    1286             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1287             : 
    1288             : #if CK5_ENABLED
    1289             :     module subroutine setCovRandGRNGFS1_CK5(rng, rand, scale)
    1290             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1291             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_CK5
    1292             : #endif
    1293             :         use pm_kind, only: CKC => CK5
    1294             :         type(rngf_type)         , intent(in)                    :: rng
    1295             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1296             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1297             :     end subroutine
    1298             : #endif
    1299             : 
    1300             : #if CK4_ENABLED
    1301             :     module subroutine setCovRandGRNGFS1_CK4(rng, rand, scale)
    1302             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1303             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_CK4
    1304             : #endif
    1305             :         use pm_kind, only: CKC => CK4
    1306             :         type(rngf_type)         , intent(in)                    :: rng
    1307             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1308             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1309             :     end subroutine
    1310             : #endif
    1311             : 
    1312             : #if CK3_ENABLED
    1313             :     module subroutine setCovRandGRNGFS1_CK3(rng, rand, scale)
    1314             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1315             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_CK3
    1316             : #endif
    1317             :         use pm_kind, only: CKC => CK3
    1318             :         type(rngf_type)         , intent(in)                    :: rng
    1319             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1320             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1321             :     end subroutine
    1322             : #endif
    1323             : 
    1324             : #if CK2_ENABLED
    1325             :     module subroutine setCovRandGRNGFS1_CK2(rng, rand, scale)
    1326             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1327             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_CK2
    1328             : #endif
    1329             :         use pm_kind, only: CKC => CK2
    1330             :         type(rngf_type)         , intent(in)                    :: rng
    1331             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1332             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1333             :     end subroutine
    1334             : #endif
    1335             : 
    1336             : #if CK1_ENABLED
    1337             :     module subroutine setCovRandGRNGFS1_CK1(rng, rand, scale)
    1338             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1339             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGFS1_CK1
    1340             : #endif
    1341             :         use pm_kind, only: CKC => CK1
    1342             :         type(rngf_type)         , intent(in)                    :: rng
    1343             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1344             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1345             :     end subroutine
    1346             : #endif
    1347             : 
    1348             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1349             : 
    1350             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1351             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1352             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1353             : 
    1354             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1355             : 
    1356             : #if CK5_ENABLED
    1357             :     PURE module subroutine setCovRandGRNGXSD_CK5(rng, rand)
    1358             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1359             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_CK5
    1360             : #endif
    1361             :         use pm_kind, only: CKC => CK5
    1362             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1363             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1364             :     end subroutine
    1365             : #endif
    1366             : 
    1367             : #if CK4_ENABLED
    1368             :     PURE module subroutine setCovRandGRNGXSD_CK4(rng, rand)
    1369             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1370             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_CK4
    1371             : #endif
    1372             :         use pm_kind, only: CKC => CK4
    1373             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1374             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1375             :     end subroutine
    1376             : #endif
    1377             : 
    1378             : #if CK3_ENABLED
    1379             :     PURE module subroutine setCovRandGRNGXSD_CK3(rng, rand)
    1380             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1381             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_CK3
    1382             : #endif
    1383             :         use pm_kind, only: CKC => CK3
    1384             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1385             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1386             :     end subroutine
    1387             : #endif
    1388             : 
    1389             : #if CK2_ENABLED
    1390             :     PURE module subroutine setCovRandGRNGXSD_CK2(rng, rand)
    1391             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1392             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_CK2
    1393             : #endif
    1394             :         use pm_kind, only: CKC => CK2
    1395             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1396             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1397             :     end subroutine
    1398             : #endif
    1399             : 
    1400             : #if CK1_ENABLED
    1401             :     PURE module subroutine setCovRandGRNGXSD_CK1(rng, rand)
    1402             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1403             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXSD_CK1
    1404             : #endif
    1405             :         use pm_kind, only: CKC => CK1
    1406             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1407             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1408             :     end subroutine
    1409             : #endif
    1410             : 
    1411             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1412             : 
    1413             : #if CK5_ENABLED
    1414             :     PURE module subroutine setCovRandGRNGXS0_CK5(rng, rand, scale)
    1415             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1416             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_CK5
    1417             : #endif
    1418             :         use pm_kind, only: CKC => CK5
    1419             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1420             :         real(CKC)               , intent(in)                    :: scale
    1421             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1422             :     end subroutine
    1423             : #endif
    1424             : 
    1425             : #if CK4_ENABLED
    1426             :     PURE module subroutine setCovRandGRNGXS0_CK4(rng, rand, scale)
    1427             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1428             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_CK4
    1429             : #endif
    1430             :         use pm_kind, only: CKC => CK4
    1431             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1432             :         real(CKC)               , intent(in)                    :: scale
    1433             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1434             :     end subroutine
    1435             : #endif
    1436             : 
    1437             : #if CK3_ENABLED
    1438             :     PURE module subroutine setCovRandGRNGXS0_CK3(rng, rand, scale)
    1439             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1440             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_CK3
    1441             : #endif
    1442             :         use pm_kind, only: CKC => CK3
    1443             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1444             :         real(CKC)               , intent(in)                    :: scale
    1445             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1446             :     end subroutine
    1447             : #endif
    1448             : 
    1449             : #if CK2_ENABLED
    1450             :     PURE module subroutine setCovRandGRNGXS0_CK2(rng, rand, scale)
    1451             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1452             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_CK2
    1453             : #endif
    1454             :         use pm_kind, only: CKC => CK2
    1455             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1456             :         real(CKC)               , intent(in)                    :: scale
    1457             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1458             :     end subroutine
    1459             : #endif
    1460             : 
    1461             : #if CK1_ENABLED
    1462             :     PURE module subroutine setCovRandGRNGXS0_CK1(rng, rand, scale)
    1463             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1464             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS0_CK1
    1465             : #endif
    1466             :         use pm_kind, only: CKC => CK1
    1467             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1468             :         real(CKC)               , intent(in)                    :: scale
    1469             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1470             :     end subroutine
    1471             : #endif
    1472             : 
    1473             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1474             : 
    1475             : #if CK5_ENABLED
    1476             :     PURE module subroutine setCovRandGRNGXS1_CK5(rng, rand, scale)
    1477             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1478             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_CK5
    1479             : #endif
    1480             :         use pm_kind, only: CKC => CK5
    1481             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1482             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1483             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1484             :     end subroutine
    1485             : #endif
    1486             : 
    1487             : #if CK4_ENABLED
    1488             :     PURE module subroutine setCovRandGRNGXS1_CK4(rng, rand, scale)
    1489             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1490             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_CK4
    1491             : #endif
    1492             :         use pm_kind, only: CKC => CK4
    1493             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1494             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1495             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1496             :     end subroutine
    1497             : #endif
    1498             : 
    1499             : #if CK3_ENABLED
    1500             :     PURE module subroutine setCovRandGRNGXS1_CK3(rng, rand, scale)
    1501             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1502             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_CK3
    1503             : #endif
    1504             :         use pm_kind, only: CKC => CK3
    1505             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1506             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1507             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1508             :     end subroutine
    1509             : #endif
    1510             : 
    1511             : #if CK2_ENABLED
    1512             :     PURE module subroutine setCovRandGRNGXS1_CK2(rng, rand, scale)
    1513             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1514             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_CK2
    1515             : #endif
    1516             :         use pm_kind, only: CKC => CK2
    1517             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1518             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1519             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1520             :     end subroutine
    1521             : #endif
    1522             : 
    1523             : #if CK1_ENABLED
    1524             :     PURE module subroutine setCovRandGRNGXS1_CK1(rng, rand, scale)
    1525             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1526             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandGRNGXS1_CK1
    1527             : #endif
    1528             :         use pm_kind, only: CKC => CK1
    1529             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1530             :         real(CKC)               , intent(in)    , contiguous    :: scale(:)
    1531             :         complex(CKC)            , intent(out)   , contiguous    :: rand(:,:)
    1532             :     end subroutine
    1533             : #endif
    1534             : 
    1535             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1536             : 
    1537             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1538             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1539             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1540             : 
    1541             :     end interface
    1542             : 
    1543             :     ! setCovRandD
    1544             : 
    1545             :     interface setCovRand
    1546             : 
    1547             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1548             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1549             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1550             : 
    1551             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1552             : 
    1553             : #if RK5_ENABLED
    1554             :     module subroutine setCovRandDRNGFSD_RK5(rng, rand, method, eta)
    1555             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1556             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFSD_RK5
    1557             : #endif
    1558             :         use pm_kind, only: RKC => RK5
    1559             :         type(dvine_type)        , intent(in)                    :: method
    1560             :         type(rngf_type)         , intent(in)                    :: rng
    1561             :         real(RKC)               , intent(in)                    :: eta
    1562             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1563             :     end subroutine
    1564             : #endif
    1565             : 
    1566             : #if RK4_ENABLED
    1567             :     module subroutine setCovRandDRNGFSD_RK4(rng, rand, method, eta)
    1568             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1569             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFSD_RK4
    1570             : #endif
    1571             :         use pm_kind, only: RKC => RK4
    1572             :         type(dvine_type)        , intent(in)                    :: method
    1573             :         type(rngf_type)         , intent(in)                    :: rng
    1574             :         real(RKC)               , intent(in)                    :: eta
    1575             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1576             :     end subroutine
    1577             : #endif
    1578             : 
    1579             : #if RK3_ENABLED
    1580             :     module subroutine setCovRandDRNGFSD_RK3(rng, rand, method, eta)
    1581             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1582             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFSD_RK3
    1583             : #endif
    1584             :         use pm_kind, only: RKC => RK3
    1585             :         type(dvine_type)        , intent(in)                    :: method
    1586             :         type(rngf_type)         , intent(in)                    :: rng
    1587             :         real(RKC)               , intent(in)                    :: eta
    1588             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1589             :     end subroutine
    1590             : #endif
    1591             : 
    1592             : #if RK2_ENABLED
    1593             :     module subroutine setCovRandDRNGFSD_RK2(rng, rand, method, eta)
    1594             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1595             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFSD_RK2
    1596             : #endif
    1597             :         use pm_kind, only: RKC => RK2
    1598             :         type(dvine_type)        , intent(in)                    :: method
    1599             :         type(rngf_type)         , intent(in)                    :: rng
    1600             :         real(RKC)               , intent(in)                    :: eta
    1601             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1602             :     end subroutine
    1603             : #endif
    1604             : 
    1605             : #if RK1_ENABLED
    1606             :     module subroutine setCovRandDRNGFSD_RK1(rng, rand, method, eta)
    1607             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1608             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFSD_RK1
    1609             : #endif
    1610             :         use pm_kind, only: RKC => RK1
    1611             :         type(dvine_type)        , intent(in)                    :: method
    1612             :         type(rngf_type)         , intent(in)                    :: rng
    1613             :         real(RKC)               , intent(in)                    :: eta
    1614             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1615             :     end subroutine
    1616             : #endif
    1617             : 
    1618             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1619             : 
    1620             : #if RK5_ENABLED
    1621             :     module subroutine setCovRandDRNGFS0_RK5(rng, rand, method, eta, scale)
    1622             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1623             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS0_RK5
    1624             : #endif
    1625             :         use pm_kind, only: RKC => RK5
    1626             :         type(dvine_type)        , intent(in)                    :: method
    1627             :         type(rngf_type)         , intent(in)                    :: rng
    1628             :         real(RKC)               , intent(in)                    :: eta
    1629             :         real(RKC)               , intent(in)                    :: scale
    1630             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1631             :     end subroutine
    1632             : #endif
    1633             : 
    1634             : #if RK4_ENABLED
    1635             :     module subroutine setCovRandDRNGFS0_RK4(rng, rand, method, eta, scale)
    1636             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1637             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS0_RK4
    1638             : #endif
    1639             :         use pm_kind, only: RKC => RK4
    1640             :         type(dvine_type)        , intent(in)                    :: method
    1641             :         type(rngf_type)         , intent(in)                    :: rng
    1642             :         real(RKC)               , intent(in)                    :: eta
    1643             :         real(RKC)               , intent(in)                    :: scale
    1644             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1645             :     end subroutine
    1646             : #endif
    1647             : 
    1648             : #if RK3_ENABLED
    1649             :     module subroutine setCovRandDRNGFS0_RK3(rng, rand, method, eta, scale)
    1650             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1651             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS0_RK3
    1652             : #endif
    1653             :         use pm_kind, only: RKC => RK3
    1654             :         type(dvine_type)        , intent(in)                    :: method
    1655             :         type(rngf_type)         , intent(in)                    :: rng
    1656             :         real(RKC)               , intent(in)                    :: eta
    1657             :         real(RKC)               , intent(in)                    :: scale
    1658             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1659             :     end subroutine
    1660             : #endif
    1661             : 
    1662             : #if RK2_ENABLED
    1663             :     module subroutine setCovRandDRNGFS0_RK2(rng, rand, method, eta, scale)
    1664             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1665             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS0_RK2
    1666             : #endif
    1667             :         use pm_kind, only: RKC => RK2
    1668             :         type(dvine_type)        , intent(in)                    :: method
    1669             :         type(rngf_type)         , intent(in)                    :: rng
    1670             :         real(RKC)               , intent(in)                    :: eta
    1671             :         real(RKC)               , intent(in)                    :: scale
    1672             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1673             :     end subroutine
    1674             : #endif
    1675             : 
    1676             : #if RK1_ENABLED
    1677             :     module subroutine setCovRandDRNGFS0_RK1(rng, rand, method, eta, scale)
    1678             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1679             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS0_RK1
    1680             : #endif
    1681             :         use pm_kind, only: RKC => RK1
    1682             :         type(dvine_type)        , intent(in)                    :: method
    1683             :         type(rngf_type)         , intent(in)                    :: rng
    1684             :         real(RKC)               , intent(in)                    :: eta
    1685             :         real(RKC)               , intent(in)                    :: scale
    1686             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1687             :     end subroutine
    1688             : #endif
    1689             : 
    1690             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1691             : 
    1692             : #if RK5_ENABLED
    1693             :     module subroutine setCovRandDRNGFS1_RK5(rng, rand, method, eta, scale)
    1694             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1695             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS1_RK5
    1696             : #endif
    1697             :         use pm_kind, only: RKC => RK5
    1698             :         type(dvine_type)        , intent(in)                    :: method
    1699             :         type(rngf_type)         , intent(in)                    :: rng
    1700             :         real(RKC)               , intent(in)                    :: eta
    1701             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1702             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1703             :     end subroutine
    1704             : #endif
    1705             : 
    1706             : #if RK4_ENABLED
    1707             :     module subroutine setCovRandDRNGFS1_RK4(rng, rand, method, eta, scale)
    1708             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1709             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS1_RK4
    1710             : #endif
    1711             :         use pm_kind, only: RKC => RK4
    1712             :         type(dvine_type)        , intent(in)                    :: method
    1713             :         type(rngf_type)         , intent(in)                    :: rng
    1714             :         real(RKC)               , intent(in)                    :: eta
    1715             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1716             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1717             :     end subroutine
    1718             : #endif
    1719             : 
    1720             : #if RK3_ENABLED
    1721             :     module subroutine setCovRandDRNGFS1_RK3(rng, rand, method, eta, scale)
    1722             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1723             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS1_RK3
    1724             : #endif
    1725             :         use pm_kind, only: RKC => RK3
    1726             :         type(dvine_type)        , intent(in)                    :: method
    1727             :         type(rngf_type)         , intent(in)                    :: rng
    1728             :         real(RKC)               , intent(in)                    :: eta
    1729             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1730             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1731             :     end subroutine
    1732             : #endif
    1733             : 
    1734             : #if RK2_ENABLED
    1735             :     module subroutine setCovRandDRNGFS1_RK2(rng, rand, method, eta, scale)
    1736             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1737             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS1_RK2
    1738             : #endif
    1739             :         use pm_kind, only: RKC => RK2
    1740             :         type(dvine_type)        , intent(in)                    :: method
    1741             :         type(rngf_type)         , intent(in)                    :: rng
    1742             :         real(RKC)               , intent(in)                    :: eta
    1743             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1744             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1745             :     end subroutine
    1746             : #endif
    1747             : 
    1748             : #if RK1_ENABLED
    1749             :     module subroutine setCovRandDRNGFS1_RK1(rng, rand, method, eta, scale)
    1750             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1751             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGFS1_RK1
    1752             : #endif
    1753             :         use pm_kind, only: RKC => RK1
    1754             :         type(dvine_type)        , intent(in)                    :: method
    1755             :         type(rngf_type)         , intent(in)                    :: rng
    1756             :         real(RKC)               , intent(in)                    :: eta
    1757             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1758             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1759             :     end subroutine
    1760             : #endif
    1761             : 
    1762             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1763             : 
    1764             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1765             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1766             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1767             : 
    1768             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1769             : 
    1770             : #if RK5_ENABLED
    1771             :     PURE module subroutine setCovRandDRNGXSD_RK5(rng, rand, method, eta)
    1772             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1773             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXSD_RK5
    1774             : #endif
    1775             :         use pm_kind, only: RKC => RK5
    1776             :         type(dvine_type)        , intent(in)                    :: method
    1777             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1778             :         real(RKC)               , intent(in)                    :: eta
    1779             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1780             :     end subroutine
    1781             : #endif
    1782             : 
    1783             : #if RK4_ENABLED
    1784             :     PURE module subroutine setCovRandDRNGXSD_RK4(rng, rand, method, eta)
    1785             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1786             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXSD_RK4
    1787             : #endif
    1788             :         use pm_kind, only: RKC => RK4
    1789             :         type(dvine_type)        , intent(in)                    :: method
    1790             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1791             :         real(RKC)               , intent(in)                    :: eta
    1792             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1793             :     end subroutine
    1794             : #endif
    1795             : 
    1796             : #if RK3_ENABLED
    1797             :     PURE module subroutine setCovRandDRNGXSD_RK3(rng, rand, method, eta)
    1798             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1799             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXSD_RK3
    1800             : #endif
    1801             :         use pm_kind, only: RKC => RK3
    1802             :         type(dvine_type)        , intent(in)                    :: method
    1803             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1804             :         real(RKC)               , intent(in)                    :: eta
    1805             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1806             :     end subroutine
    1807             : #endif
    1808             : 
    1809             : #if RK2_ENABLED
    1810             :     PURE module subroutine setCovRandDRNGXSD_RK2(rng, rand, method, eta)
    1811             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1812             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXSD_RK2
    1813             : #endif
    1814             :         use pm_kind, only: RKC => RK2
    1815             :         type(dvine_type)        , intent(in)                    :: method
    1816             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1817             :         real(RKC)               , intent(in)                    :: eta
    1818             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1819             :     end subroutine
    1820             : #endif
    1821             : 
    1822             : #if RK1_ENABLED
    1823             :     PURE module subroutine setCovRandDRNGXSD_RK1(rng, rand, method, eta)
    1824             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1825             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXSD_RK1
    1826             : #endif
    1827             :         use pm_kind, only: RKC => RK1
    1828             :         type(dvine_type)        , intent(in)                    :: method
    1829             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1830             :         real(RKC)               , intent(in)                    :: eta
    1831             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1832             :     end subroutine
    1833             : #endif
    1834             : 
    1835             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1836             : 
    1837             : #if RK5_ENABLED
    1838             :     PURE module subroutine setCovRandDRNGXS0_RK5(rng, rand, method, eta, scale)
    1839             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1840             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS0_RK5
    1841             : #endif
    1842             :         use pm_kind, only: RKC => RK5
    1843             :         type(dvine_type)        , intent(in)                    :: method
    1844             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1845             :         real(RKC)               , intent(in)                    :: eta
    1846             :         real(RKC)               , intent(in)                    :: scale
    1847             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1848             :     end subroutine
    1849             : #endif
    1850             : 
    1851             : #if RK4_ENABLED
    1852             :     PURE module subroutine setCovRandDRNGXS0_RK4(rng, rand, method, eta, scale)
    1853             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1854             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS0_RK4
    1855             : #endif
    1856             :         use pm_kind, only: RKC => RK4
    1857             :         type(dvine_type)        , intent(in)                    :: method
    1858             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1859             :         real(RKC)               , intent(in)                    :: eta
    1860             :         real(RKC)               , intent(in)                    :: scale
    1861             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1862             :     end subroutine
    1863             : #endif
    1864             : 
    1865             : #if RK3_ENABLED
    1866             :     PURE module subroutine setCovRandDRNGXS0_RK3(rng, rand, method, eta, scale)
    1867             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1868             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS0_RK3
    1869             : #endif
    1870             :         use pm_kind, only: RKC => RK3
    1871             :         type(dvine_type)        , intent(in)                    :: method
    1872             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1873             :         real(RKC)               , intent(in)                    :: eta
    1874             :         real(RKC)               , intent(in)                    :: scale
    1875             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1876             :     end subroutine
    1877             : #endif
    1878             : 
    1879             : #if RK2_ENABLED
    1880             :     PURE module subroutine setCovRandDRNGXS0_RK2(rng, rand, method, eta, scale)
    1881             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1882             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS0_RK2
    1883             : #endif
    1884             :         use pm_kind, only: RKC => RK2
    1885             :         type(dvine_type)        , intent(in)                    :: method
    1886             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1887             :         real(RKC)               , intent(in)                    :: eta
    1888             :         real(RKC)               , intent(in)                    :: scale
    1889             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1890             :     end subroutine
    1891             : #endif
    1892             : 
    1893             : #if RK1_ENABLED
    1894             :     PURE module subroutine setCovRandDRNGXS0_RK1(rng, rand, method, eta, scale)
    1895             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1896             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS0_RK1
    1897             : #endif
    1898             :         use pm_kind, only: RKC => RK1
    1899             :         type(dvine_type)        , intent(in)                    :: method
    1900             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1901             :         real(RKC)               , intent(in)                    :: eta
    1902             :         real(RKC)               , intent(in)                    :: scale
    1903             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1904             :     end subroutine
    1905             : #endif
    1906             : 
    1907             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1908             : 
    1909             : #if RK5_ENABLED
    1910             :     PURE module subroutine setCovRandDRNGXS1_RK5(rng, rand, method, eta, scale)
    1911             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1912             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS1_RK5
    1913             : #endif
    1914             :         use pm_kind, only: RKC => RK5
    1915             :         type(dvine_type)        , intent(in)                    :: method
    1916             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1917             :         real(RKC)               , intent(in)                    :: eta
    1918             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1919             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1920             :     end subroutine
    1921             : #endif
    1922             : 
    1923             : #if RK4_ENABLED
    1924             :     PURE module subroutine setCovRandDRNGXS1_RK4(rng, rand, method, eta, scale)
    1925             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1926             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS1_RK4
    1927             : #endif
    1928             :         use pm_kind, only: RKC => RK4
    1929             :         type(dvine_type)        , intent(in)                    :: method
    1930             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1931             :         real(RKC)               , intent(in)                    :: eta
    1932             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1933             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1934             :     end subroutine
    1935             : #endif
    1936             : 
    1937             : #if RK3_ENABLED
    1938             :     PURE module subroutine setCovRandDRNGXS1_RK3(rng, rand, method, eta, scale)
    1939             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1940             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS1_RK3
    1941             : #endif
    1942             :         use pm_kind, only: RKC => RK3
    1943             :         type(dvine_type)        , intent(in)                    :: method
    1944             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1945             :         real(RKC)               , intent(in)                    :: eta
    1946             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1947             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1948             :     end subroutine
    1949             : #endif
    1950             : 
    1951             : #if RK2_ENABLED
    1952             :     PURE module subroutine setCovRandDRNGXS1_RK2(rng, rand, method, eta, scale)
    1953             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1954             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS1_RK2
    1955             : #endif
    1956             :         use pm_kind, only: RKC => RK2
    1957             :         type(dvine_type)        , intent(in)                    :: method
    1958             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1959             :         real(RKC)               , intent(in)                    :: eta
    1960             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1961             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1962             :     end subroutine
    1963             : #endif
    1964             : 
    1965             : #if RK1_ENABLED
    1966             :     PURE module subroutine setCovRandDRNGXS1_RK1(rng, rand, method, eta, scale)
    1967             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    1968             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandDRNGXS1_RK1
    1969             : #endif
    1970             :         use pm_kind, only: RKC => RK1
    1971             :         type(dvine_type)        , intent(in)                    :: method
    1972             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    1973             :         real(RKC)               , intent(in)                    :: eta
    1974             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    1975             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    1976             :     end subroutine
    1977             : #endif
    1978             : 
    1979             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1980             : 
    1981             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1982             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1983             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1984             : 
    1985             :     end interface
    1986             : 
    1987             :     ! setCovRandO
    1988             : 
    1989             :     interface setCovRand
    1990             : 
    1991             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1992             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1993             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1994             : 
    1995             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1996             : 
    1997             : #if RK5_ENABLED
    1998             :     module subroutine setCovRandORNGFSD_RK5(rng, rand, method, eta)
    1999             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2000             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFSD_RK5
    2001             : #endif
    2002             :         use pm_kind, only: RKC => RK5
    2003             :         type(onion_type)        , intent(out)                   :: method
    2004             :         type(rngf_type)         , intent(in)                    :: rng
    2005             :         real(RKC)               , intent(in)                    :: eta
    2006             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2007             :     end subroutine
    2008             : #endif
    2009             : 
    2010             : #if RK4_ENABLED
    2011             :     module subroutine setCovRandORNGFSD_RK4(rng, rand, method, eta)
    2012             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2013             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFSD_RK4
    2014             : #endif
    2015             :         use pm_kind, only: RKC => RK4
    2016             :         type(onion_type)        , intent(out)                   :: method
    2017             :         type(rngf_type)         , intent(in)                    :: rng
    2018             :         real(RKC)               , intent(in)                    :: eta
    2019             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2020             :     end subroutine
    2021             : #endif
    2022             : 
    2023             : #if RK3_ENABLED
    2024             :     module subroutine setCovRandORNGFSD_RK3(rng, rand, method, eta)
    2025             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2026             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFSD_RK3
    2027             : #endif
    2028             :         use pm_kind, only: RKC => RK3
    2029             :         type(onion_type)        , intent(out)                   :: method
    2030             :         type(rngf_type)         , intent(in)                    :: rng
    2031             :         real(RKC)               , intent(in)                    :: eta
    2032             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2033             :     end subroutine
    2034             : #endif
    2035             : 
    2036             : #if RK2_ENABLED
    2037             :     module subroutine setCovRandORNGFSD_RK2(rng, rand, method, eta)
    2038             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2039             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFSD_RK2
    2040             : #endif
    2041             :         use pm_kind, only: RKC => RK2
    2042             :         type(onion_type)        , intent(out)                   :: method
    2043             :         type(rngf_type)         , intent(in)                    :: rng
    2044             :         real(RKC)               , intent(in)                    :: eta
    2045             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2046             :     end subroutine
    2047             : #endif
    2048             : 
    2049             : #if RK1_ENABLED
    2050             :     module subroutine setCovRandORNGFSD_RK1(rng, rand, method, eta)
    2051             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2052             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFSD_RK1
    2053             : #endif
    2054             :         use pm_kind, only: RKC => RK1
    2055             :         type(onion_type)        , intent(out)                   :: method
    2056             :         type(rngf_type)         , intent(in)                    :: rng
    2057             :         real(RKC)               , intent(in)                    :: eta
    2058             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2059             :     end subroutine
    2060             : #endif
    2061             : 
    2062             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2063             : 
    2064             : #if RK5_ENABLED
    2065             :     module subroutine setCovRandORNGFS0_RK5(rng, rand, method, eta, scale)
    2066             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2067             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS0_RK5
    2068             : #endif
    2069             :         use pm_kind, only: RKC => RK5
    2070             :         type(onion_type)        , intent(out)                   :: method
    2071             :         type(rngf_type)         , intent(in)                    :: rng
    2072             :         real(RKC)               , intent(in)                    :: eta
    2073             :         real(RKC)               , intent(in)                    :: scale
    2074             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2075             :     end subroutine
    2076             : #endif
    2077             : 
    2078             : #if RK4_ENABLED
    2079             :     module subroutine setCovRandORNGFS0_RK4(rng, rand, method, eta, scale)
    2080             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2081             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS0_RK4
    2082             : #endif
    2083             :         use pm_kind, only: RKC => RK4
    2084             :         type(onion_type)        , intent(out)                   :: method
    2085             :         type(rngf_type)         , intent(in)                    :: rng
    2086             :         real(RKC)               , intent(in)                    :: eta
    2087             :         real(RKC)               , intent(in)                    :: scale
    2088             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2089             :     end subroutine
    2090             : #endif
    2091             : 
    2092             : #if RK3_ENABLED
    2093             :     module subroutine setCovRandORNGFS0_RK3(rng, rand, method, eta, scale)
    2094             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2095             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS0_RK3
    2096             : #endif
    2097             :         use pm_kind, only: RKC => RK3
    2098             :         type(onion_type)        , intent(out)                   :: method
    2099             :         type(rngf_type)         , intent(in)                    :: rng
    2100             :         real(RKC)               , intent(in)                    :: eta
    2101             :         real(RKC)               , intent(in)                    :: scale
    2102             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2103             :     end subroutine
    2104             : #endif
    2105             : 
    2106             : #if RK2_ENABLED
    2107             :     module subroutine setCovRandORNGFS0_RK2(rng, rand, method, eta, scale)
    2108             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2109             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS0_RK2
    2110             : #endif
    2111             :         use pm_kind, only: RKC => RK2
    2112             :         type(onion_type)        , intent(out)                   :: method
    2113             :         type(rngf_type)         , intent(in)                    :: rng
    2114             :         real(RKC)               , intent(in)                    :: eta
    2115             :         real(RKC)               , intent(in)                    :: scale
    2116             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2117             :     end subroutine
    2118             : #endif
    2119             : 
    2120             : #if RK1_ENABLED
    2121             :     module subroutine setCovRandORNGFS0_RK1(rng, rand, method, eta, scale)
    2122             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2123             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS0_RK1
    2124             : #endif
    2125             :         use pm_kind, only: RKC => RK1
    2126             :         type(onion_type)        , intent(out)                   :: method
    2127             :         type(rngf_type)         , intent(in)                    :: rng
    2128             :         real(RKC)               , intent(in)                    :: eta
    2129             :         real(RKC)               , intent(in)                    :: scale
    2130             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2131             :     end subroutine
    2132             : #endif
    2133             : 
    2134             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2135             : 
    2136             : #if RK5_ENABLED
    2137             :     module subroutine setCovRandORNGFS1_RK5(rng, rand, method, eta, scale)
    2138             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2139             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS1_RK5
    2140             : #endif
    2141             :         use pm_kind, only: RKC => RK5
    2142             :         type(onion_type)        , intent(out)                   :: method
    2143             :         type(rngf_type)         , intent(in)                    :: rng
    2144             :         real(RKC)               , intent(in)                    :: eta
    2145             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2146             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2147             :     end subroutine
    2148             : #endif
    2149             : 
    2150             : #if RK4_ENABLED
    2151             :     module subroutine setCovRandORNGFS1_RK4(rng, rand, method, eta, scale)
    2152             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2153             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS1_RK4
    2154             : #endif
    2155             :         use pm_kind, only: RKC => RK4
    2156             :         type(onion_type)        , intent(out)                   :: method
    2157             :         type(rngf_type)         , intent(in)                    :: rng
    2158             :         real(RKC)               , intent(in)                    :: eta
    2159             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2160             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2161             :     end subroutine
    2162             : #endif
    2163             : 
    2164             : #if RK3_ENABLED
    2165             :     module subroutine setCovRandORNGFS1_RK3(rng, rand, method, eta, scale)
    2166             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2167             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS1_RK3
    2168             : #endif
    2169             :         use pm_kind, only: RKC => RK3
    2170             :         type(onion_type)        , intent(out)                   :: method
    2171             :         type(rngf_type)         , intent(in)                    :: rng
    2172             :         real(RKC)               , intent(in)                    :: eta
    2173             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2174             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2175             :     end subroutine
    2176             : #endif
    2177             : 
    2178             : #if RK2_ENABLED
    2179             :     module subroutine setCovRandORNGFS1_RK2(rng, rand, method, eta, scale)
    2180             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2181             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS1_RK2
    2182             : #endif
    2183             :         use pm_kind, only: RKC => RK2
    2184             :         type(onion_type)        , intent(out)                   :: method
    2185             :         type(rngf_type)         , intent(in)                    :: rng
    2186             :         real(RKC)               , intent(in)                    :: eta
    2187             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2188             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2189             :     end subroutine
    2190             : #endif
    2191             : 
    2192             : #if RK1_ENABLED
    2193             :     module subroutine setCovRandORNGFS1_RK1(rng, rand, method, eta, scale)
    2194             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2195             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGFS1_RK1
    2196             : #endif
    2197             :         use pm_kind, only: RKC => RK1
    2198             :         type(onion_type)        , intent(out)                   :: method
    2199             :         type(rngf_type)         , intent(in)                    :: rng
    2200             :         real(RKC)               , intent(in)                    :: eta
    2201             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2202             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2203             :     end subroutine
    2204             : #endif
    2205             : 
    2206             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2207             : 
    2208             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2209             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2210             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2211             : 
    2212             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2213             : 
    2214             : #if RK5_ENABLED
    2215             :     PURE module subroutine setCovRandORNGXSD_RK5(rng, rand, method, eta)
    2216             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2217             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXSD_RK5
    2218             : #endif
    2219             :         use pm_kind, only: RKC => RK5
    2220             :         type(onion_type)        , intent(out)                   :: method
    2221             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2222             :         real(RKC)               , intent(in)                    :: eta
    2223             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2224             :     end subroutine
    2225             : #endif
    2226             : 
    2227             : #if RK4_ENABLED
    2228             :     PURE module subroutine setCovRandORNGXSD_RK4(rng, rand, method, eta)
    2229             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2230             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXSD_RK4
    2231             : #endif
    2232             :         use pm_kind, only: RKC => RK4
    2233             :         type(onion_type)        , intent(out)                   :: method
    2234             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2235             :         real(RKC)               , intent(in)                    :: eta
    2236             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2237             :     end subroutine
    2238             : #endif
    2239             : 
    2240             : #if RK3_ENABLED
    2241             :     PURE module subroutine setCovRandORNGXSD_RK3(rng, rand, method, eta)
    2242             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2243             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXSD_RK3
    2244             : #endif
    2245             :         use pm_kind, only: RKC => RK3
    2246             :         type(onion_type)        , intent(out)                   :: method
    2247             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2248             :         real(RKC)               , intent(in)                    :: eta
    2249             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2250             :     end subroutine
    2251             : #endif
    2252             : 
    2253             : #if RK2_ENABLED
    2254             :     PURE module subroutine setCovRandORNGXSD_RK2(rng, rand, method, eta)
    2255             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2256             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXSD_RK2
    2257             : #endif
    2258             :         use pm_kind, only: RKC => RK2
    2259             :         type(onion_type)        , intent(out)                   :: method
    2260             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2261             :         real(RKC)               , intent(in)                    :: eta
    2262             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2263             :     end subroutine
    2264             : #endif
    2265             : 
    2266             : #if RK1_ENABLED
    2267             :     PURE module subroutine setCovRandORNGXSD_RK1(rng, rand, method, eta)
    2268             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2269             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXSD_RK1
    2270             : #endif
    2271             :         use pm_kind, only: RKC => RK1
    2272             :         type(onion_type)        , intent(out)                   :: method
    2273             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2274             :         real(RKC)               , intent(in)                    :: eta
    2275             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2276             :     end subroutine
    2277             : #endif
    2278             : 
    2279             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2280             : 
    2281             : #if RK5_ENABLED
    2282             :     PURE module subroutine setCovRandORNGXS0_RK5(rng, rand, method, eta, scale)
    2283             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2284             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS0_RK5
    2285             : #endif
    2286             :         use pm_kind, only: RKC => RK5
    2287             :         type(onion_type)        , intent(out)                   :: method
    2288             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2289             :         real(RKC)               , intent(in)                    :: eta
    2290             :         real(RKC)               , intent(in)                    :: scale
    2291             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2292             :     end subroutine
    2293             : #endif
    2294             : 
    2295             : #if RK4_ENABLED
    2296             :     PURE module subroutine setCovRandORNGXS0_RK4(rng, rand, method, eta, scale)
    2297             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2298             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS0_RK4
    2299             : #endif
    2300             :         use pm_kind, only: RKC => RK4
    2301             :         type(onion_type)        , intent(out)                   :: method
    2302             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2303             :         real(RKC)               , intent(in)                    :: eta
    2304             :         real(RKC)               , intent(in)                    :: scale
    2305             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2306             :     end subroutine
    2307             : #endif
    2308             : 
    2309             : #if RK3_ENABLED
    2310             :     PURE module subroutine setCovRandORNGXS0_RK3(rng, rand, method, eta, scale)
    2311             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2312             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS0_RK3
    2313             : #endif
    2314             :         use pm_kind, only: RKC => RK3
    2315             :         type(onion_type)        , intent(out)                   :: method
    2316             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2317             :         real(RKC)               , intent(in)                    :: eta
    2318             :         real(RKC)               , intent(in)                    :: scale
    2319             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2320             :     end subroutine
    2321             : #endif
    2322             : 
    2323             : #if RK2_ENABLED
    2324             :     PURE module subroutine setCovRandORNGXS0_RK2(rng, rand, method, eta, scale)
    2325             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2326             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS0_RK2
    2327             : #endif
    2328             :         use pm_kind, only: RKC => RK2
    2329             :         type(onion_type)        , intent(out)                   :: method
    2330             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2331             :         real(RKC)               , intent(in)                    :: eta
    2332             :         real(RKC)               , intent(in)                    :: scale
    2333             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2334             :     end subroutine
    2335             : #endif
    2336             : 
    2337             : #if RK1_ENABLED
    2338             :     PURE module subroutine setCovRandORNGXS0_RK1(rng, rand, method, eta, scale)
    2339             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2340             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS0_RK1
    2341             : #endif
    2342             :         use pm_kind, only: RKC => RK1
    2343             :         type(onion_type)        , intent(out)                   :: method
    2344             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2345             :         real(RKC)               , intent(in)                    :: eta
    2346             :         real(RKC)               , intent(in)                    :: scale
    2347             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2348             :     end subroutine
    2349             : #endif
    2350             : 
    2351             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2352             : 
    2353             : #if RK5_ENABLED
    2354             :     PURE module subroutine setCovRandORNGXS1_RK5(rng, rand, method, eta, scale)
    2355             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2356             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS1_RK5
    2357             : #endif
    2358             :         use pm_kind, only: RKC => RK5
    2359             :         type(onion_type)        , intent(out)                   :: method
    2360             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2361             :         real(RKC)               , intent(in)                    :: eta
    2362             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2363             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2364             :     end subroutine
    2365             : #endif
    2366             : 
    2367             : #if RK4_ENABLED
    2368             :     PURE module subroutine setCovRandORNGXS1_RK4(rng, rand, method, eta, scale)
    2369             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2370             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS1_RK4
    2371             : #endif
    2372             :         use pm_kind, only: RKC => RK4
    2373             :         type(onion_type)        , intent(out)                   :: method
    2374             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2375             :         real(RKC)               , intent(in)                    :: eta
    2376             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2377             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2378             :     end subroutine
    2379             : #endif
    2380             : 
    2381             : #if RK3_ENABLED
    2382             :     PURE module subroutine setCovRandORNGXS1_RK3(rng, rand, method, eta, scale)
    2383             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2384             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS1_RK3
    2385             : #endif
    2386             :         use pm_kind, only: RKC => RK3
    2387             :         type(onion_type)        , intent(out)                   :: method
    2388             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2389             :         real(RKC)               , intent(in)                    :: eta
    2390             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2391             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2392             :     end subroutine
    2393             : #endif
    2394             : 
    2395             : #if RK2_ENABLED
    2396             :     PURE module subroutine setCovRandORNGXS1_RK2(rng, rand, method, eta, scale)
    2397             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2398             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS1_RK2
    2399             : #endif
    2400             :         use pm_kind, only: RKC => RK2
    2401             :         type(onion_type)        , intent(out)                   :: method
    2402             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2403             :         real(RKC)               , intent(in)                    :: eta
    2404             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2405             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2406             :     end subroutine
    2407             : #endif
    2408             : 
    2409             : #if RK1_ENABLED
    2410             :     PURE module subroutine setCovRandORNGXS1_RK1(rng, rand, method, eta, scale)
    2411             : #if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
    2412             :         !DEC$ ATTRIBUTES DLLEXPORT :: setCovRandORNGXS1_RK1
    2413             : #endif
    2414             :         use pm_kind, only: RKC => RK1
    2415             :         type(onion_type)        , intent(out)                   :: method
    2416             :         type(xoshiro256ssw_type), intent(inout)                 :: rng
    2417             :         real(RKC)               , intent(in)                    :: eta
    2418             :         real(RKC)               , intent(in)    , contiguous    :: scale(:)
    2419             :         real(RKC)               , intent(out)   , contiguous    :: rand(:,:)
    2420             :     end subroutine
    2421             : #endif
    2422             : 
    2423             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2424             : 
    2425             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2426             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2427             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2428             : 
    2429             :     end interface
    2430             : 
    2431             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2432             : 
    2433           0 : end module pm_distCov

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