forked from grundprinzip/bitcompressedvector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (36 loc) · 1.22 KB
/
Copy pathMakefile
File metadata and controls
50 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SHELL = /bin/bash
BUILD_DIR=build
#CC=/usr/gcc-4.8-20120930/bin/g++-4.8-20120930
#CC=clang++
CXX ?= clang++
CXXFLAGS= -mssse3 -msse4.1 -m64 -std=c++0x -Weffc++
FILES=main.cc test.cc
all: bcv.h test.cc test.h main.cc
mkdir -p $(BUILD_DIR)
$(CXX) -o $(BUILD_DIR)/main $(FILES) $(CXXFLAGS) -g2 -O0 -ggdb
$(CXX) -o $(BUILD_DIR)/main_opt $(FILES) -DNDEBUG $(CXXFLAGS) -funroll-loops -O3 -g -mtune=native
get-deps:
echo "Done"
profile:
$(CC) -O3 -o $(BUILD_DIR)/main_opt $(FILES) -g2 -DNDEBUG -lprofiler $(CXXFLAGS)
CPUPROFILE_FREQUENCY=1000 CPUPROFILE=/tmp/bcv.prof ./$(BUILD_DIR)/main_opt 100000000
pprof --pdf ./$(BUILD_DIR)/main_opt /tmp/bcv.prof > bcv.pdf
gen: decompress.h decompress2.h
decompress.h: tpl/all.tpl code_gen.py
python code_gen.py > decompress.h
decompress2.h: tpl/vertical.tpl code_gen_vertical.py
python code_gen_vertical.py > decompress2.h
papi:
g++ -O3 -o $(BUILD_DIR)/main_opt $(FILES) -g2 -DNDEBUG -lpapi -DUSE_PAPI_TRACE -lpthread
test: all
./$(BUILD_DIR)/main 100000
release: gen
$(RM) -Rf pkg/bcv
mkdir -p pkg/bcv
cp decompress.h pkg/bcv
cp decompress2.h pkg/bcv
cp bcv.h pkg/bcv
tar -C pkg -zcvf bcv.tgz bcv
clean:
$(RM) -Rf pkg bcv.tgz $(BUILD_DIR)
.PHONY: decompress.h decompress2.h