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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BitMagic-C++: bvsample01_64.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">BitMagic-C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_6f9635d4fbfa321d4c00f29df5cd540c.html">samples</a></li><li class="navelem"><a class="el" href="dir_1331aec8a952138069b7df6ad421d973.html">bvsample01_64</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">bvsample01_64.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Example: how to use 64-bit mode.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include <iostream></code><br />
<code>#include <assert.h></code><br />
<code>#include "bm64.h"</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for bvsample01_64.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="bvsample01__64_8cpp__incl.png" border="0" usemap="#bvsample01__64_8cpp" alt=""/></div>
<map name="bvsample01__64_8cpp" id="bvsample01__64_8cpp">
<area shape="rect" title="Example: how to use 64-bit mode." alt="" coords="68,5,204,32"/>
<area shape="rect" title=" " alt="" coords="5,80,77,107"/>
<area shape="rect" title=" " alt="" coords="101,80,171,107"/>
<area shape="rect" title=" " alt="" coords="195,80,261,107"/>
</map>
</div>
</div>
<p><a href="bvsample01__64_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="bvsample01__64_8cpp.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Example: how to use 64-bit mode. </p>
<p>By default BitMagic uses 32-bit address mode even when if it is compiled for 64-bit version. This way it supports 2^32-1 address space.</p>
<p>There are two ways to run BitMagic in 64-bit address mode:</p>
<ol type="1">
<li>define BM64ADDR in your project Or</li>
<li>include "bm64.h"</li>
</ol>
<p>Limitations:</p><ul>
<li>you CANNOT use 32-bit and 64-bit in the same compilation unit.</li>
<li>Current implementation internally is 48-bit (which is a lot), so your range will be [0..2^48-1]</li>
<li>32-bit vectors can be serialized and read as 64-bit, but not vice versa. </li>
</ul>
<p class="definition">Definition in file <a class="el" href="bvsample01__64_8cpp_source.html">bvsample01_64.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a840291bc02cba5474a4cb46a9b9566fe">◆ </a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="bvsample01_64_8cpp-example.html#a0">bvsample01_64.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="bvsample01__64_8cpp_source.html#l00050">50</a> of file <a class="el" href="bvsample01__64_8cpp_source.html">bvsample01_64.cpp</a>.</p>
<p class="reference">References <a class="el" href="bm_8h_source.html#l02194">bm::bvector< Alloc >::count()</a>, <a class="el" href="bmconst_8h_source.html#l00108">bm::id_max</a>, <a class="el" href="bm_8h_source.html#l03581">bm::bvector< Alloc >::set()</a>, and <a class="el" href="bm_8h_source.html#l00280">bm::bvector< Alloc >::iterator_base::valid()</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
|