blob: 30e0718b9f696f66ea74074d85e9eedb53de253d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
// -*-C++-*-
#ifndef VECMATHLIB_H
#define VECMATHLIB_H
#if defined VML_DEBUG || defined VML_NODEBUG
# if defined VML_DEBUG && defined VML_NODEBUG
# error "Only one of VML_DEBUG or VML_NODEBUG may be defined"
# endif
#else
// default
# define VML_DEBUG
#endif
#undef VML_HAVE_DENORMALS
#undef VML_HAVE_INF
#undef VML_HAVE_NAN
#define VML_HAVE_SIGNED_ZERO
// This workaround is needed for older libstdc++ versions such as the
// one in Debian 6.0 when compiled with clang++
// <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013207.html>.
// The version time stamp used below is the one in Debian 6.0.
#include <cstring> // pull in __GLIBCXX__
#if defined __GLIBCXX__ && __GLIBCXX__ <= 20101114
namespace std { class type_info; }
#endif
#include <cassert>
#ifdef VML_DEBUG
# define VML_ASSERT(x) assert(x)
#else
# define VML_ASSERT(x) ((void)0)
#endif
// Scalarise all vector operations, and use libm's functions (mostly
// useful as fallback)
#include "vec_pseudo.h"
// Use compiler-provided vector types
// #include "vec_builtin.h"
// Scalarise all vector operations; don't use libm, use only
// Vecmathlib's functions (mostly useful for testing Vecmathlib)
#include "vec_test.h"
#if defined __SSE2__ // Intel SSE 2
# include "vec_float_sse2_scalar.h"
# include "vec_double_sse2_scalar.h"
# include "vec_float_sse2.h"
# include "vec_double_sse2.h"
#endif
#if defined __AVX__ // Intel AVX
# include "vec_fp8_avx.h"
# include "vec_fp16_avx.h"
# include "vec_float_avx.h"
# include "vec_double_avx.h"
#endif
#if defined __ALTIVEC__ // IBM Altivec
# include "vec_float_altivec.h"
#endif
#if defined __VSX__ // IBM VSX
# include "vec_double_vsx.h"
#endif
// TODO: IBM Blue Gene/P DoubleHummer
#if defined __bgq__ && defined __VECTOR4DOUBLE__ // IBM Blue Gene/Q QPX
// TODO: vec_float_qpx
# include "vec_double_qpx.h"
#endif
#endif // #ifndef VECMATHLIB_H
|