~ubuntu-branches/ubuntu/jaunty/bmagic/jaunty

« back to all changes in this revision

Viewing changes to html/a00105.html

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2008-01-05 23:58:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080105235856-2kmxhxkz14qjy9ia
Tags: 3.5.0-1
* New upstream release.
* Add tcpp.dpatch.  This stops tests/stress/t.cpp from including
  ncbi_pch.hpp.  As far as I can tell, NCBI is not used at all, I have
  no idea where that came from..
* Silence some lintian warnings; binary-arch-rules-but-pkg-is-arch-indep
  and ancient-standards-version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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: bmdef.h Source File</title>
 
3
<title>BitMagic: bm::gap_len_table_min&lt; T &gt; Struct Template Reference</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
5
</head><body>
6
6
<!-- Generated by Doxygen 1.4.1 -->
7
7
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;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&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="examples.html">Examples</a></div>
8
8
<div class="nav">
9
 
<a class="el" href="dir_000000.html">src</a></div>
10
 
<h1>bmdef.h</h1><a href="a00077.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">// Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com)</span>
11
 
00002 
12
 
00003 
13
 
00004 <span class="comment">// BM library internal header</span>
14
 
00005 <span class="comment">//</span>
15
 
00006 <span class="comment">// Set all required preprocessor defines</span>
16
 
00007 
17
 
00008 
18
 
00009 
19
 
00010 <span class="preprocessor">#ifndef BM_ASSERT</span>
20
 
00011 <span class="preprocessor"></span>
21
 
00012 <span class="preprocessor"># ifndef BM_NOASSERT</span>
22
 
00013 <span class="preprocessor"></span><span class="preprocessor">#  include &lt;assert.h&gt;</span>
23
 
<a name="l00014"></a><a class="code" href="a00077.html#a0">00014</a> <span class="preprocessor">#  define BM_ASSERT assert</span>
24
 
00015 <span class="preprocessor"></span><span class="preprocessor"># else</span>
25
 
00016 <span class="preprocessor"></span><span class="preprocessor">#  define BM_ASSERT(x)</span>
26
 
00017 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
27
 
00018 <span class="preprocessor"></span>
28
 
00019 <span class="preprocessor">#endif</span>
29
 
00020 <span class="preprocessor"></span>
30
 
00021 
31
 
<a name="l00022"></a><a class="code" href="a00077.html#a1">00022</a> <span class="preprocessor">#define FULL_BLOCK_ADDR all_set&lt;true&gt;::_block._p</span>
32
 
<a name="l00023"></a><a class="code" href="a00077.html#a2">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define IS_VALID_ADDR(addr) (addr &amp;&amp; (addr != FULL_BLOCK_ADDR))</span>
33
 
<a name="l00024"></a><a class="code" href="a00077.html#a3">00024</a> <span class="preprocessor"></span><span class="preprocessor">#define IS_FULL_BLOCK(addr) (addr == FULL_BLOCK_ADDR)</span>
34
 
<a name="l00025"></a><a class="code" href="a00077.html#a4">00025</a> <span class="preprocessor"></span><span class="preprocessor">#define IS_EMPTY_BLOCK(addr) (addr == 0)</span>
35
 
00026 <span class="preprocessor"></span>
36
 
00027 <span class="comment">// Macro definitions to manipulate bits in pointers</span>
37
 
00028 <span class="comment">// This trick is based on the fact that pointers allocated by malloc are</span>
38
 
00029 <span class="comment">// aligned and bit 0 is never set. It means we are safe to use it.</span>
39
 
00030 <span class="comment">// BM library keeps GAP flag in pointer.</span>
40
 
00031 
41
 
00032 <span class="comment">// Note: this hack is not universally portable so if it does not work</span>
42
 
00033 <span class="comment">// in some particular case disable it by defining BM_DISBALE_BIT_IN_PTR</span>
43
 
00034 
44
 
00035 <span class="preprocessor">#ifdef BM_DISBALE_BIT_IN_PTR</span>
45
 
00036 <span class="preprocessor"></span>
46
 
00037 <span class="preprocessor"># define BMGAP_PTR(ptr)    ((bm::gap_word_t*)ptr)</span>
47
 
00038 <span class="preprocessor"></span><span class="preprocessor"># define BMSET_PTRGAP(ptr) (void(0))</span>
48
 
00039 <span class="preprocessor"></span><span class="preprocessor"># define BM_IS_GAP(obj, ptr, idx) ( obj.is_block_gap(idx) ) </span>
49
 
00040 <span class="preprocessor"></span>
50
 
00041 <span class="preprocessor">#else</span>
51
 
