Home | History | Annotate | Download | only in fptest
      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 /* SS12 U1 */
     89 #if (LAPA_COMP_PERF_6 == 1)
     90 #define	FPS_LAPA_LIB13
     91 
     92 #elif (LAPA_COMP_PERF_5 == 1)
     93 #define	FPS_LAPA_LIB13
     94 
     95 /* QA SS12 */
     96 #elif (LAPA_COMP_PERF_4 == 1)
     97 #define	FPS_LAPA_LIB13
     98 
     99 /* SS12 */
    100 #elif (LAPA_COMP_PERF_3 == 1)
    101 #define	FPS_LAPA_LIB12
    102 
    103 /* SS11 */
    104 #elif (LAPA_COMP_PERF_2 == 1)
    105 #define	FPS_LAPA_LIB11
    106 
    107 /* SOS8 */
    108 #elif (LAPA_COMP_PERF_0 == 1)
    109 #define	FPS_LAPA_LIB8
    110 
    111 #else
    112 
    113 #define	FPS_LAPA_UNK
    114 #endif
    115 
    116 #ifdef __sparc
    117 
    118 /* V9B V9 or V8 arch */
    119 #ifdef V9B
    120 #ifdef FPS_LAPA_LIB8
    121 #include <singdoub64v9b_sos8.h>
    122 #endif
    123 
    124 #ifdef FPS_LAPA_LIB10
    125 #include <singdoub64v9b_sos10.h>
    126 #endif
    127 
    128 #ifdef FPS_LAPA_LIB11
    129 #include <singdoub64v9b_sos11.h>
    130 #endif
    131 
    132 #ifdef FPS_LAPA_LIB12
    133 #include <singdoub64v9b_ss12.h>
    134 #endif
    135 
    136 #ifdef FPS_LAPA_LIB13
    137 #include <singdoub64v9b_ss12u1.h>
    138 #endif
    139 
    140 #else
    141 
    142 #ifdef FPS_LAPA_LIB8
    143 #include <singdoub64_sos8.h>
    144 #endif
    145 
    146 #ifdef FPS_LAPA_LIB10
    147 #include <singdoub64_sos10.h>
    148 #endif
    149 
    150 /* This is NOT a typo. singdoub64_sos10.h works with SOS11 */
    151 #ifdef FPS_LAPA_LIB11
    152 #include <singdoub64_sos10.h>
    153 #endif
    154 
    155 #ifdef FPS_LAPA_LIB12
    156 #include <singdoub64_ss12.h>
    157 #endif
    158 
    159 #ifdef FPS_LAPA_LIB13
    160 #include <singdoub64_ss12u1.h>
    161 #endif
    162 
    163 #endif /* V9B */
    164 
    165 #endif
    166 
    167 #ifdef __cplusplus
    168 }
    169 #endif
    170 
    171 #endif /* _LINPACK_H */
    172