Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
// 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.
# 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
#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);
#define AUTOTUNE_N 1024,1024
#include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
ImageParam in_img(UInt(16), 2);
Func blur_x("blur_x"), blur_y("blur_y");
Var x("x"), y("y"), xi("xi"), yi("yi");
Sampling process 8459 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Simplenote (pid 8459) every 1 millisecond
Process: Simplenote [8459]
Path: /Applications/Simplenote.app/Contents/MacOS/Simplenote
Load Address: 0x1019e5000
Identifier: com.automattic.SimplenoteMac
Version: 1.0.1 (20)
Code Type: X86-64 (Native)
Parent Process: launchd [133]
@jrk
jrk / README.md
Created October 24, 2013 16:26
A trivial Keynote '13 document `Index` tree

An example of a Keynote '13 Index tree, unpacked from a document bundle.

  • The document uses the default black template
  • It has two slides:
    • Slide 1 is a simple Title format slide, with title line "My title" and secondary line "My author"
  • Slide 2 is a simple bullet slide with headline "Some heading", a single bullet "Some bullet", and presenter notes "These are presenter notes." (in the default note style, which uses Avenir regular/black as the font)
@jrk
jrk / ulimit_out_of_memory.cpp
Created February 17, 2014 22:07
Halide test for error behavior when ulimits prevent sufficient memory allocation
// NOTE: these setrlimit APIs are not implemented in OS X. This should only actually catch failure on Linux.
// TODO: also test overflow on output, intermediate allocations
#include <Halide.h>
#include <stdio.h>
#include <sys/resource.h>
using namespace Halide;
size_t memory_limit_bytes = 1024*1024*128; // 128MB - plenty for Halide, not enough for buffers
@jrk
jrk / .gitignore
Last active August 29, 2015 13:56
Halide multi-pipeline CUDA initialization bug
hl
process
initialize_halide.o
visualize_halide.o
initialize_halide.h
visualize_halide.h
@jrk
jrk / words_changed.py
Created February 20, 2014 21:52
Count words changed in plain text by parsing color codes in git diff --color-words output
#!/usr/bin/env python
import sys, re
import datetime
from subprocess import Popen, PIPE
rev_cmd = 'git rev-list -n1 --before="%s" master'
diff_cmd = 'git diff --color-words $(%s) -- *.md' % rev_cmd # FIXME: hard coded to markdown files
def count_changed(stream):