Skip to content

Instantly share code, notes, and snippets.

@ronen
ronen / false-positive-unusedFunction.cpp
Last active May 16, 2018
cppcheck false positive unused Function
View false-positive-unusedFunction.cpp
#include <functional>
#include <iostream>
int foo() { return 12345; } // FALSE POSITIVE: unusedFunction
int bar(std::function<int()> func) { return func(); }
class A {
public:
A() : a(bar([] { return foo(); })) {}
View bounds_inference_rdom.cpp
#include "Halide.h"
#include <stdio.h>
/*
Bounds inference bug?
Two versions of the same accumulation, one uses RDom the other defines a chain of Funcs.
Compile and run with -DUSE_RDOM=0 and it reports:
View unknown_intrinsic.cpp
#include "Halide.h"
using namespace Halide;
Var x{"x"};
Var y{"y"};
Var c{"c"};
Buffer<float> input(100,100,3);
Buffer<float> dir(100);
@ronen
ronen / Makefile
Last active Jun 6, 2016
Demo of halide Metal AOT backend initialization/termination bug
View Makefile
CXXFLAGS = -std=c++11 -g
HALIDE_TOOLS_DIR = /usr/local/share/halide/tools
default: demo
.PHONY: clean
demo: build/main.o build/halide_dummy_metal.o
$(CXX) $(CXXFLAGS) -o $@ $^ -framework Cocoa -framework Metal
View teaspoon_env.rb
Teaspoon.configure do |config|
# Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
# `http://localhost:3000/jasmine` to run your tests.
config.mount_at = "/teaspoon"
# Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
# be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
# Note: Defaults to `Rails.root` if nil.
config.root = nil
@ronen
ronen / vpn
Last active Oct 1, 2015
convenient wrapper around openconnect
View vpn
Moved to https://github.com/ronen/vpn
@ronen
ronen / ___pyi_so_conflict___.md
Created Dec 13, 2014
Minimal example of pyinstaller --onefile .so conflict
View ___pyi_so_conflict___.md

Minimal example to reproduce pyinstaller issue #1105

Problem with conflicting .so files pyinstaller/pyinstaller#1105

To reproduce:

  1. Download the gist
  2. Gist doesn't support directories, so manually create the submodule: