libflame revision_anchor
blis_type_defs.h
Go to the documentation of this file.
1/*
2
3 Copyright (C) 2014, The University of Texas at Austin
4
5 This file is part of libflame and is available under the 3-Clause
6 BSD license, which can be found in the LICENSE file at the top-level
7 directory, or at http://opensource.org/licenses/BSD-3-Clause
8
9*/
10
11#ifndef BLIS1_TYPE_DEFS_H
12#define BLIS1_TYPE_DEFS_H
13
14// --- Basic type definitions -------------------------------------------------
15
16/*
17// --- trans ---
18
19#define BLIS1_NO_TRANSPOSE 'n'
20#define BLIS1_TRANSPOSE 't'
21#define BLIS1_CONJ_NO_TRANSPOSE 'c'
22#define BLIS1_CONJ_TRANSPOSE 'h'
23
24// --- conj ---
25
26#define BLIS1_NO_CONJUGATE 'n'
27#define BLIS1_CONJUGATE 'c'
28
29// --- uplo ---
30
31#define BLIS1_LOWER_TRIANGULAR 'l'
32#define BLIS1_UPPER_TRIANGULAR 'u'
33
34// --- side ---
35
36#define BLIS1_LEFT 'l'
37#define BLIS1_RIGHT 'r'
38
39// --- diag ---
40
41#define BLIS1_NONUNIT_DIAG 'n'
42#define BLIS1_UNIT_DIAG 'u'
43#define BLIS1_ZERO_DIAG 'z'
44*/
45
46#define BLIS1_TRANS_BEGIN 100
47#define BLIS1_UPLO_BEGIN 200
48#define BLIS1_SIDE_BEGIN 300
49#define BLIS1_DIAG_BEGIN 400
50#define BLIS1_CONJ_BEGIN 500
51
59
60typedef enum
61{
62 BLIS1_LOWER_TRIANGULAR = BLIS1_UPLO_BEGIN,
65
66typedef enum
67{
68 BLIS1_LEFT = BLIS1_SIDE_BEGIN,
71
72typedef enum
73{
74 BLIS1_NONUNIT_DIAG = BLIS1_DIAG_BEGIN,
78
79typedef enum
80{
81 BLIS1_NO_CONJUGATE = BLIS1_CONJ_BEGIN,
84
85
86
87
88
89// --- Intrinsic/assembly definitions ----------------------------------------
90
91/*
92#ifndef BLIS1_FROM_LIBFLAME
93 #error "NOT using blis from libflame"
94#else
95 #error "using blis from libflame"
96#endif
97*/
98
99/*
100#if BLIS1_VECTOR_INTRINSIC_TYPE == BLIS1_SSE_INTRINSICS
101 #error "using sse in blis"
102#elif BLIS1_VECTOR_INTRINSIC_TYPE == BLIS1_NO_INTRINSICS
103 #error "NOT using sse in blis"
104#else
105 #error "undefined case!"
106#endif
107*/
108
109// Only define vector intrinsics types if they are not already provided by
110// libflame.
111#ifndef BLIS1_FROM_LIBFLAME
112
113#if BLIS1_VECTOR_INTRINSIC_TYPE == BLIS1_SSE_INTRINSICS
114
115#include "pmmintrin.h"
116typedef union
117{
118 __m128d v;
119 double d[2];
120} v2df_t;
121#endif
122
123#endif
124
125
126// --- Complex type definitions -----------------------------------------------
127
128// Only define complex types if they are not already provided by libflame.
129//#ifndef BLIS1_ENABLE_USE_OF_LIBFLAME_TYPES
130#ifndef BLIS1_FROM_LIBFLAME
131
132typedef struct scomplex
133{
134 float real, imag;
136
137typedef struct dcomplex
138{
139 double real, imag;
141
142#endif
143
144
145#endif // BLIS1_TYPE_DEFS_H
struct scomplex scomplex
uplo1_t
Definition blis_type_defs.h:61
@ BLIS1_LOWER_TRIANGULAR
Definition blis_type_defs.h:62
@ BLIS1_UPPER_TRIANGULAR
Definition blis_type_defs.h:63
struct dcomplex dcomplex
diag1_t
Definition blis_type_defs.h:73
@ BLIS1_UNIT_DIAG
Definition blis_type_defs.h:75
@ BLIS1_ZERO_DIAG
Definition blis_type_defs.h:76
@ BLIS1_NONUNIT_DIAG
Definition blis_type_defs.h:74
trans1_t
Definition blis_type_defs.h:53
@ BLIS1_NO_TRANSPOSE
Definition blis_type_defs.h:54
@ BLIS1_CONJ_TRANSPOSE
Definition blis_type_defs.h:57
@ BLIS1_TRANSPOSE
Definition blis_type_defs.h:55
@ BLIS1_CONJ_NO_TRANSPOSE
Definition blis_type_defs.h:56
conj1_t
Definition blis_type_defs.h:80
@ BLIS1_CONJUGATE
Definition blis_type_defs.h:82
@ BLIS1_NO_CONJUGATE
Definition blis_type_defs.h:81
side1_t
Definition blis_type_defs.h:67
@ BLIS1_RIGHT
Definition blis_type_defs.h:69
@ BLIS1_LEFT
Definition blis_type_defs.h:68
Definition blis_type_defs.h:138
double real
Definition blis_type_defs.h:139
double imag
Definition blis_type_defs.h:139
Definition blis_type_defs.h:133
float imag
Definition blis_type_defs.h:134
float real
Definition blis_type_defs.h:134
Definition blis_type_defs.h:117
__m128d v
Definition blis_type_defs.h:118