1#ifndef HALIDE_OBJECT_INSTANCE_REGISTRY_H
2#define HALIDE_OBJECT_INSTANCE_REGISTRY_H
71 void *subject_ptr =
nullptr;
74 bool registered_for_introspection =
false;
76 InstanceInfo() =
default;
77 InstanceInfo(
size_t size,
Kind kind,
void *subject_ptr,
bool registered_for_introspection)
78 : subject_ptr(subject_ptr), size(size), kind(kind), registered_for_introspection(registered_for_introspection) {
83 std::map<uintptr_t, InstanceInfo> instances;
85 ObjectInstanceRegistry() =
default;
ObjectInstanceRegistry(const ObjectInstanceRegistry &)=delete
ObjectInstanceRegistry & operator=(const ObjectInstanceRegistry &)=delete
static void unregister_instance(void *this_ptr)
Remove an instance from the registry.
ObjectInstanceRegistry & operator=(ObjectInstanceRegistry &&)=delete
static void register_instance(void *this_ptr, size_t size, Kind kind, void *subject_ptr, const void *introspection_helper)
Add an instance to the registry.
ObjectInstanceRegistry(ObjectInstanceRegistry &&)=delete
static std::vector< void * > instances_in_range(void *start, size_t size, Kind kind)
Returns the list of subject pointers for objects that have been directly registered within the given ...
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
Expr cast(Expr a)
Cast an expression to the halide type corresponding to the C++ type T.