Blender V2.61 - r43446
|
00001 00004 /* 00005 * File name: sp_ienv.c 00006 * History: Modified from lapack routine ILAENV 00007 */ 00008 00009 #include "ssp_defs.h" 00010 #include "util.h" 00011 00012 int 00013 sp_ienv(int ispec) 00014 { 00015 /* 00016 Purpose 00017 ======= 00018 00019 sp_ienv() is inquired to choose machine-dependent parameters for the 00020 local environment. See ISPEC for a description of the parameters. 00021 00022 This version provides a set of parameters which should give good, 00023 but not optimal, performance on many of the currently available 00024 computers. Users are encouraged to modify this subroutine to set 00025 the tuning parameters for their particular machine using the option 00026 and problem size information in the arguments. 00027 00028 Arguments 00029 ========= 00030 00031 ISPEC (input) int 00032 Specifies the parameter to be returned as the value of SP_IENV. 00033 = 1: the panel size w; a panel consists of w consecutive 00034 columns of matrix A in the process of Gaussian elimination. 00035 The best value depends on machine's cache characters. 00036 = 2: the relaxation parameter relax; if the number of 00037 nodes (columns) in a subtree of the elimination tree is less 00038 than relax, this subtree is considered as one supernode, 00039 regardless of their row structures. 00040 = 3: the maximum size for a supernode; 00041 = 4: the minimum row dimension for 2-D blocking to be used; 00042 = 5: the minimum column dimension for 2-D blocking to be used; 00043 = 6: the estimated fills factor for L and U, compared with A; 00044 00045 (SP_IENV) (output) int 00046 >= 0: the value of the parameter specified by ISPEC 00047 < 0: if SP_IENV = -k, the k-th argument had an illegal value. 00048 00049 ===================================================================== 00050 */ 00051 int i; 00052 00053 switch (ispec) { 00054 case 1: return (10); 00055 case 2: return (5); 00056 case 3: return (100); 00057 case 4: return (200); 00058 case 5: return (40); 00059 case 6: return (20); 00060 } 00061 00062 /* Invalid value for ISPEC */ 00063 i = 1; 00064 xerbla_("sp_ienv", &i); 00065 return 0; 00066 00067 } /* sp_ienv_ */ 00068