16429Svs195195 /* 26429Svs195195 * CDDL HEADER START 36429Svs195195 * 46429Svs195195 * The contents of this file are subject to the terms of the 56429Svs195195 * Common Development and Distribution License (the "License"). 66429Svs195195 * You may not use this file except in compliance with the License. 76429Svs195195 * 86429Svs195195 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96429Svs195195 * or http://www.opensolaris.org/os/licensing. 106429Svs195195 * See the License for the specific language governing permissions 116429Svs195195 * and limitations under the License. 126429Svs195195 * 136429Svs195195 * When distributing Covered Code, include this CDDL HEADER in each 146429Svs195195 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156429Svs195195 * If applicable, add the following below this CDDL HEADER, with the 166429Svs195195 * fields enclosed by brackets "[]" replaced with your own identifying 176429Svs195195 * information: Portions Copyright [yyyy] [name of copyright owner] 186429Svs195195 * 196429Svs195195 * CDDL HEADER END 206429Svs195195 */ 216429Svs195195 226429Svs195195 /* 239271SKrishna.K.G@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 246429Svs195195 * Use is subject to license terms. 256429Svs195195 */ 266429Svs195195 276429Svs195195 #ifndef _LINPACK_H 286429Svs195195 #define _LINPACK_H 296429Svs195195 306429Svs195195 #ifdef __cplusplus 316429Svs195195 extern "C" { 326429Svs195195 #endif 336429Svs195195 346429Svs195195 #ifdef DP 356429Svs195195 #define PREC "double" 366429Svs195195 #define LINPACK dlinpack_test 376429Svs195195 #define LINSUB dlinsub 386429Svs195195 #define MATGEN dmatgen 396429Svs195195 #define GEFA dgetrf_64 406429Svs195195 #define GESL dgetrs_64 416429Svs195195 #define AXPY daxpy 426429Svs195195 #define SCAL dscal 436429Svs195195 #define EPSLON depslon 446429Svs195195 #define MXPY dmxpy 456429Svs195195 #define REAL double 466429Svs195195 #define LP_ZERO 0.0e0 476429Svs195195 #define LP_ONE 1.0e0 487186Skk158166 #define MAT_SIZE d_mat_size 497186Skk158166 #define LinpValsA d_linpvalsa 507186Skk158166 #define LAPACK_ECACHE_SIZE d_lapack_ecache_size 516429Svs195195 526429Svs195195 #else 536429Svs195195 546429Svs195195 #define PREC "single" 556429Svs195195 #define LINPACK slinpack_test 566429Svs195195 #define LINSUB slinsub 576429Svs195195 #define MATGEN smatgen 586429Svs195195 #define GEFA sgetrf_64 596429Svs195195 #define GESL sgetrs_64 606429Svs195195 #define AXPY saxpy 616429Svs195195 #define SCAL sscal 626429Svs195195 #define EPSLON sepslon 636429Svs195195 #define MXPY smxpy 646429Svs195195 #define REAL float 656429Svs195195 #define LP_ZERO 0.0 666429Svs195195 #define LP_ONE 1.0 677186Skk158166 #define MAT_SIZE s_mat_size 687186Skk158166 #define LinpValsA s_linpvalsa 697186Skk158166 #define LAPACK_ECACHE_SIZE s_lapack_ecache_size 706429Svs195195 716429Svs195195 #endif 726429Svs195195 736429Svs195195 struct LinpVals { 746429Svs195195 REAL residn; 756429Svs195195 REAL resid; 766429Svs195195 REAL eps; 776429Svs195195 REAL x11; 786429Svs195195 REAL xn1; 796429Svs195195 }; 806429Svs195195 816429Svs195195 #undef FPS_LAPA_LIB8 826429Svs195195 #undef FPS_LAPA_LIB10 836429Svs195195 #undef FPS_LAPA_LIB11 846429Svs195195 #undef FPS_LAPA_LIB12 859271SKrishna.K.G@Sun.COM #undef FPS_LAPA_LIB13 866429Svs195195 #undef FPS_LAPA_UNK 876429Svs195195 88*10273SKrishna.K.G@Sun.COM /* SS12 U1 */ 89*10273SKrishna.K.G@Sun.COM #if (LAPA_COMP_PERF_6 == 1) 90*10273SKrishna.K.G@Sun.COM #define FPS_LAPA_LIB13 916429Svs195195 92*10273SKrishna.K.G@Sun.COM #elif (LAPA_COMP_PERF_5 == 1) 939271SKrishna.K.G@Sun.COM #define FPS_LAPA_LIB13 949271SKrishna.K.G@Sun.COM 959271SKrishna.K.G@Sun.COM /* QA SS12 */ 969271SKrishna.K.G@Sun.COM #elif (LAPA_COMP_PERF_4 == 1) 979271SKrishna.K.G@Sun.COM #define FPS_LAPA_LIB13 989271SKrishna.K.G@Sun.COM 996429Svs195195 /* SS12 */ 1009271SKrishna.K.G@Sun.COM #elif (LAPA_COMP_PERF_3 == 1) 1016429Svs195195 #define FPS_LAPA_LIB12 1026429Svs195195 1036429Svs195195 /* SS11 */ 1049271SKrishna.K.G@Sun.COM #elif (LAPA_COMP_PERF_2 == 1) 1056429Svs195195 #define FPS_LAPA_LIB11 1066429Svs195195 1076429Svs195195 /* SOS8 */ 1089271SKrishna.K.G@Sun.COM #elif (LAPA_COMP_PERF_0 == 1) 1096429Svs195195 #define FPS_LAPA_LIB8 1106429Svs195195 1116429Svs195195 #else 1129271SKrishna.K.G@Sun.COM 1136429Svs195195 #define FPS_LAPA_UNK 1146429Svs195195 #endif 1156429Svs195195 1166429Svs195195 #ifdef __sparc 1176429Svs195195 1186429Svs195195 /* V9B V9 or V8 arch */ 1196429Svs195195 #ifdef V9B 1206429Svs195195 #ifdef FPS_LAPA_LIB8 1216429Svs195195 #include <singdoub64v9b_sos8.h> 1226429Svs195195 #endif 1236429Svs195195 1246429Svs195195 #ifdef FPS_LAPA_LIB10 1256429Svs195195 #include <singdoub64v9b_sos10.h> 1266429Svs195195 #endif 1276429Svs195195 1286429Svs195195 #ifdef FPS_LAPA_LIB11 1296429Svs195195 #include <singdoub64v9b_sos11.h> 1306429Svs195195 #endif 1316429Svs195195 1326429Svs195195 #ifdef FPS_LAPA_LIB12 1336429Svs195195 #include <singdoub64v9b_ss12.h> 1346429Svs195195 #endif 1356429Svs195195 1369271SKrishna.K.G@Sun.COM #ifdef FPS_LAPA_LIB13 137*10273SKrishna.K.G@Sun.COM #include <singdoub64v9b_ss12u1.h> 1389271SKrishna.K.G@Sun.COM #endif 1399271SKrishna.K.G@Sun.COM 1406429Svs195195 #else 1416429Svs195195 1426429Svs195195 #ifdef FPS_LAPA_LIB8 1436429Svs195195 #include <singdoub64_sos8.h> 1446429Svs195195 #endif 1456429Svs195195 1466429Svs195195 #ifdef FPS_LAPA_LIB10 1476429Svs195195 #include <singdoub64_sos10.h> 1486429Svs195195 #endif 1496429Svs195195 1506429Svs195195 /* This is NOT a typo. singdoub64_sos10.h works with SOS11 */ 1516429Svs195195 #ifdef FPS_LAPA_LIB11 1526429Svs195195 #include <singdoub64_sos10.h> 1536429Svs195195 #endif 1546429Svs195195 1556429Svs195195 #ifdef FPS_LAPA_LIB12 1566429Svs195195 #include <singdoub64_ss12.h> 1576429Svs195195 #endif 1586429Svs195195 1599271SKrishna.K.G@Sun.COM #ifdef FPS_LAPA_LIB13 160*10273SKrishna.K.G@Sun.COM #include <singdoub64_ss12u1.h> 1619271SKrishna.K.G@Sun.COM #endif 1629271SKrishna.K.G@Sun.COM 1636429Svs195195 #endif /* V9B */ 1646429Svs195195 1656429Svs195195 #endif 1666429Svs195195 1676429Svs195195 #ifdef __cplusplus 1686429Svs195195 } 1696429Svs195195 #endif 1706429Svs195195 1716429Svs195195 #endif /* _LINPACK_H */ 172