Skip to content

Instantly share code, notes, and snippets.

@sehe
sehe / Makefile
Last active November 3, 2015 00:06
Bench real_generator with custom policies
all:test
CPPFLAGS+=-std=c++1y -Wall -pedantic
CPPFLAGS+=-g -O3 -DENABLE_ALL
#BOOST_DIR=/mnt/LARGE/MODULAR_BOOST/modular-boost
BOOST_DIR=/home/sehe/custom/boost
CPPFLAGS+=-isystem /home/sehe/custom/nonius/include
CPPFLAGS+=-isystem $(BOOST_DIR)
# CPPFLAGS+=-fopenmp
@sehe
sehe / Makefile
Created November 2, 2015 21:23
mini_c question
all:mini_c
CPPFLAGS+=-std=c++11 -Wall -pedantic
CPPFLAGS+=-g -O2
CPPFLAGS+=-pthread
%.o:%.cpp
$(CXX) $(CPPFLAGS) $< -c -o $@
@sehe
sehe / Makefile
Last active July 28, 2023 11:26
Simplifying sequential use of Asio operations with timeouts
all:TCPClient
CPPFLAGS+=-std=c++11 -Wall -pedantic -g -O2 -pthread
%.o: TCPClient.hpp
%: %.o
$(CXX) $(CPPFLAGS) $^ -o $@ -lboost_system
@sehe
sehe / AssemblyInfo.cpp
Created October 29, 2015 00:07
C++/CLI and BGL minimal sample
#include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
#include <algorithm>
#include <memory>
#include <boost/serialization/vector.hpp>
template<class T, class A = std::allocator<T> >
struct ColorMatrix {
typedef T value_type;
typedef std::vector<value_type, A> Container;
ColorMatrix() : _number_of_columns(0) {}
@sehe
sehe / Makefile
Last active October 24, 2015 21:44
mmap vs posix write perf benchmarking
all:test
CPPFLAGS+=-std=c++1y -Wall -pedantic
CPPFLAGS+=-g -O2
#BOOST_DIR=/mnt/LARGE/MODULAR_BOOST/modular-boost
BOOST_DIR=/home/sehe/custom/boost
CPPFLAGS+=-isystem /home/sehe/custom/nonius/include
CPPFLAGS+=-isystem $(BOOST_DIR)
# CPPFLAGS+=-fopenmp
@sehe
sehe / .gitignore
Last active October 19, 2015 23:14
benchmarking interval collection lookup
main
test
*.S
*.o
*.vim
.depends
tags
@sehe
sehe / generate.sh
Last active October 12, 2015 21:43
#!/bin/bash
# this script requires
# - bash (or similar)
# - wget (or manually download the source images)
# - convert (imagemagick)
# - gifsicle (https://www.lcdf.org/gifsicle/)
wget -c 'https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s320x320/e35/11248385_991083787599828_642737356_n.jpg'
wget -c http://i.imgur.com/CUhcR.gif
# prepare refp template
@sehe
sehe / Makefile
Last active October 12, 2015 02:05
Rudimentary stone parser in Boost Spirit
all:test
CPPFLAGS+=-std=c++1y -Wall -pedantic
CPPFLAGS+=-g -O3
#BOOST_DIR=/mnt/LARGE/MODULAR_BOOST/modular-boost
BOOST_DIR=/home/sehe/custom/boost
CPPFLAGS+=-isystem /home/sehe/custom/nonius/include
CPPFLAGS+=-isystem $(BOOST_DIR)
# CPPFLAGS+=-fopenmp
all:perfect perfect.S trie-spirit trie-spirit.S naive naive.S bitset bitset.S
all: switch switch.S jerry jerry.S decision_tree decision_tree.S
all: orlp orlp.S
all: orlp2 orlp2.S
all: orlp3 orlp3.S
all: orlp4 orlp4.S
CPPFLAGS+=-std=c++11 -Wall -pedantic
CPPFLAGS+=-g0 -O3 -DNDEBUG
#BOOST_DIR=/mnt/LARGE/MODULAR_BOOST/modular-boost