https://github.com/halide/Halide
Raw File
Tip revision: 5008e6610f7a76effe053425a0dafb1d3bfa3d56 authored by Patricia Suriana on 07 June 2018, 23:30:43 UTC
Use user_warning instead of std::cerr
Tip revision: 5008e66
prefetch.cpp
#include "HalideRuntime.h"

extern "C" {

// These need to inline, otherwise the extern call with the ptr
// parameter breaks a lot of optimizations.
__attribute__((always_inline))
WEAK int _halide_prefetch(const void *ptr) {
    __builtin_prefetch(ptr, 1, 3);
    return 0;
}

}
back to top