-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.h
26 lines (20 loc) · 724 Bytes
/
constants.h
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
//-----------------------------------------------------------
// Copyright (C) 2019 Piotr (Peter) Beben <pdbcas@gmail.com>
// See LICENSE included.
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <Eigen/Dense>
#include <limits>
#define ALIGNED_MEMORY
#ifdef ALIGNED_MEMORY
const size_t ALIGNEDX = Eigen::Aligned16;
inline size_t align_padded(size_t n) {
return ALIGNEDX > 0 ? ALIGNEDX*(1+((n-1)/ALIGNEDX)) : n;
}
#else
const size_t ALIGNEDX = Eigen::Unaligned;
inline size_t align_padded(size_t n) { return n; }
#endif
const float float_infinity = std::numeric_limits<float>::infinity();
const double double_infinity = std::numeric_limits<double>::infinity();
#endif // CONSTANTS_H