Skip to content

Instantly share code, notes, and snippets.

@abadams
abadams / gist:56d7cd35954cfbea6edd
Created November 28, 2014 20:12
skicka error log when it creates a duplicate file
skicka: Getting list of files to upload... 2014/11/28 03:14:27 Time [Get file descriptors from Google Drive]: 4.476880205s
Done. Starting upload.
2014/11/28 03:14:27 Time [Walk local directories]: 160.473us
2014/11/28 03:14:27 syncFileUp: &os.fileStat{name:"Halide_binaries_to_upload", size:4096, mode:0x800001ed, modTime:time.Time{sec:63552770063, nsec:0x14337183, loc:(*time.Location)(0x9643c0)}, sys:(*syscall.Stat_t)(0x4c20804ec60)}
2014/11/28 03:14:27 updating modification time of Halide Binaries to 2014-11-28 03:14:23.338915715 -0800 PST
0 / 10 0.00 % 2014/11/28 03:14:29 Time [Create Google Drive directories]: 1.629894207s
2014/11/28 03:14:29 syncFileUp: &os.fileStat{name:"halide_Linux_32_pnacl_8e3d9a5dcbfef173cccacd5d04148e291b46b36c_2014_11_28.tgz", size:30845085, mode:0x1a4, modTime:time.Time{sec:63552769777, nsec:0x1e53d349, loc:(*time.Location)(0x9643c0)}, sys:(*syscall.Stat_t)(0x4c20804ee10)}
2014/11/28 03:14:29 inserting &drive.File{AlternateLink:"", AppDataContents:false, Copyable:false, CreatedDa
diff --git a/apps/opengl_demo/Makefile b/apps/opengl_demo/Makefile
index 3b0948a..8e5294a 100644
--- a/apps/opengl_demo/Makefile
+++ b/apps/opengl_demo/Makefile
@@ -1,20 +1,21 @@
+
#
# This could be more DRY using some Makefile magic, but for the example
# app will try to maximize clarity by making most rules explicit
#
diff --git a/apps/opengl_demo/Makefile b/apps/opengl_demo/Makefile
index 8c75fa5..a9fc30f 100644
--- a/apps/opengl_demo/Makefile
+++ b/apps/opengl_demo/Makefile
@@ -26,12 +26,14 @@ ifeq ($(UNAME),Darwin)
# These are for OS X:
DTX_FONT = /Library/Fonts/Arial.ttf
OPENGL_LIBS = -lglfw3 -framework OpenGL -framework GLUT
+ GENERATOR_LIBS = -lHalide -lz -lcurses
@abadams
abadams / test.cpp
Created December 23, 2016 01:46
Scheduling a chain of horizontal stencils
#include "Halide.h"
#include "benchmark.h"
using namespace Halide;
int main(int argc, char **argv) {
Var x, y, z, yi, xi;
Func f1, f2, res;
ImageParam input1(type_of<float>(), 3);
@abadams
abadams / gist:ac5c401da3feb1a892ebb0c56fb3008c
Created January 11, 2017 03:30
msvc output with new CMake config
1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Release x64 ------
1> Checking Build System
1> CMake does not need to re-run because D:/b/slave/win-64-trunk/halide-build-Release/CMakeFiles/generate.stamp is up-to-date.
1> CMake does not need to re-run because D:/b/slave/win-64-trunk/halide-build-Release/src/CMakeFiles/generate.stamp is up-to-date.
1> CMake does not need to re-run because D:/b/slave/win-64-trunk/halide-build-Release/tools/CMakeFiles/generate.stamp is up-to-date.
1> CMake does not need to re-run because D:/b/slave/win-64-trunk/halide-build-Release/test/CMakeFiles/generate.stamp is up-to-date.
1> CMake does not need to re-run because D:/b/slave/win-64-trunk/halide-build-Release/tutorial/CMakeFiles/generate.stamp is up-to-date.
1> CMake does not need to re-run because D:/b/slave/win-64-trunk/halide-build-Release/util/CMakeFiles/generate.stamp is up-to-date.
2>------ Rebuild All started: Project: bitcode2cpp, Configuration: Release x64 ------
3>------ Rebuild All started:
@abadams
abadams / embiggen_stack.cpp
Last active February 6, 2017 21:23
Demonstration of swapping out the stack pointer
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int silly_factorial(int i) {
if (i == 0) {
int x;
printf("Hello from %p\n", &x);
return 1;
}
.version 4.0
.target sm_50
.address_size 64
// .globl kernel_out_s0_y_y___block_id_y // -- Begin function kernel_out_s0_y_y___block_id_y
// @kernel_out_s0_y_y___block_id_y
.visible .entry kernel_out_s0_y_y___block_id_y(
.param .u32 kernel_out_s0_y_y___block_id_y_param_0,
.param .u32 kernel_out_s0_y_y___block_id_y_param_1,
.param .u32 kernel_out_s0_y_y___block_id_y_param_2,
abadams@abadams-mbp:/Applications/Adobe Photoshop CC 2018/Adobe Photoshop CC 2018.app/Contents/Required/Plug-ins/Extensions/HalideBottlenecks.plugin/Contents/MacOS
$ strings HalideBottlenecks | grep ^Halide
HalideBNBlend8ProcWrapper
HalideGenBNColorOnly_sse41
HalideGenBNColorOnlyConst_sse41
HalideGenBNColorOnlyConstDeep_sse41
HalideGenBNColorOnlyConstFloat_sse41
HalideGenBNColorOnlyDeep_sse41
HalideGenBNColorOnlyFloat_sse41
// This sucks. foo, bar, and baz are mentioned way too many times, mostly just to capture references to them.
bool my_function(Expr e) {
Foo foo = ...;
Bar bar = ...;
Baz baz = ...;
class CheckForSpecialNode : public IRVisitor {
using IRVisitor::visit;
Halide:
1.42 │ e0: vmovup -0x60(%rdi),%ymm0
4.50 │ vmovup -0x40(%rdi),%ymm6
4.97 │ vmovup -0x20(%rdi),%ymm7
2.54 │ vmovup (%rdi),%ymm8
30.71 │ vfmadd (%rsi),%ymm5,%ymm8
7.82 │ vfmadd -0x20(%rsi),%ymm5,%ymm7
22.69 │ vfmadd -0x40(%rsi),%ymm5,%ymm6