source: trunk/symbol_table/src/Makefile @ 2106

Last change on this file since 2106 was 2106, checked in by ksherdy, 7 years ago

Added bit / byte strategy. Added length test to hash table.

File size: 4.1 KB
Line 
1CC= g++ $(CFLAGS) -O3 #-fno-inline #-g
2SSE=-msse2 #-mssse3 #-msse4.2
3CFLAGS= $(SSE)
4
5PAPI_DIR=/usr/local/papi-4.0.0
6ARCH=$(shell getconf LONG_BIT)
7ifeq ($(ARCH),32)
8        AFLAGS=-march=pentium4
9        PAPI=-DPAPI -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
10else
11        AFLAGS=-march=nocona -m64
12        PAPI=-DPAPI -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
13endif
14
15TEST_SCRIPT = ../test/run_tests.py
16TEST_SRC_DIR = ../test/pin
17TEST_DST_DIR = ../test/pout
18
19# Perf builds
20id: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
21        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DBUFFER_PROFILING #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG #-DHASH_TABLE_HPP_DEBUG
22
23div2: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
24        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DBUFFER_PROFILING #-DHASH_TABLE_HPP_DEBUG #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
25
26logbase2: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
27        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOGBASE2_STRATEGY -DBUFFER_PROFILING #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
28
29div2_logbase2: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
30        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DBUFFER_PROFILING #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
31
32bit_byte: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
33        $(CC) -o bit_byte main.cpp $(AFLAGS) -DBIT_BYTE_STRATEGY -DBUFFER_PROFILING #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
34
35
36# Diff Tests
37id_diff_test: id
38        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DIDENTITY_TEST
39        python $(TEST_SCRIPT) id -d
40        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
41
42div2_diff_test: div2
43        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DIDENTITY_TEST
44        python $(TEST_SCRIPT) div2 -d
45        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
46
47logbase2_diff_test: logbase2
48        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOGBASE2_STRATEGY -DIDENTITY_TEST
49        python $(TEST_SCRIPT) logbase2 -d
50        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
51
52div2_logbase2_diff_test: div2_logbase2
53        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DIDENTITY_TEST
54        python $(TEST_SCRIPT) div2_logbase2 -d
55        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
56
57bit_byte_diff_test: bit_byte
58        $(CC) -o bit_byte main.cpp $(AFLAGS) -DBIT_BYTE_STRATEGY -DIDENTITY_TEST
59        python $(TEST_SCRIPT) bit_byte -d
60        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
61
62# GID Tests
63id_gid_test:
64        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DGID_TEST
65        python $(TEST_SCRIPT) id -g
66
67div2_gid_test:
68        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DGID_TEST
69        python $(TEST_SCRIPT) div2 -g
70
71logbase2_gid_test:
72        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOGBASE2_STRATEGY -DGID_TEST
73        python $(TEST_SCRIPT) logbase2 -g
74
75div2_logbase2_gid_test:
76        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DGID_TEST
77        python $(TEST_SCRIPT) div2_logbase2 -g
78
79bit_byte_gid_test:
80        $(CC) -o bit_byte main.cpp $(AFLAGS) -DBIT_BYTE_STRATEGY -DGID_TEST
81        python $(TEST_SCRIPT) bit_byte -g
82
83clean:
84        rm -Rf id div2 logbase2 div2_logbase2 bit_byte $(TEST_DST_DIR)
85
86# valgrind --tool=callgrind --callgrind-out-file=./callgrind.out ./logbase2 ../test/in/\(1_1000_10\)_\(2_1000_10\)_\(3_1000_10\)_\(4_1000_10\)_\(5_1000_10\)_\(6_1000_10\)_\(7_1000_10\)_\(8_1000_10\)_\(9_1000_10\)_\(10_1000_10\)_\(11_1000_10\)_\(12_1000_10\)_\(13_1000_10\)_\(14_1000_10\)_\(15_1000_10\)_\(16_1000_10\)_\(17_1000_10\)_\(18_1000_10\)_\(19_1000_10\)_1_1.test
Note: See TracBrowser for help on using the repository browser.