File: bigmemoryDefines.h

package info (click to toggle)
r-cran-bigmemory 4.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: cpp: 4,930; ansic: 131; sh: 13; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 961 bytes parent folder | download | duplicates (2)
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

#ifndef BIGMEMORY_DEFINES_H
#define BIGMEMORY_DEFINES_H

#include <float.h>             // for FLT_{MIN,MAX}, or use <cfloat> if C++ idioms are preferred
#include <limits.h>
#include <stdint.h>

#if __STDC_VERSION__ >= 199901L
  #define HAVE_COMPLEX
  #include <complex.h>
  #undef I
#else
  #undef HAVE_COMPLEX
#endif 

#ifdef __intptr_t_defined
  typedef intptr_t index_type;
#else
  // We don't have 64-bit indexing.  Build with 32.
  typedef long index_type;
#endif

#define NA_CHAR CHAR_MIN
#define NA_SHORT SHRT_MIN
#define R_INT_MIN (1+INT_MIN)
#define R_INT_MAX INT_MAX
#define R_SHORT_MIN (1+SHRT_MIN)
#define R_SHORT_MAX SHRT_MAX
#define R_CHAR_MIN (1+CHAR_MIN)
#define R_CHAR_MAX CHAR_MAX
#define R_DOUBLE_MIN R_NegInf
#define R_DOUBLE_MAX R_PosInf

#define NA_FLOAT FLT_MIN
#define R_FLT_MIN -FLT_MAX
#define R_FLT_MAX FLT_MAX

#ifdef HAVE_LONG_DOUBLE
# define LDOUBLE long double
#else
# define LDOUBLE double
#endif

#endif //BIGMEMORY_DEFINES_H