1 #ifndef HALIDE_OBJECT_INSTANCE_REGISTRY_H 2 #define HALIDE_OBJECT_INSTANCE_REGISTRY_H 53 const void *introspection_helper);
64 static std::vector<std::pair<void *, Kind>>
instances_in_range(
void *start,
size_t size);
70 void *subject_ptr =
nullptr;
73 bool registered_for_introspection =
false;
75 InstanceInfo() =
default;
76 InstanceInfo(
size_t size,
Kind kind,
void *subject_ptr,
bool registered_for_introspection)
77 : subject_ptr(subject_ptr), size(size), kind(kind), registered_for_introspection(registered_for_introspection) {
82 std::map<uintptr_t, InstanceInfo> instances;
84 ObjectInstanceRegistry() =
default;
87 ObjectInstanceRegistry(
const ObjectInstanceRegistry &) =
delete;
88 ObjectInstanceRegistry &
operator=(
const ObjectInstanceRegistry &) =
delete;
89 ObjectInstanceRegistry(ObjectInstanceRegistry &&) =
delete;
90 ObjectInstanceRegistry &
operator=(ObjectInstanceRegistry &&) =
delete;
96 #endif // HALIDE_OBJECT_INSTANCE_REGISTRY_H
This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
static std::vector< std::pair< void *, Kind > > instances_in_range(void *start, size_t size)
Returns the list of subject pointers for objects that have been directly registered within the given ...
ObjectInstanceRegistry & operator=(const ObjectInstanceRegistry &)=delete
Not visible externally, similar to 'static' linkage in C.
static void unregister_instance(void *this_ptr)
Remove an instance from the registry.
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.