batmat
0.0.21
Batched linear algebra routines
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <stdfloat>
5
6
namespace
batmat
{
7
8
#ifdef __clangd__
9
using
real_t
= double;
// clangd does not support std::float128_t etc.
10
#else
11
using
real_t
= double;
12
#endif
13
using
index_t
= int;
14
15
}
// namespace batmat
16
17
#ifndef BATMAT_VERIFY_ASSUMPTIONS
18
#define BATMAT_VERIFY_ASSUMPTIONS 0
19
#endif
20
#ifndef BATMAT_WITH_OPENMP
21
#define BATMAT_WITH_OPENMP 1
22
#endif
23
#ifndef BATMAT_WITH_GSI_HPC_SIMD
24
#define BATMAT_WITH_GSI_HPC_SIMD 0
25
#endif
26
27
#define BATMAT_HAS_DOUBLE_VL_1 1
28
#define BATMAT_HAS_DOUBLE_VL_4 1
29
#define BATMAT_HAS_DOUBLE_VL_8 1
30
31
#define BATMAT_FOREACH_VL_DOUBLE(X, ...) \
32
X(1 __VA_OPT__(,) __VA_ARGS__) \
33
X(4 __VA_OPT__(,) __VA_ARGS__) \
34
X(8 __VA_OPT__(,) __VA_ARGS__)
35
36
#define BATMAT_FOREACH_VL_DEFAULT(X, ...) BATMAT_FOREACH_VL_DOUBLE(X, __VA_ARGS__)
37
38
#define BATMAT_FOREACH_DTYPE(X, ...) \
39
X(double __VA_OPT__(,) __VA_ARGS__)
40
41
#define BATMAT_FOREACH_DTYPE_VL(X, ...) \
42
X(double, 1 __VA_OPT__(,) __VA_ARGS__) \
43
X(double, 4 __VA_OPT__(,) __VA_ARGS__) \
44
X(double, 8 __VA_OPT__(,) __VA_ARGS__)
45
46
47
#ifdef __clangd__
48
#undef BATMAT_WITH_OPENMP
// clangd sometimes crashes on OpenMP constructs
49
#define BATMAT_WITH_OPENMP 0
50
#endif
batmat
Definition
dtypes.hpp:9
batmat::real_t
double real_t
Definition
config.hpp:11
batmat::index_t
int index_t
Definition
config.hpp:13
build
src
include
batmat
config.hpp
Generated on
for batmat by
1.16.1