plastimatch
Loading...
Searching...
No Matches
plm_int.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _plm_int_h_
5#define _plm_int_h_
6
7#include "plm_config.h"
8
9#if defined (_MSC_VER) && (_MSC_VER < 1600)
10#include "msinttypes/stdint.h"
11#else
12#include <stdint.h>
13#endif
14
15/* These are non-standard */
16#ifndef UINT32_T_MAX
17#define UINT32_T_MAX (0xffffffff)
18#endif
19#ifndef INT32_T_MAX
20#define INT32_T_MAX (0x7fffffff)
21#endif
22#ifndef INT32_T_MIN
23#define INT32_T_MIN (-0x7fffffff - 1)
24#endif
25
26/* The data type plm_long is a signed integer with the same size as size_t.
27 It is equivalent to the POSIX idea of ssize_t. It is used for
28 OpenMP 2.0 loop variables which must be signed. */
29#if (CMAKE_SIZEOF_SIZE_T == 8)
30typedef int64_t plm_long;
31#elif (CMAKE_SIZEOF_SIZE_T == 4)
32typedef int32_t plm_long;
33#else
34#error "Unexpected value for sizeof(size_t)"
35#endif
36
37#endif