This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <signal.h> | |
#include <execinfo.h> | |
#include <ucontext.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
#define PAGE_SIZE 4096 | |
#define PAGE_MASK (PAGE_SIZE - 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use the Makefile listed below and build with the PATH to your LLVM binaries | |
PATH=~/Documents/workspace/builds/llvm/build/bin/:$PATH make | |
##### | |
APPNAME=jit_tut1 | |
LLFLAGS=$(shell llvm-config --cxxflags --ldflags --libs core jit interpreter x86) -lcurses | |
all: | |
c++ -g ./$(APPNAME).cpp $(LLFLAGS) -o ./$(APPNAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <va/va.h> | |
#include <va/va_enc_h264.h> | |
#include <va/va_x11.h> | |
/* | |
* http://www.intel.cn/content/dam/www/public/us/en/documents/white-papers/atom-e6xx-video-encoding-paper.pdf | |
* This paper is crap. Since 2011 almost all VA API was changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <errno.h> | |
#include <unwind.h> | |
#include <execinfo.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rec revZipWithDefault accum dval lsta lstb = | |
match lsta with | |
| ha :: ta -> | |
(match lstb with | |
| hb :: tb -> zipWithDefault ((ha, hb) :: accum) dval ta tb | |
| _ -> zipWithDefault ((ha, dval) :: accum) dval ta []) | |
| _ -> | |
(match lstb with | |
| hd :: tl -> zipWithDefault ((dval, hd) :: accum) dval [] tl | |
| _ -> accum);; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) | |
enum token_type { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'Digest' | |
if 2 != ARGV.length then | |
puts "Usage: $0 dir [good_dir]" | |
exit -1 | |
end | |
def probe_file(path, good_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'Digest' | |
require 'set' | |
if 0 == ARGV.length then | |
puts "Usage: $0 dir" | |
exit -1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
export SRC_LLVM="https://github.com/llvm-mirror/llvm.git" | |
export SRC_COMPILER_RT="https://github.com/llvm-mirror/compiler-rt.git" | |
export SRC_CLANG="https://github.com/llvm-mirror/clang.git" | |
export SRC_CLANG_EXTRA="https://github.com/llvm-mirror/clang-tools-extra.git" | |
export SRC_LIBCXX="https://github.com/llvm-mirror/libcxx.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby2.1 | |
#@bin_dir="/home/me/bin/foo" | |
@bin_dir = "" | |
# context = { | |
# :exports => { | |
# "foo" => [ | |
# "file2.ois", | |
# "file3.ois", |
OlderNewer