Skip to content

Instantly share code, notes, and snippets.

@jrk
Last active December 15, 2015 10:48
Show Gist options
  • Save jrk/5247976 to your computer and use it in GitHub Desktop.
Save jrk/5247976 to your computer and use it in GitHub Desktop.
Halide tutorial
# TODO: set this to the path to Halide/cpp on your machine:
export HL_ROOT=${HOME}/path/to/Halide/cpp
export PATH=${HL_ROOT}/bin:${PATH}
export LD_LIBRARY_PATH=${HL_ROOT}/bin:${LD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH=${HL_ROOT}/bin:${DYLD_LIBRARY_PATH}
export CFLAGS="-I${HL_ROOT}/include $(llvm-config --cflags) ${CFLAGS}"
export LDFLAGS="-L${HL_ROOT}/bin -lHalide -lpthread -ldl -L$(llvm-config --libdir) $(llvm-config --libs bitwriter bitreader x86 arm linker nvptx ipo mcjit jit) ${LDFLAGS}"
alias hlc="c++ ${CFLAGS} ${LDFLAGS}"
#include <stdio.h>
#include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment