summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-06-20 11:44:53 +0000
committerjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-06-20 11:44:53 +0000
commit5406b8bc87c7aa658ef71f572aa00a9d1682f8bd (patch)
tree5be92f10646a536b4db316bcbc7441671e4a8a64 /include
parentbf64faab7dd9da8683484971a64c6c87f40a89a3 (diff)
removed static code form bit_tree_column
git-svn-id: https://phat.googlecode.com/svn/trunk@132 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
Diffstat (limited to 'include')
-rw-r--r--include/phat/representations/bit_tree_pivot_column.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/phat/representations/bit_tree_pivot_column.h b/include/phat/representations/bit_tree_pivot_column.h
index 888e338..4d48e88 100644
--- a/include/phat/representations/bit_tree_pivot_column.h
+++ b/include/phat/representations/bit_tree_pivot_column.h
@@ -36,8 +36,8 @@ namespace phat {
typedef uint64_t block_type;
std::vector< block_type > data;
- // this static is not a problem with OMP, it's initialized just after program starts
- static const size_t debrujin_magic_table[ 64 ];
+
+ size_t debrujin_magic_table[ 64 ];
enum { block_size_in_bits = 64 };
enum { block_shift = 6 };
@@ -66,6 +66,18 @@ namespace phat {
offset = upper_blocks;
data.resize( upper_blocks + bottom_blocks_needed, 0 );
+
+ std::size_t temp_array[ 64 ] = {
+ 63, 0, 58, 1, 59, 47, 53, 2,
+ 60, 39, 48, 27, 54, 33, 42, 3,
+ 61, 51, 37, 40, 49, 18, 28, 20,
+ 55, 30, 34, 11, 43, 14, 22, 4,
+ 62, 57, 46, 52, 38, 26, 32, 41,
+ 50, 36, 17, 19, 29, 10, 13, 21,
+ 56, 45, 25, 31, 35, 16, 9, 12,
+ 44, 24, 15, 8, 23, 7, 6, 5 };
+
+ std::copy( &temp_array[ 0 ], &temp_array[ 64 ], &debrujin_magic_table[ 0 ] );
}
index get_max_index() const {
@@ -149,15 +161,5 @@ namespace phat {
}
};
- const size_t bit_tree_column::debrujin_magic_table[ 64 ] = {
- 63, 0, 58, 1, 59, 47, 53, 2,
- 60, 39, 48, 27, 54, 33, 42, 3,
- 61, 51, 37, 40, 49, 18, 28, 20,
- 55, 30, 34, 11, 43, 14, 22, 4,
- 62, 57, 46, 52, 38, 26, 32, 41,
- 50, 36, 17, 19, 29, 10, 13, 21,
- 56, 45, 25, 31, 35, 16, 9, 12,
- 44, 24, 15, 8, 23, 7, 6, 5 };
-
typedef abstract_pivot_column<bit_tree_column> bit_tree_pivot_column;
}