Halide
|
Functions | |
std::string | get_variable_name (const void *, const std::string &expected_type) |
Get the name of a stack variable from its address. More... | |
void | register_heap_object (const void *obj, size_t size, const void *helper) |
Register an untyped heap object. More... | |
void | deregister_heap_object (const void *obj, size_t size) |
Deregister a heap object. More... | |
bool | dump_stack_frame () |
Dump the contents of the stack frame of the calling function. More... | |
template<typename T > | |
const void * | get_introspection_helper () |
Return the address of a global with type T *. More... | |
std::string | get_source_location () |
Get the source location in the call stack, skipping over calls in the Halide namespace. More... | |
void | test_compilation_unit (bool(*test)(bool(*)(const void *, const std::string &)), bool(*test_a)(const void *, const std::string &), void(*calib)()) |
std::string Halide::Internal::Introspection::get_variable_name | ( | const void * | , |
const std::string & | expected_type | ||
) |
Get the name of a stack variable from its address.
The stack variable must be in a compilation unit compiled with -g to work. The expected type helps distinguish between variables at the same address, e.g a class instance vs its first member.
void Halide::Internal::Introspection::register_heap_object | ( | const void * | obj, |
size_t | size, | ||
const void * | helper | ||
) |
Register an untyped heap object.
Derive type information from an introspectable pointer to a pointer to a global object of the same type. Not thread-safe.
void Halide::Internal::Introspection::deregister_heap_object | ( | const void * | obj, |
size_t | size | ||
) |
Deregister a heap object.
Not thread-safe.
bool Halide::Internal::Introspection::dump_stack_frame | ( | ) |
Dump the contents of the stack frame of the calling function.
Used for debugging stack frame sizes inside the compiler. Returns whether or not it was able to find the relevant debug information.
const void* Halide::Internal::Introspection::get_introspection_helper | ( | ) |
Return the address of a global with type T *.
Call this to generate something to pass as the last argument to register_heap_object.
Definition at line 50 of file Introspection.h.
std::string Halide::Internal::Introspection::get_source_location | ( | ) |
Get the source location in the call stack, skipping over calls in the Halide namespace.
void Halide::Internal::Introspection::test_compilation_unit | ( | bool(*)(bool(*)(const void *, const std::string &)) | test, |
bool(*)(const void *, const std::string &) | test_a, | ||
void(*)() | calib | ||
) |