|
12 | 12 | #ifndef OMPTARGET_TYPES_H |
13 | 13 | #define OMPTARGET_TYPES_H |
14 | 14 |
|
| 15 | +#include <stddef.h> |
| 16 | +#include <stdint.h> |
| 17 | + |
15 | 18 | // Tell the compiler that we do not have any "call-like" inline assembly in the |
16 | 19 | // device rutime. That means we cannot have inline assembly which will call |
17 | 20 | // another function but only inline assembly that performs some operation or |
|
21 | 24 | // TODO: Find a good place for this |
22 | 25 | #pragma omp assumes ext_no_call_asm |
23 | 26 |
|
24 | | -/// Base type declarations for freestanding mode |
25 | | -/// |
26 | | -///{ |
27 | | -using int8_t = char; |
28 | | -using uint8_t = unsigned char; |
29 | | -using int16_t = short; |
30 | | -using uint16_t = unsigned short; |
31 | | -using int32_t = int; |
32 | | -using uint32_t = unsigned int; |
33 | | -using int64_t = long; |
34 | | -using uint64_t = unsigned long; |
35 | | -using size_t = decltype(sizeof(char)); |
36 | | -// TODO: Properly implement this |
37 | | -using intptr_t = int64_t; |
38 | | -using uintptr_t = uint64_t; |
39 | | - |
40 | | -static_assert(sizeof(int8_t) == 1, "type size mismatch"); |
41 | | -static_assert(sizeof(uint8_t) == 1, "type size mismatch"); |
42 | | -static_assert(sizeof(int16_t) == 2, "type size mismatch"); |
43 | | -static_assert(sizeof(uint16_t) == 2, "type size mismatch"); |
44 | | -static_assert(sizeof(int32_t) == 4, "type size mismatch"); |
45 | | -static_assert(sizeof(uint32_t) == 4, "type size mismatch"); |
46 | | -static_assert(sizeof(int64_t) == 8, "type size mismatch"); |
47 | | -static_assert(sizeof(uint64_t) == 8, "type size mismatch"); |
48 | | -///} |
49 | | - |
50 | 27 | enum omp_proc_bind_t { |
51 | 28 | omp_proc_bind_false = 0, |
52 | 29 | omp_proc_bind_true = 1, |
|
0 commit comments