https://github.com/halide/Halide
Raw File
Tip revision: 1d9f85b132d4157b36d5653bdbbe176016ccd3f3 authored by Andrew Adams on 04 August 2020, 23:41:45 UTC
Loops in between a store_at and a compute_at are ordered
Tip revision: 1d9f85b
destructors.cpp
#include "HalideRuntime.h"

extern "C" {

ALWAYS_INLINE __attribute__((used)) void call_destructor(void *user_context, void (*fn)(void *user_context, void *object), void **object, bool should_call) {
    void *o = *object;
    *object = NULL;
    // Call the function
    if (o && should_call) {
        fn(user_context, o);
    }
}
}
back to top