libflame  revision_anchor
blis_type_defs.h
Go to the documentation of this file.
00001 /*
00002 
00003     Copyright (C) 2014, The University of Texas at Austin
00004 
00005     This file is part of libflame and is available under the 3-Clause
00006     BSD license, which can be found in the LICENSE file at the top-level
00007     directory, or at http://opensource.org/licenses/BSD-3-Clause
00008 
00009 */
00010 
00011 #ifndef BLIS1_TYPE_DEFS_H
00012 #define BLIS1_TYPE_DEFS_H
00013 
00014 // --- Basic type definitions -------------------------------------------------
00015 
00016 /*
00017 // --- trans ---
00018 
00019 #define BLIS1_NO_TRANSPOSE      'n'
00020 #define BLIS1_TRANSPOSE         't'
00021 #define BLIS1_CONJ_NO_TRANSPOSE 'c'
00022 #define BLIS1_CONJ_TRANSPOSE    'h'
00023 
00024 // --- conj ---
00025 
00026 #define BLIS1_NO_CONJUGATE      'n'
00027 #define BLIS1_CONJUGATE         'c'
00028 
00029 // --- uplo ---
00030 
00031 #define BLIS1_LOWER_TRIANGULAR  'l'
00032 #define BLIS1_UPPER_TRIANGULAR  'u'
00033 
00034 // --- side ---
00035 
00036 #define BLIS1_LEFT              'l'
00037 #define BLIS1_RIGHT             'r'
00038 
00039 // --- diag ---
00040 
00041 #define BLIS1_NONUNIT_DIAG      'n'
00042 #define BLIS1_UNIT_DIAG         'u'
00043 #define BLIS1_ZERO_DIAG         'z'
00044 */
00045 
00046 #define BLIS1_TRANS_BEGIN 100
00047 #define BLIS1_UPLO_BEGIN  200
00048 #define BLIS1_SIDE_BEGIN  300
00049 #define BLIS1_DIAG_BEGIN  400
00050 #define BLIS1_CONJ_BEGIN  500
00051 
00052 typedef enum
00053 {
00054     BLIS1_NO_TRANSPOSE = BLIS1_TRANS_BEGIN,
00055     BLIS1_TRANSPOSE,
00056     BLIS1_CONJ_NO_TRANSPOSE,
00057     BLIS1_CONJ_TRANSPOSE
00058 } trans1_t;
00059 
00060 typedef enum
00061 {
00062     BLIS1_LOWER_TRIANGULAR = BLIS1_UPLO_BEGIN,
00063     BLIS1_UPPER_TRIANGULAR
00064 } uplo1_t;
00065 
00066 typedef enum
00067 {
00068     BLIS1_LEFT = BLIS1_SIDE_BEGIN,
00069     BLIS1_RIGHT
00070 } side1_t;
00071 
00072 typedef enum
00073 {
00074     BLIS1_NONUNIT_DIAG = BLIS1_DIAG_BEGIN,
00075     BLIS1_UNIT_DIAG,
00076     BLIS1_ZERO_DIAG
00077 } diag1_t;
00078 
00079 typedef enum
00080 {
00081     BLIS1_NO_CONJUGATE = BLIS1_CONJ_BEGIN,
00082     BLIS1_CONJUGATE
00083 } conj1_t;
00084 
00085 
00086 
00087 
00088 
00089 // --- Intrinsic/assembly definitions ----------------------------------------
00090 
00091 /*
00092 #ifndef BLIS1_FROM_LIBFLAME
00093     #error "NOT using blis from libflame"
00094 #else
00095     #error "using blis from libflame"
00096 #endif
00097 */
00098 
00099 /*
00100 #if BLIS1_VECTOR_INTRINSIC_TYPE == BLIS1_SSE_INTRINSICS
00101     #error "using sse in blis"
00102 #elif  BLIS1_VECTOR_INTRINSIC_TYPE == BLIS1_NO_INTRINSICS
00103     #error "NOT using sse in blis"
00104 #else
00105     #error "undefined case!"
00106 #endif
00107 */
00108 
00109 // Only define vector intrinsics types if they are not already provided by
00110 // libflame.
00111 #ifndef BLIS1_FROM_LIBFLAME
00112 
00113 #if BLIS1_VECTOR_INTRINSIC_TYPE == BLIS1_SSE_INTRINSICS
00114 
00115 #include "pmmintrin.h"
00116 typedef union
00117 {
00118     __m128d v; 
00119     double  d[2];
00120 } v2df_t;
00121 #endif
00122 
00123 #endif
00124 
00125 
00126 // --- Complex type definitions -----------------------------------------------
00127 
00128 // Only define complex types if they are not already provided by libflame.
00129 //#ifndef BLIS1_ENABLE_USE_OF_LIBFLAME_TYPES
00130 #ifndef BLIS1_FROM_LIBFLAME
00131 
00132 typedef struct scomplex
00133 {
00134   float real, imag;
00135 } scomplex;
00136 
00137 typedef struct dcomplex
00138 {
00139   double real, imag;
00140 } dcomplex;
00141 
00142 #endif
00143 
00144 
00145 #endif // BLIS1_TYPE_DEFS_H