1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _LINPACK_H 28 #define _LINPACK_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #ifdef DP 35 #define PREC "double" 36 #define LINPACK dlinpack_test 37 #define LINSUB dlinsub 38 #define MATGEN dmatgen 39 #define GEFA dgetrf_64 40 #define GESL dgetrs_64 41 #define AXPY daxpy 42 #define SCAL dscal 43 #define EPSLON depslon 44 #define MXPY dmxpy 45 #define REAL double 46 #define LP_ZERO 0.0e0 47 #define LP_ONE 1.0e0 48 #define MAT_SIZE d_mat_size 49 #define LinpValsA d_linpvalsa 50 #define LAPACK_ECACHE_SIZE d_lapack_ecache_size 51 52 #else 53 54 #define PREC "single" 55 #define LINPACK slinpack_test 56 #define LINSUB slinsub 57 #define MATGEN smatgen 58 #define GEFA sgetrf_64 59 #define GESL sgetrs_64 60 #define AXPY saxpy 61 #define SCAL sscal 62 #define EPSLON sepslon 63 #define MXPY smxpy 64 #define REAL float 65 #define LP_ZERO 0.0 66 #define LP_ONE 1.0 67 #define MAT_SIZE s_mat_size 68 #define LinpValsA s_linpvalsa 69 #define LAPACK_ECACHE_SIZE s_lapack_ecache_size 70 71 #endif 72 73 struct LinpVals { 74 REAL residn; 75 REAL resid; 76 REAL eps; 77 REAL x11; 78 REAL xn1; 79 }; 80 81 #undef FPS_LAPA_LIB8 82 #undef FPS_LAPA_LIB10 83 #undef FPS_LAPA_LIB11 84 #undef FPS_LAPA_LIB12 85 #undef FPS_LAPA_LIB13 86 #undef FPS_LAPA_UNK 87 88 89 /* SS13 */ 90 #if (LAPA_COMP_PERF_5 == 1) 91 #define FPS_LAPA_LIB13 92 93 /* QA SS12 */ 94 #elif (LAPA_COMP_PERF_4 == 1) 95 #define FPS_LAPA_LIB13 96 97 /* SS12 */ 98 #elif (LAPA_COMP_PERF_3 == 1) 99 #define FPS_LAPA_LIB12 100 101 /* SS11 */ 102 #elif (LAPA_COMP_PERF_2 == 1) 103 #define FPS_LAPA_LIB11 104 105 /* SOS8 */ 106 #elif (LAPA_COMP_PERF_0 == 1) 107 #define FPS_LAPA_LIB8 108 109 #else 110 111 #define FPS_LAPA_UNK 112 #endif 113 114 #ifdef __sparc 115 116 /* V9B V9 or V8 arch */ 117 #ifdef V9B 118 #ifdef FPS_LAPA_LIB8 119 #include <singdoub64v9b_sos8.h> 120 #endif 121 122 #ifdef FPS_LAPA_LIB10 123 #include <singdoub64v9b_sos10.h> 124 #endif 125 126 #ifdef FPS_LAPA_LIB11 127 #include <singdoub64v9b_sos11.h> 128 #endif 129 130 #ifdef FPS_LAPA_LIB12 131 #include <singdoub64v9b_ss12.h> 132 #endif 133 134 #ifdef FPS_LAPA_LIB13 135 #include <singdoub64v9b_ss13.h> 136 #endif 137 138 #else 139 140 #ifdef FPS_LAPA_LIB8 141 #include <singdoub64_sos8.h> 142 #endif 143 144 #ifdef FPS_LAPA_LIB10 145 #include <singdoub64_sos10.h> 146 #endif 147 148 /* This is NOT a typo. singdoub64_sos10.h works with SOS11 */ 149 #ifdef FPS_LAPA_LIB11 150 #include <singdoub64_sos10.h> 151 #endif 152 153 #ifdef FPS_LAPA_LIB12 154 #include <singdoub64_ss12.h> 155 #endif 156 157 #ifdef FPS_LAPA_LIB13 158 #include <singdoub64_ss13.h> 159 #endif 160 161 #endif /* V9B */ 162 163 #endif 164 165 #ifdef __cplusplus 166 } 167 #endif 168 169 #endif /* _LINPACK_H */ 170