This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Halide.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
#include <Halide.h> | |
using namespace Halide; | |
int main(int argc, char **argv) { | |
ImageParam in_img(UInt(16), 2); |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 "src/CodeGen_ARM.cpp" | |
# 1 "<built-in>" 1 | |
# 1 "<built-in>" 3 | |
# 166 "<built-in>" 3 | |
# 1 "<command line>" 1 | |
# 1 "<built-in>" 2 | |
# 1 "src/CodeGen_ARM.cpp" 2 | |
# 1 "src/CodeGen_ARM.h" 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compiled with clang++ "/run/shm/halideVwHhPM.cpp" -o "/run/shm/halideVwHhPM.bin" -I "/home/jansel/Halide/include" "/home/jansel/Halide/bin/libHalide.a" -ldl -lpthread -DAUTOTUNE_N="1024, 1024" -DAUTOTUNE_TRIALS=3 | |
#include <Halide.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
#ifndef AUTOTUNE_N | |
#define AUTOTUNE_N 1000, 1000 | |
#endif |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# | |
# File : CImg.h | |
# ( C++ header file ) | |
# | |
# Description : The C++ Template Image Processing Toolkit. | |
# This file is the main component of the CImg Library project. | |
# ( http://cimg.sourceforge.net ) | |
# | |
# Project manager : David Tschumperle. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135 | |
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. | |
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt | |
# Usage within SublimeClang: | |
# "sublimeclang_options_script": "python ${home}/code/cmake_options_script.py ${project_path:build}/compile_commands.json", | |
import re | |
import os | |
import os.path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f(v0, v1) = v0*v1 | |
g(v2, v3, v4) = f(v2, v3) | |
h(v5, v6) = g(v5, v6, 0) + g(v5, v6, 1) | |
h.root() // h is output, so this is implicit | |
// this means: | |
[allocate h] | |
for all v6: | |
for all v5: | |
h[v5,v6] = g(v5,v6,0) + g(v5,v6,1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Llvm | |
open Llvm_bitwriter | |
let _ = | |
let c = global_context () in | |
let m = create_module c "mod" in | |
let b = builder c in | |
let i32_t = i32_type c in | |
let ptr_t = pointer_type i32_t in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEMPLATE = lib | |
CONFIG += qt thread debug_and_release staticlib | |
DESTDIR = "../lib" | |
CONFIG( debug, debug|release ) { | |
TARGET = libcgt_cored | |
} else { | |
TARGET = libcgt_core | |
DEFINES += _SECURE_SCL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Example usage: | |
%% \squishlist %% \begin{itemize} | |
%% \item First item | |
%% \item Second item | |
%% \squishend %% \end{itemize} | |
\newcommand{\squishlist}{ | |
\begin{list} | |
{$\bullet$} { \setlength{ | |
\itemsep}{0pt} \setlength{\parsep}{3pt} \setlength{\topsep}{3pt} \setlength{ | |
\partopsep}{0pt} \setlength{\leftmargin}{1.5em} \setlength{\labelwidth}{1em} \setlength{\labelsep}{0.5em} } } |