00042 <span class="preprocessor"></span>
52
 
00043 <span class="preprocessor"># if ULONG_MAX != 0xffffffff || defined(_WIN64)  // 64-bit</span>
53
 
00044 <span class="preprocessor"></span>
54
 
<a name="l00045"></a><a class="code" href="a00077.html#a5">00045</a> <span class="preprocessor">#  define BMPTR_SETBIT0(ptr)   ( ((bm::id64_t)ptr) | 1 )</span>
55
 
<a name="l00046"></a><a class="code" href="a00077.html#a6">00046</a> <span class="preprocessor"></span><span class="preprocessor">#  define BMPTR_CLEARBIT0(ptr) ( ((bm::id64_t)ptr) &amp; ~(bm::id64_t)1 )</span>
56
 
<a name="l00047"></a><a class="code" href="a00077.html#a7">00047</a> <span class="preprocessor"></span><span class="preprocessor">#  define BMPTR_TESTBIT0(ptr)  ( ((bm::id64_t)ptr) &amp; 1 )</span>
57
 
00048 <span class="preprocessor"></span>
58
 
00049 <span class="preprocessor"># else // 32-bit</span>
59
 
00050 <span class="preprocessor"></span>
60
 
00051 <span class="preprocessor">#  define BMPTR_SETBIT0(ptr)   ( ((bm::id_t)ptr) | 1 )</span>
61
 
00052 <span class="preprocessor"></span><span class="preprocessor">#  define BMPTR_CLEARBIT0(ptr) ( ((bm::id_t)ptr) &amp; ~(bm::id_t)1 )</span>
62
 
00053 <span class="preprocessor"></span><span class="preprocessor">#  define BMPTR_TESTBIT0(ptr)  ( ((bm::id_t)ptr) &amp; 1 )</span>
63
 
00054 <span class="preprocessor"></span>
64
 
00055 <span class="preprocessor"># endif</span>
65
 
00056 <span class="preprocessor"></span>
66
 
<a name="l00057"></a><a class="code" href="a00077.html#a8">00057</a> <span class="preprocessor"># define BMGAP_PTR(ptr) ((bm::gap_word_t*)BMPTR_CLEARBIT0(ptr))</span>
67
 
<a name="l00058"></a><a class="code" href="a00077.html#a9">00058</a> <span class="preprocessor"></span><span class="preprocessor"># define BMSET_PTRGAP(ptr) ptr = (bm::word_t*)BMPTR_SETBIT0(ptr)</span>
68
 
<a name="l00059"></a><a class="code" href="a00077.html#a10">00059</a> <span class="preprocessor"></span><span class="preprocessor"># define BM_IS_GAP(obj, ptr, idx) ( BMPTR_TESTBIT0(ptr)!=0 )</span>
69
 
00060 <span class="preprocessor"></span>
70
 
00061 <span class="preprocessor">#endif</span>
71
 
00062 <span class="preprocessor"></span>
72
 
00063 
73
 
00064 
74
 
00065 <span class="preprocessor">#ifdef BM_HASRESTRICT</span>
75
 
00066 <span class="preprocessor"></span><span class="preprocessor"># ifndef BMRESTRICT</span>
76
 
00067 <span class="preprocessor"></span><span class="preprocessor">#  define BMRESTRICT restrict</span>
77
 
00068 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
78
 
00069 <span class="preprocessor"></span><span class="preprocessor">#else</span>
79
 
<a name="l00070"></a><a class="code" href="a00077.html#a11">00070</a> <span class="preprocessor"></span><span class="preprocessor"># define BMRESTRICT </span>
80
 
00071 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
81
 
00072 <span class="preprocessor"></span>
82
 
00073 
83
 
00074 <span class="preprocessor">#ifdef BM_HASFORCEINLINE</span>
84
 
00075 <span class="preprocessor"></span><span class="preprocessor"># ifndef BMFORCEINLINE</span>
85
 
00076 <span class="preprocessor"></span><span class="preprocessor">#  define BMFORCEINLINE __forceinline</span>
86
 
00077 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
87
 
00078 <span class="preprocessor"></span><span class="preprocessor">#else</span>
88
 
<a name="l00079"></a><a class="code" href="a00077.html#a12">00079</a> <span class="preprocessor"></span><span class="preprocessor"># define BMFORCEINLINE inline</span>
89
 
00080 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
90
 
00081 <span class="preprocessor"></span>
91
 
00082 
92
 
00083 
93
 
00084 <span class="preprocessor">#ifndef BMSSE2OPT</span>
94
 
00085 <span class="preprocessor"></span>
95
 
