Cypress
1.0
C++ Spiking Neural Network Simulation Framework
Main Page
Namespaces
Classes
Files
File List
File Members
cypress
core
types.hpp
Go to the documentation of this file.
1
/*
2
* Cypress -- C++ Spiking Neural Network Simulation Framework
3
* Copyright (C) 2016 Andreas Stöckel
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#pragma once
20
21
#ifndef CYPRESS_CORE_TYPES_HPP
22
#define CYPRESS_CORE_TYPES_HPP
23
24
#include <cstdint>
25
26
#include <cypress/config.h>
27
28
namespace
cypress
{
29
33
using
sx_double_t
=
long
double;
34
38
using
sx_int_t
=
unsigned
long
long
int;
39
44
#if CYPRESS_REAL_WIDTH == 4
45
using
Real
= float;
46
#elif CYPRESS_REAL_WIDTH == 8
47
using
Real
= double;
48
#elif CYPRESS_REAL_WIDTH == 10
49
using
Real
=
long
double;
50
#elif CYPRESS_REAL_WIDTH == 16
51
extern
"C"
{
52
#include <quadmath.h>
53
}
54
using
Real
= __float128;
55
#else
56
using
Real
= double;
57
#error Invalid value for CYPRESS_REAL_WIDTH supplied!
58
#endif
59
65
static
constexpr
Real
operator
""
_R(
sx_double_t
x) {
return
Real
(x); }
66
72
static
constexpr
Real
operator
""
_R(
sx_int_t
x) {
return
Real
(x); }
73
74
using
NeuronIndex
= int32_t;
75
using
PopulationIndex
= int32_t;
76
77
}
78
79
#endif
/* CYPRESS_CORE_TYPES_HPP */
cypress::sx_double_t
long double sx_double_t
Definition:
types.hpp:33
cypress::NeuronIndex
int32_t NeuronIndex
Definition:
types.hpp:74
cypress::Real
double Real
Definition:
types.hpp:56
cypress::sx_int_t
unsigned long long int sx_int_t
Definition:
types.hpp:38
cypress
Definition:
brainscales_lib.hpp:39
cypress::PopulationIndex
int32_t PopulationIndex
Definition:
types.hpp:75
Generated by
1.8.11