1 | #pragma once |
---|---|
2 | |
3 | // Use relative path here for runtime compilation |
4 | #include "taichi/inc/constants.h" |
5 | |
6 | #if defined(TI_RUNTIME_HOST) |
7 | namespace taichi::lang { |
8 | #endif |
9 | |
10 | struct MemRequest { |
11 | std::size_t size; |
12 | std::size_t alignment; |
13 | uint8 *ptr; |
14 | std::size_t __padding; |
15 | }; |
16 | |
17 | static_assert((sizeof(MemRequest) & (sizeof(MemRequest) - 1)) == 0); |
18 | |
19 | struct MemRequestQueue { |
20 | MemRequest requests[taichi_max_num_mem_requests]; |
21 | int tail; |
22 | int processed; |
23 | }; |
24 | |
25 | #if defined(TI_RUNTIME_HOST) |
26 | } // namespace taichi::lang |
27 | #endif |
28 |