xerus
a general purpose tensor library
standard.h
Go to the documentation of this file.
1 // Xerus - A General Purpose Tensor Library
2 // Copyright (C) 2014-2017 Benjamin Huber and Sebastian Wolf.
3 //
4 // Xerus is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as published
6 // by the Free Software Foundation, either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // Xerus is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
13 //
14 // You should have received a copy of the GNU Affero General Public License
15 // along with Xerus. If not, see <http://www.gnu.org/licenses/>.
16 //
17 // For further information on Xerus visit https://libXerus.org
18 // or contact us at contact@libXerus.org.
19 
25 #pragma once
26 
27 #include <stddef.h>
28 #include <cstdint>
29 #include <cstddef>
30 
31 namespace xerus {
35  namespace misc {
37  namespace internal {}
38  }
39 
43  extern const int VERSION_MAJOR;
44  extern const int VERSION_MINOR;
45  extern const int VERSION_REVISION;
46  extern const int VERSION_COMMIT;
47 
48  // Shorter names for unsigned types
49  typedef uint8_t byte;
50  typedef unsigned short ushort;
51  typedef unsigned int uint;
52  typedef unsigned long ulong;
53 
54  // Shorter names for fixed width types
55  typedef int8_t int8;
56  typedef int16_t int16;
57  typedef int32_t int32;
58  typedef int64_t int64;
59 
60  typedef uint8_t uint8;
61  typedef uint16_t uint16;
62  typedef uint32_t uint32;
63  typedef uint64_t uint64;
64 
65 }
66 
67 // all of these can be writen like [[gnu::unused]] but kdevelop will not recognize them then
72 #if defined(__clang__)
73  #define XERUS_force_inline inline
74 #else
75  #define XERUS_force_inline inline __attribute__((always_inline, gnu_inline))
76 #endif
77 
78 #define XERUS_warn_unused __attribute__((warn_unused_result))
uint64_t uint64
Definition: standard.h:63
const int VERSION_MINOR
Definition: standard.cpp:29
The main namespace of xerus.
Definition: basic.h:37
uint16_t uint16
Definition: standard.h:61
const int VERSION_MAJOR
Definition: standard.cpp:28
unsigned long ulong
Definition: standard.h:52
int64_t int64
Definition: standard.h:58
uint8_t uint8
Definition: standard.h:60
int16_t int16
Definition: standard.h:56
uint8_t byte
unsigned int type of exactly 8 bit
Definition: standard.h:49
int8_t int8
Definition: standard.h:55
unsigned int uint
Definition: standard.h:51
uint32_t uint32
Definition: standard.h:62
unsigned short ushort
Definition: standard.h:50
const int VERSION_COMMIT
Definition: standard.cpp:31
int32_t int32
Definition: standard.h:57
const int VERSION_REVISION
Definition: standard.cpp:30