Halide 22.0.0 Halide compiler and libraries

common.h
Go to the documentation of this file.
1#ifndef HALIDE_TEST_RUNTIME_COMMON_H_
2#define HALIDE_TEST_RUNTIME_COMMON_H_
3
4#include "HalideRuntime.h"
5
6namespace Halide::Runtime::Internal {
7
8 size_t get_allocated_system_memory();
9 void *allocate_system(void *user_context, size_t bytes);
10 void deallocate_system(void *user_context, void *aligned_ptr);
11
12} // namespace Halide::Runtime::Internal
13
14#define HALIDE_CHECK(user_context, cond) \
15 do { \
16 if (!(cond)) { \
17 halide_print(user_context, __FILE__ ":" _halide_expand_and_stringify(__LINE__) " HALIDE_CHECK() failed: " #cond "\n"); \
18 abort(); \
19 } \
20 } while (0)
21
22#endif // HALIDE_TEST_RUNTIME_COMMON_H_
HalideRuntime.h
This file declares the routines used by Halide internally in its runtime.
Halide::Runtime::Internal
Definition: constants.h:13
Halide::Runtime::Internal::allocate_system
void * allocate_system(void *user_context, size_t bytes)
Halide::Runtime::Internal::get_allocated_system_memory
size_t get_allocated_system_memory()
Halide::Runtime::Internal::deallocate_system
void deallocate_system(void *user_context, void *aligned_ptr)
user_context
void * user_context
Definition: vulkan_resources.h:178