Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Reinking alexreinking

View GitHub Profile
@alexreinking
alexreinking / CMakeLists.txt
Last active Jun 2, 2020
LLVM 10 bug (x86-Debug Windows)
View CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(LLVM_Error)
find_package(LLVM REQUIRED)
add_executable(demo main.cpp)
llvm_map_components_to_libnames(LLVM_LIBNAMES X86)
target_link_libraries(demo PRIVATE ${LLVM_LIBNAMES})
target_include_directories(demo PRIVATE SYSTEM ${LLVM_INCLUDE_DIRS})
@alexreinking
alexreinking / CMakeLists.txt
Last active Jun 3, 2020
Running the halide-lang.org sample code
View CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(BlogBlur)
find_package(Halide REQUIRED)
add_executable(blur main.cpp)
target_link_libraries(blur PRIVATE Halide::Halide Halide::ImageIO)
View CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
project(blur3x3)
# Set up language settings
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
# Find Halide
find_package(Halide REQUIRED)
View 24game.py
import random
def evaluate(expr):
stack = []
for el in expr:
if isinstance(el, (int, long)):
stack.append(el)
elif el == '+':
y, x = stack.pop(), stack.pop()
stack.append(x + y)
@alexreinking
alexreinking / sort7.c
Created Jul 13, 2017
Super fast way to sort fixed integer arrays of size 7.
View sort7.c
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <sys/time.h>
#include <sys/resource.h>
#define NTESTS (5000000)
static double get_time()
{
View keybase.md

Keybase proof

I hereby claim:

  • I am alexreinking on github.
  • I am alexreinking (https://keybase.io/alexreinking) on keybase.
  • I have a public key whose fingerprint is A6B8 79B1 2620 C7A9 00AC 5986 29B4 BE01 181D AF14

To claim this, I am signing this object:

@alexreinking
alexreinking / TestSO.pro
Created Jul 14, 2013
A complete example of a button that toggles between two icons in Qt 5.
View TestSO.pro
#-------------------------------------------------
#
# Project created by QtCreator 2013-07-13T19:42:21
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets