https://github.com/halide/Halide
Raw File
Tip revision: d94e7a75ac22eca6225f9aa0cff857592a9e6504 authored by Steven Johnson on 21 October 2020, 16:44:25 UTC
Update CodeGen_Hexagon.cpp
Tip revision: d94e7a7
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