00086 <span class="preprocessor"># ifndef BM_SET_MMX_GUARD</span>
96
 
00087 <span class="preprocessor"></span><span class="preprocessor">#  define BM_SET_MMX_GUARD</span>
97
 
00088 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
98
 
00089 <span class="preprocessor"></span>
99
 
00090 <span class="preprocessor">#else</span>
100
 
00091 <span class="preprocessor"></span>
101
 
00092 <span class="preprocessor"># ifndef BM_SET_MMX_GUARD</span>
102
 
<a name="l00093"></a><a class="code" href="a00077.html#a13">00093</a> <span class="preprocessor"></span><span class="preprocessor">#  define BM_SET_MMX_GUARD  sse2_empty_guard  bm_mmx_guard_;</span>
103
 
00094 <span class="preprocessor"></span><span class="preprocessor"># endif</span>
104
 
00095 <span class="preprocessor"></span>
105
 
00096 <span class="preprocessor">#endif</span>
106
 
00097 <span class="preprocessor"></span>
107
 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Apr 20 13:28:46 2006 for BitMagic by&nbsp;
 
9
<a class="el" href="a00129.html">bm</a>::<a class="el" href="a00105.html">gap_len_table_min</a></div>
 
10
<h1>bm::gap_len_table_min&lt; T &gt; Struct Template Reference<br>
 
11
<small>
 
12
[<a class="el" href="a00133.html">GAP functions</a>]</small>
 
13
</h1>Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets.  
 
14
<a href="#_details">More...</a>
 
15
<p>
 
16
<code>#include &lt;<a class="el" href="a00141.html">bmfunc.h</a>&gt;</code>
 
17
<p>
 
18
<table border="0" cellpadding="0" cellspacing="0">
 
19
<tr><td></td></tr>
 
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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#s0">_len</a> [<a class="el" href="a00129.html#a40">bm::gap_levels</a>]</td></tr>
 
22
 
 
23
</table>
 
24
<hr><a name="_details"></a><h2>Detailed Description</h2>
 
25
<h3>template&lt;bool T&gt;<br>
 
26
 struct bm::gap_len_table_min&lt; T &gt;</h3>
 
27
 
 
28
Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets. <dl compact><dt><b>Examples: </b></dt><dd>
 
29
 
 
30
<p>
 
31
<a class="el" href="a00058.html#_a41">sample7.cpp</a>.</dl>
 
32
<p>
 
33
 
 
34
<p>
 
35
Definition at line <a class="el" href="a00141.html#l00115">115</a> of file <a class="el" href="a00141.html">bmfunc.h</a>.<hr><h2>Field Documentation</h2>
 
36
<a class="anchor" name="s0" doxytag="bm::gap_len_table_min::_len"></a><p>
 
37
<table class="mdTable" cellpadding="2" cellspacing="0">
 
38
  <tr>
 
39
    <td class="mdRow">
 
40
      <table cellpadding="0" cellspacing="0" border="0">
 
41
        <tr>
 
42
          <td class="mdPrefix" colspan="4">
 
43
template&lt;bool T&gt; </td>
 
44
        </tr>
 
45
        <tr>
 
46
          <td class="md" nowrap valign="top">const <a class="el" href="a00129.html#a36">gap_word_t</a> <a class="el" href="a00105.html">bm::gap_len_table_min</a>&lt; T &gt;::<a class="el" href="a00105.html#s0">_len</a><code> [static]</code>          </td>
 
47
        </tr>
 
48
      </table>
 
49
    </td>
 
50
  </tr>
 
51
</table>
 
52
<table cellspacing="5" cellpadding="0" border="0">
 
53
  <tr>
 
54
    <td>
 
55
      &nbsp;
 
56
    </td>
 
57
    <td>
 
58
 
 
59
<p>
 
60
<b>Initial value:</b><div class="fragment"><pre class="fragment"> 
 
61
                                { 32, 96, 128, 512 }
 
62
</pre></div>
 
63
<p>
 
64
Definition at line <a class="el" href="a00141.html#l00121">121</a> of file <a class="el" href="a00141.html">bmfunc.h</a>.    </td>
 
65
  </tr>
 
66
</table>
 
67
<hr>The documentation for this struct was generated from the following file:<ul>
 
68
<li><a class="el" href="a00141.html">bmfunc.h</a></ul>
 
69
<hr size="1"><address style="align: right;"><small>Generated on Sun Aug 5 14:12:40 2007 for BitMagic by&nbsp;
108
70
<a href="http://www.doxygen.org/index.html">
109
71
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>
110
72
</body>