1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>BitMagic: bmconst.h Source File</title>
3
<title>BitMagic: bm::gap_len_table< T > Struct Template Reference</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
6
<!-- Generated by Doxygen 1.4.1 -->
7
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="examples.html">Examples</a></div>
9
<a class="el" href="dir_000000.html">src</a></div>
10
<h1>bmconst.h</h1><a href="a00076.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
11
00002 <span class="comment">Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com)</span>
12
00003 <span class="comment"></span>
13
00004 <span class="comment">Permission is hereby granted, free of charge, to any person </span>
14
00005 <span class="comment">obtaining a copy of this software and associated documentation </span>
15
00006 <span class="comment">files (the "Software"), to deal in the Software without restriction, </span>
16
00007 <span class="comment">including without limitation the rights to use, copy, modify, merge, </span>
17
00008 <span class="comment">publish, distribute, sublicense, and/or sell copies of the Software, </span>
18
00009 <span class="comment">and to permit persons to whom the Software is furnished to do so, </span>
19
00010 <span class="comment">subject to the following conditions:</span>
20
00011 <span class="comment"></span>
21
00012 <span class="comment">The above copyright notice and this permission notice shall be included </span>
22
00013 <span class="comment">in all copies or substantial portions of the Software.</span>
23
00014 <span class="comment"></span>
24
00015 <span class="comment">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, </span>
25
00016 <span class="comment">EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES </span>
26
00017 <span class="comment">OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. </span>
27
00018 <span class="comment">IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, </span>
28
00019 <span class="comment">DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, </span>
29
00020 <span class="comment">ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR </span>
30
00021 <span class="comment">OTHER DEALINGS IN THE SOFTWARE.</span>
31
00022 <span class="comment"></span>
32
00023 <span class="comment">For more information please visit: http://bmagic.sourceforge.net</span>
33
00024 <span class="comment"></span>
34
00025 <span class="comment">*/</span>
36
00027 <span class="preprocessor">#ifndef BMCONST__H__INCLUDED__</span>
37
00028 <span class="preprocessor"></span><span class="preprocessor">#define BMCONST__H__INCLUDED__</span>
38
00029 <span class="preprocessor"></span>
39
00030 <span class="keyword">namespace </span>bm
42
00033 <span class="preprocessor">#if defined(_WIN32) || defined (_WIN64)</span>
43
00034 <span class="preprocessor"></span>
44
00035 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int64 <a class="code" href="a00092.html#a8">id64_t</a>;
46
00037 <span class="preprocessor">#else</span>
47
00038 <span class="preprocessor"></span>
48
<a name="l00039"></a><a class="code" href="a00092.html#a8">00039</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="a00092.html#a8">id64_t</a>;
50
00041 <span class="preprocessor">#endif</span>
51
00042 <span class="preprocessor"></span>
52
<a name="l00043"></a><a class="code" href="a00092.html#a9">00043</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00092.html#a9">id_t</a>;
53
<a name="l00044"></a><a class="code" href="a00092.html#a10">00044</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00092.html#a10">word_t</a>;
54
<a name="l00045"></a><a class="code" href="a00092.html#a11">00045</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="a00092.html#a11">short_t</a>;
58
<a name="l00049"></a><a class="code" href="a00092.html#a12">00049</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a12">id_max</a> = 0xFFFFFFFF;
60
00051 <span class="comment">// Data Block parameters</span>
62
<a name="l00053"></a><a class="code" href="a00092.html#a13">00053</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a13">set_block_size</a> = 2048u;
63
<a name="l00054"></a><a class="code" href="a00092.html#a14">00054</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a14">set_block_shift</a> = 16u;
64
<a name="l00055"></a><a class="code" href="a00092.html#a15">00055</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a15">set_block_mask</a> = 0xFFFFu;
65
<a name="l00056"></a><a class="code" href="a00092.html#a16">00056</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a16">set_blkblk_mask</a> = 0xFFFFFFu;
67
00058 <span class="comment">// Word parameters</span>
69
<a name="l00060"></a><a class="code" href="a00092.html#a17">00060</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a17">set_word_shift</a> = 5u;
70
<a name="l00061"></a><a class="code" href="a00092.html#a18">00061</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a18">set_word_mask</a> = 0x1Fu;
73
00064 <span class="comment">// GAP related parameters.</span>
75
<a name="l00066"></a><a class="code" href="a00092.html#a19">00066</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="a00092.html#a19">gap_word_t</a>;
77
<a name="l00068"></a><a class="code" href="a00092.html#a20">00068</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a20">gap_max_buff_len</a> = 1280;
78
<a name="l00069"></a><a class="code" href="a00092.html#a21">00069</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a21">gap_max_bits</a> = 65536;
79
<a name="l00070"></a><a class="code" href="a00092.html#a22">00070</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a22">gap_equiv_len</a> =
80
00071 (<span class="keyword">sizeof</span>(bm::word_t) * bm::set_block_size) / <span class="keyword">sizeof</span>(<a class="code" href="a00092.html#a19">gap_word_t</a>);
81
<a name="l00072"></a><a class="code" href="a00092.html#a23">00072</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a23">gap_levels</a> = 4;
82
<a name="l00073"></a><a class="code" href="a00092.html#a24">00073</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a24">gap_max_level</a> = bm::gap_levels - 1;
85
00076 <span class="comment">// Block Array parameters</span>
87
<a name="l00078"></a><a class="code" href="a00092.html#a25">00078</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a25">set_array_size</a> = 256u;
88
<a name="l00079"></a><a class="code" href="a00092.html#a26">00079</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a26">set_array_shift</a> = 8u;
89
<a name="l00080"></a><a class="code" href="a00092.html#a27">00080</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a27">set_array_mask</a> = 0xFFu;
90
<a name="l00081"></a><a class="code" href="a00092.html#a28">00081</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a28">set_total_blocks</a> = (bm::set_array_size * bm::set_array_size);
92
<a name="l00083"></a><a class="code" href="a00092.html#a29">00083</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a29">bits_in_block</a> = bm::set_block_size * <span class="keyword">sizeof</span>(bm::word_t) * 8;
93
<a name="l00084"></a><a class="code" href="a00092.html#a30">00084</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a30">bits_in_array</a> = bm::bits_in_block * bm::set_array_size;
96
00087 <span class="preprocessor">#ifdef BM64OPT</span>
97
00088 <span class="preprocessor"></span>
98
<a name="l00089"></a><a class="code" href="a00092.html#a31">00089</a> <span class="keyword">typedef</span> <a class="code" href="a00092.html#a8">id64_t</a> <a class="code" href="a00092.html#a31">wordop_t</a>;
99
<a name="l00090"></a><a class="code" href="a00092.html#a32">00090</a> <span class="keyword">const</span> <a class="code" href="a00092.html#a8">id64_t</a> <a class="code" href="a00092.html#a32">all_bits_mask</a> = 0xffffffffffffffff;
101
<a name="l00092"></a><a class="code" href="a00076.html#a0">00092</a> <span class="preprocessor"># define DECLARE_TEMP_BLOCK(x) bm::id64_t x[bm::set_block_size / 2]; </span>
102
<a name="l00093"></a><a class="code" href="a00092.html#a33">00093</a> <span class="preprocessor"></span><span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a33">set_block_size_op</a> = bm::set_block_size / 2;
105
00096 <span class="preprocessor">#else</span>
106
00097 <span class="preprocessor"></span>
107
00098 <span class="keyword">typedef</span> <a class="code" href="a00092.html#a10">word_t</a> <a class="code" href="a00092.html#a31">wordop_t</a>;
108
00099 <span class="keyword">const</span> <a class="code" href="a00092.html#a10">word_t</a> <a class="code" href="a00092.html#a32">all_bits_mask</a> = 0xffffffff;
110
00101 <span class="preprocessor"># define DECLARE_TEMP_BLOCK(x) unsigned x[bm::set_block_size]; </span>
111
00102 <span class="preprocessor"></span><span class="keyword">const</span> <span class="keywordtype">unsigned</span> <a class="code" href="a00092.html#a33">set_block_size_op</a> = bm::set_block_size;
113
00104 <span class="preprocessor">#endif</span>
114
00105 <span class="preprocessor"></span>
116
00107 <span class="comment"></span>
117
00108 <span class="comment">/*!</span>
118
00109 <span class="comment"> @brief Block allocation strategies.</span>
119
00110 <span class="comment"> @ingroup bvector</span>
120
00111 <span class="comment">*/</span>
121
<a name="l00112"></a><a class="code" href="a00095.html#ga0">00112</a> <span class="keyword">enum</span> strategy
123
00114 BM_BIT = 0, <span class="comment">//!< No GAP compression strategy. All new blocks are bit blocks.</span>
124
00115 <span class="comment"></span> BM_GAP = 1 <span class="comment">//!< GAP compression is ON.</span>
125
00116 <span class="comment"></span>};
128
00119 } <span class="comment">// namespace</span>
130
00121 <span class="preprocessor">#endif</span>
131
00122 <span class="preprocessor"></span>
132
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Apr 20 13:28:46 2006 for BitMagic by
9
<a class="el" href="a00129.html">bm</a>::<a class="el" href="a00104.html">gap_len_table</a></div>
10
<h1>bm::gap_len_table< T > Struct Template Reference<br>
12
[<a class="el" href="a00133.html">GAP functions</a>]</small>
13
</h1>Default GAP lengths table.
14
<a href="#_details">More...</a>
16
<code>#include <<a class="el" href="a00141.html">bmfunc.h</a>></code>
18
<table border="0" cellpadding="0" cellspacing="0">
20
<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
21
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="a00129.html#a36">gap_word_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00104.html#s0">_len</a> [<a class="el" href="a00129.html#a40">bm::gap_levels</a>]</td></tr>
24
<hr><a name="_details"></a><h2>Detailed Description</h2>
25
<h3>template<bool T><br>
26
struct bm::gap_len_table< T ></h3>
28
Default GAP lengths table.
32
Definition at line <a class="el" href="a00141.html#l00100">100</a> of file <a class="el" href="a00141.html">bmfunc.h</a>.<hr><h2>Field Documentation</h2>
33
<a class="anchor" name="s0" doxytag="bm::gap_len_table::_len"></a><p>
34
<table class="mdTable" cellpadding="2" cellspacing="0">
37
<table cellpadding="0" cellspacing="0" border="0">
39
<td class="mdPrefix" colspan="4">
40
template<bool T> </td>
43
<td class="md" nowrap valign="top">const <a class="el" href="a00129.html#a36">gap_word_t</a> <a class="el" href="a00104.html">bm::gap_len_table</a>< T >::<a class="el" href="a00104.html#s0">_len</a><code> [static]</code> </td>
49
<table cellspacing="5" cellpadding="0" border="0">
57
<b>Initial value:</b><div class="fragment"><pre class="fragment">
58
{ 128, 256, 512, bm::gap_max_buff_len }
61
Definition at line <a class="el" href="a00141.html#l00106">106</a> of file <a class="el" href="a00141.html">bmfunc.h</a>. </td>
64
<hr>The documentation for this struct was generated from the following file:<ul>
65
<li><a class="el" href="a00141.html">bmfunc.h</a></ul>
66
<hr size="1"><address style="align: right;"><small>Generated on Sun Aug 5 14:12:40 2007 for BitMagic by
133
67
<a href="http://www.doxygen.org/index.html">
134
68
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>