https://github.com/halide/Halide
Raw File
Tip revision: d10c6fd35a6c331493843bc2db2ccf0c3aed6a9a authored by Andrew Adams on 12 June 2023, 17:29:45 UTC
Fix inverted may_subtile checks
Tip revision: d10c6fd
prefetch.cpp
#include "HalideRuntime.h"

extern "C" {

// These need to inline, otherwise the extern call with the ptr
// parameter breaks a lot of optimizations, but needs to be WEAK
// so that Codegen_LLVM can find an instance of the Function to insert.
WEAK_INLINE int _halide_prefetch(const void *ptr) {
    constexpr int rw = 0;        // 1 = write, 0 = read
    constexpr int locality = 0;  // 0 = no temporal locality, 3 = high temporal locality
    __builtin_prefetch(ptr, rw, locality);
    return 0;
}
}
back to top