Skip to content

Instantly share code, notes, and snippets.

## Refer to
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
#if !defined( __cpp_exceptions )
#include <iostream>
int main()
std::cerr << "Exception support required, example unavailable." << std::endl;
return 1;
#include <iomanip>
jensb1 / gist:69340306768ef40caa3310c296acf552
Created March 19, 2021 01:04
LLVM Orc v2 - loading separate file
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/ObjectCache.h"
jensb1 / jit.cpp
Last active March 17, 2021 07:48
A simple LLVM 12 JIT test with optimizations working
orc: jit.cpp
clang++ -g -o $@ $^ $(shell llvm-config-12 --cxxflags --ldflags --system-libs --libs core)
jensb1 / gist:f33c8512b66dfdf4d84f55603a654a05
Last active March 13, 2021 10:32
Simple indent parser in Clojure
(ns analyze (:require
[clojure.string :refer [split starts-with? trim]]
[clojure.core :refer [tree-seq re-find]]))
(defn line-param [line]
(trim (str (second (re-find #"\s*(.*?):" (str line))))))
(defn line-value [line]
(trim (str (second (re-find #".*:(.*)" (str line))))))
<!DOCTYPE html>
<html lang="en">
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Components development</title>
<link rel="stylesheet" href="">
<link rel='stylesheet' href='/public/global.css'/>