LCOV - code coverage report
Current view: top level - /builds/ug4-project/ugcore/ug4-new/plugins/SuperLU6/external/superlu/SRC - sp_ienv.c (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 5 0
Test Date: 2026-06-01 23:54:59 Functions: 0.0 % 1 0

            Line data    Source code
       1              : /*
       2              : Copyright (c) 2003, The Regents of the University of California, through
       3              : Lawrence Berkeley National Laboratory (subject to receipt of any required 
       4              : approvals from U.S. Dept. of Energy) 
       5              : 
       6              : All rights reserved. 
       7              : 
       8              : The source code is distributed under BSD license, see the file License.txt
       9              : at the top-level directory.
      10              : */
      11              : /*
      12              :  * -- SuperLU routine (version 4.1) --
      13              :  * Univ. of California Berkeley, Xerox Palo Alto Research Center,
      14              :  * and Lawrence Berkeley National Lab.
      15              :  * November, 2010
      16              : */
      17              : /*! \file
      18              :  * \brief Chooses machine-dependent parameters for the local environment.
      19              :  *
      20              :  * \ingroup Common
      21              :  */
      22              : 
      23              : /*
      24              :  * File name:           sp_ienv.c
      25              :  * History:             Modified from lapack routine ILAENV
      26              :  */
      27              : #include "slu_Cnames.h"
      28              : 
      29              : /*! \brief
      30              : 
      31              :  <pre>
      32              :     Purpose   
      33              :     =======   
      34              : 
      35              :     sp_ienv() is inquired to choose machine-dependent parameters for the
      36              :     local environment. See ISPEC for a description of the parameters.   
      37              : 
      38              :     This version provides a set of parameters which should give good,   
      39              :     but not optimal, performance on many of the currently available   
      40              :     computers.  Users are encouraged to modify this subroutine to set   
      41              :     the tuning parameters for their particular machine using the option   
      42              :     and problem size information in the arguments.   
      43              : 
      44              :     Arguments   
      45              :     =========   
      46              : 
      47              :     ISPEC   (input) int
      48              :             Specifies the parameter to be returned as the value of SP_IENV.   
      49              :             = 1: the panel size w; a panel consists of w consecutive
      50              :                  columns of matrix A in the process of Gaussian elimination.
      51              :                  The best value depends on machine's cache characters.
      52              :             = 2: the relaxation parameter relax; if the number of
      53              :                  nodes (columns) in a subtree of the elimination tree is less
      54              :                  than relax, this subtree is considered as one supernode,
      55              :                  regardless of their row structures.
      56              :             = 3: the maximum size for a supernode in complete LU;
      57              :             = 4: the minimum row dimension for 2-D blocking to be used;
      58              :             = 5: the minimum column dimension for 2-D blocking to be used;
      59              :             = 6: the estimated fills factor for L and U, compared with A;
      60              :             = 7: the maximum size for a supernode in ILU.
      61              :             
      62              :    (SP_IENV) (output) int
      63              :             >= 0: the value of the parameter specified by ISPEC   
      64              :             < 0:  if SP_IENV = -k, the k-th argument had an illegal value. 
      65              :   
      66              :     ===================================================================== 
      67              : </pre>
      68              : */
      69              : int
      70            0 : sp_ienv(int ispec)
      71              : {
      72              :     int i;
      73              :     extern int input_error(char *, int *);
      74              : 
      75            0 :     switch (ispec) {
      76              :         case 1: return (20);
      77              :         case 2: return (10);
      78              :         case 3: return (200);
      79              :         case 4: return (200);
      80              :         case 5: return (100);
      81              :         case 6: return (30);
      82              :         case 7: return (10);
      83              :     }
      84              : 
      85              :     /* Invalid value for ISPEC */
      86            0 :     i = 1;
      87            0 :     input_error("sp_ienv", &i);
      88            0 :     return 0;
      89              : 
      90              : } /* sp_ienv_ */
      91              : 
        

Generated by: LCOV version 2.0-1