libflame
revision_anchor
|
00001 /* 00002 libflame 00003 An object-based infrastructure for developing high-performance 00004 dense linear algebra libraries. 00005 00006 Copyright (C) 2011, The University of Texas 00007 00008 libflame is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU Lesser General Public License as 00010 published by the Free Software Foundation; either version 2.1 of 00011 the License, or (at your option) any later version. 00012 00013 libflame is distributed in the hope that it will be useful, but 00014 WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with libflame; if you did not receive a copy, see 00020 http://www.gnu.org/licenses/. 00021 00022 For more information, please contact us at flame@cs.utexas.edu or 00023 send mail to: 00024 00025 Field G. Van Zee and/or 00026 Robert A. van de Geijn 00027 The University of Texas at Austin 00028 Department of Computer Sciences 00029 1 University Station C0500 00030 Austin TX 78712 00031 */ 00032 00033 #ifndef BLIS_TYPE_DEFS_H 00034 #define BLIS_TYPE_DEFS_H 00035 00036 // --- Basic type definitions ------------------------------------------------- 00037 00038 /* 00039 // --- trans --- 00040 00041 #define BLIS_NO_TRANSPOSE 'n' 00042 #define BLIS_TRANSPOSE 't' 00043 #define BLIS_CONJ_NO_TRANSPOSE 'c' 00044 #define BLIS_CONJ_TRANSPOSE 'h' 00045 00046 // --- conj --- 00047 00048 #define BLIS_NO_CONJUGATE 'n' 00049 #define BLIS_CONJUGATE 'c' 00050 00051 // --- uplo --- 00052 00053 #define BLIS_LOWER_TRIANGULAR 'l' 00054 #define BLIS_UPPER_TRIANGULAR 'u' 00055 00056 // --- side --- 00057 00058 #define BLIS_LEFT 'l' 00059 #define BLIS_RIGHT 'r' 00060 00061 // --- diag --- 00062 00063 #define BLIS_NONUNIT_DIAG 'n' 00064 #define BLIS_UNIT_DIAG 'u' 00065 #define BLIS_ZERO_DIAG 'z' 00066 */ 00067 00068 #define BLIS_TRANS_BEGIN 100 00069 #define BLIS_UPLO_BEGIN 200 00070 #define BLIS_SIDE_BEGIN 300 00071 #define BLIS_DIAG_BEGIN 400 00072 #define BLIS_CONJ_BEGIN 500 00073 00074 typedef enum 00075 { 00076 BLIS_NO_TRANSPOSE = BLIS_TRANS_BEGIN, 00077 BLIS_TRANSPOSE, 00078 BLIS_CONJ_NO_TRANSPOSE, 00079 BLIS_CONJ_TRANSPOSE 00080 } trans_t; 00081 00082 typedef enum 00083 { 00084 BLIS_LOWER_TRIANGULAR = BLIS_UPLO_BEGIN, 00085 BLIS_UPPER_TRIANGULAR 00086 } uplo_t; 00087 00088 typedef enum 00089 { 00090 BLIS_LEFT = BLIS_SIDE_BEGIN, 00091 BLIS_RIGHT 00092 } side_t; 00093 00094 typedef enum 00095 { 00096 BLIS_NONUNIT_DIAG = BLIS_DIAG_BEGIN, 00097 BLIS_UNIT_DIAG, 00098 BLIS_ZERO_DIAG 00099 } diag_t; 00100 00101 typedef enum 00102 { 00103 BLIS_NO_CONJUGATE = BLIS_CONJ_BEGIN, 00104 BLIS_CONJUGATE 00105 } conj_t; 00106 00107 00108 00109 00110 00111 // --- Intrinsic/assembly definitions ---------------------------------------- 00112 00113 /* 00114 #ifndef BLIS_FROM_LIBFLAME 00115 #error "NOT using blis from libflame" 00116 #else 00117 #error "using blis from libflame" 00118 #endif 00119 */ 00120 00121 /* 00122 #if BLIS_VECTOR_INTRINSIC_TYPE == BLIS_SSE_INTRINSICS 00123 #error "using sse in blis" 00124 #elif BLIS_VECTOR_INTRINSIC_TYPE == BLIS_NO_INTRINSICS 00125 #error "NOT using sse in blis" 00126 #else 00127 #error "undefined case!" 00128 #endif 00129 */ 00130 00131 // Only define vector intrinsics types if they are not already provided by 00132 // libflame. 00133 #ifndef BLIS_FROM_LIBFLAME 00134 00135 #if BLIS_VECTOR_INTRINSIC_TYPE == BLIS_SSE_INTRINSICS 00136 00137 #include "pmmintrin.h" 00138 typedef union 00139 { 00140 __m128d v; 00141 double d[2]; 00142 } v2df_t; 00143 #endif 00144 00145 #endif 00146 00147 00148 // --- Complex type definitions ----------------------------------------------- 00149 00150 // Only define complex types if they are not already provided by libflame. 00151 //#ifndef BLIS_ENABLE_USE_OF_LIBFLAME_TYPES 00152 #ifndef BLIS_FROM_LIBFLAME 00153 00154 typedef struct scomplex 00155 { 00156 float real, imag; 00157 } scomplex; 00158 00159 typedef struct dcomplex 00160 { 00161 double real, imag; 00162 } dcomplex; 00163 00164 #endif 00165 00166 00167 #endif // BLIS_TYPE_DEFS_H