56
67
<a name="l00051"></a>00051 <span class="comment"> * Bitmap allocation, freeing and copying.</span>
57
68
<a name="l00052"></a>00052 <span class="comment"> */</span>
58
69
<a name="l00053"></a>00053
59
<a name="l00060"></a>00060 hwloc_bitmap_t <a class="code" href="a00056.html#ga9fb6aedc30d4ef4998fa53e2403b6130" title="Allocate a new empty bitmap.">hwloc_bitmap_alloc</a>(<span class="keywordtype">void</span>) ;
60
<a name="l00061"></a>00061
61
<a name="l00063"></a>00063 hwloc_bitmap_t <a class="code" href="a00056.html#gadd4479485685bda179f4b8b9b70f671e" title="Allocate a new full bitmap.">hwloc_bitmap_alloc_full</a>(<span class="keywordtype">void</span>) ;
62
<a name="l00064"></a>00064
63
<a name="l00066"></a>00066 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga8e7035fe555ef96921bfb98e08519bc7" title="Free bitmap bitmap.">hwloc_bitmap_free</a>(hwloc_bitmap_t bitmap);
64
<a name="l00067"></a>00067
65
<a name="l00069"></a>00069 hwloc_bitmap_t <a class="code" href="a00056.html#gaaa4ed76211cd3694dfbea2109fc440be" title="Duplicate bitmap bitmap by allocating a new bitmap and copying bitmap contents.">hwloc_bitmap_dup</a>(hwloc_const_bitmap_t bitmap) ;
66
<a name="l00070"></a>00070
67
<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="a00056.html#gab14743355fa03b36cef521cbcd2fbf64" title="Copy the contents of bitmap src into the already allocated bitmap dst.">hwloc_bitmap_copy</a>(hwloc_bitmap_t dst, hwloc_const_bitmap_t src);
68
<a name="l00073"></a>00073
70
<a name="l00061"></a>00061 hwloc_bitmap_t <a class="code" href="a00056.html#ga9fb6aedc30d4ef4998fa53e2403b6130" title="Allocate a new empty bitmap.">hwloc_bitmap_alloc</a>(<span class="keywordtype">void</span>) ;
71
<a name="l00062"></a>00062
72
<a name="l00064"></a>00064 hwloc_bitmap_t <a class="code" href="a00056.html#gadd4479485685bda179f4b8b9b70f671e" title="Allocate a new full bitmap.">hwloc_bitmap_alloc_full</a>(<span class="keywordtype">void</span>) ;
73
<a name="l00065"></a>00065
74
<a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga8e7035fe555ef96921bfb98e08519bc7" title="Free bitmap bitmap.">hwloc_bitmap_free</a>(hwloc_bitmap_t bitmap);
75
<a name="l00071"></a>00071
76
<a name="l00073"></a>00073 hwloc_bitmap_t <a class="code" href="a00056.html#gaaa4ed76211cd3694dfbea2109fc440be" title="Duplicate bitmap bitmap by allocating a new bitmap and copying bitmap contents.">hwloc_bitmap_dup</a>(hwloc_const_bitmap_t bitmap) ;
69
77
<a name="l00074"></a>00074
70
<a name="l00075"></a>00075 <span class="comment">/*</span>
71
<a name="l00076"></a>00076 <span class="comment"> * Bitmap/String Conversion</span>
72
<a name="l00077"></a>00077 <span class="comment"> */</span>
78
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="a00056.html#gab14743355fa03b36cef521cbcd2fbf64" title="Copy the contents of bitmap src into the already allocated bitmap dst.">hwloc_bitmap_copy</a>(hwloc_bitmap_t dst, hwloc_const_bitmap_t src);
79
<a name="l00077"></a>00077
73
80
<a name="l00078"></a>00078
74
<a name="l00088"></a>00088 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga6c0d60db98f27276752c1e5fafcbd7d1" title="Stringify a bitmap.">hwloc_bitmap_snprintf</a>(<span class="keywordtype">char</span> * restrict buf, <span class="keywordtype">size_t</span> buflen, hwloc_const_bitmap_t bitmap);
75
<a name="l00089"></a>00089
76
<a name="l00092"></a>00092 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gad3cf87ceb58aa91656756bbb58057320" title="Stringify a bitmap into a newly allocated string.">hwloc_bitmap_asprintf</a>(<span class="keywordtype">char</span> ** strp, hwloc_const_bitmap_t bitmap);
81
<a name="l00079"></a>00079 <span class="comment">/*</span>
82
<a name="l00080"></a>00080 <span class="comment"> * Bitmap/String Conversion</span>
83
<a name="l00081"></a>00081 <span class="comment"> */</span>
84
<a name="l00082"></a>00082
85
<a name="l00092"></a>00092 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga6c0d60db98f27276752c1e5fafcbd7d1" title="Stringify a bitmap.">hwloc_bitmap_snprintf</a>(<span class="keywordtype">char</span> * restrict buf, <span class="keywordtype">size_t</span> buflen, hwloc_const_bitmap_t bitmap);
77
86
<a name="l00093"></a>00093
78
<a name="l00096"></a>00096 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga553cd5ceb1925bfd31788e70b4a46ae8" title="Parse a bitmap string and stores it in bitmap bitmap.">hwloc_bitmap_sscanf</a>(hwloc_bitmap_t bitmap, const <span class="keywordtype">char</span> * restrict <span class="keywordtype">string</span>);
87
<a name="l00096"></a>00096 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gad3cf87ceb58aa91656756bbb58057320" title="Stringify a bitmap into a newly allocated string.">hwloc_bitmap_asprintf</a>(<span class="keywordtype">char</span> ** strp, hwloc_const_bitmap_t bitmap);
79
88
<a name="l00097"></a>00097
80
<a name="l00110"></a>00110 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gae0e0619f43a4af5efafb75f489c1c6ec" title="Stringify a bitmap in the taskset-specific format.">hwloc_bitmap_taskset_snprintf</a>(<span class="keywordtype">char</span> * restrict buf, <span class="keywordtype">size_t</span> buflen, hwloc_const_bitmap_t bitmap);
81
<a name="l00111"></a>00111
82
<a name="l00114"></a>00114 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gaa3df92e204ffb24ceddd44d8d58f6eaa" title="Stringify a bitmap into a newly allocated taskset-specific string.">hwloc_bitmap_taskset_asprintf</a>(<span class="keywordtype">char</span> ** strp, hwloc_const_bitmap_t bitmap);
89
<a name="l00100"></a>00100 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga553cd5ceb1925bfd31788e70b4a46ae8" title="Parse a bitmap string and stores it in bitmap bitmap.">hwloc_bitmap_sscanf</a>(hwloc_bitmap_t bitmap, const <span class="keywordtype">char</span> * restrict <span class="keywordtype">string</span>);
90
<a name="l00101"></a>00101
91
<a name="l00114"></a>00114 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gae0e0619f43a4af5efafb75f489c1c6ec" title="Stringify a bitmap in the taskset-specific format.">hwloc_bitmap_taskset_snprintf</a>(<span class="keywordtype">char</span> * restrict buf, <span class="keywordtype">size_t</span> buflen, hwloc_const_bitmap_t bitmap);
83
92
<a name="l00115"></a>00115
84
<a name="l00118"></a>00118 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga71b28ef0d7206e37adbb94468c03e1a9" title="Parse a taskset-specific bitmap string and stores it in bitmap bitmap.">hwloc_bitmap_taskset_sscanf</a>(hwloc_bitmap_t bitmap, const <span class="keywordtype">char</span> * restrict <span class="keywordtype">string</span>);
93
<a name="l00118"></a>00118 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gaa3df92e204ffb24ceddd44d8d58f6eaa" title="Stringify a bitmap into a newly allocated taskset-specific string.">hwloc_bitmap_taskset_asprintf</a>(<span class="keywordtype">char</span> ** strp, hwloc_const_bitmap_t bitmap);
85
94
<a name="l00119"></a>00119
86
<a name="l00120"></a>00120
87
<a name="l00121"></a>00121 <span class="comment">/*</span>
88
<a name="l00122"></a>00122 <span class="comment"> * Building bitmaps.</span>
89
<a name="l00123"></a>00123 <span class="comment"> */</span>
95
<a name="l00122"></a>00122 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga71b28ef0d7206e37adbb94468c03e1a9" title="Parse a taskset-specific bitmap string and stores it in bitmap bitmap.">hwloc_bitmap_taskset_sscanf</a>(hwloc_bitmap_t bitmap, const <span class="keywordtype">char</span> * restrict <span class="keywordtype">string</span>);
96
<a name="l00123"></a>00123
90
97
<a name="l00124"></a>00124
91
<a name="l00126"></a>00126 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga6c540b9fe63b8223b6aba46d56dd63b8" title="Empty the bitmap bitmap.">hwloc_bitmap_zero</a>(hwloc_bitmap_t bitmap);
92
<a name="l00127"></a>00127
93
<a name="l00129"></a>00129 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga52456f7ef79d68e610cb65e3f7ffafad" title="Fill bitmap bitmap with all possible indexes (even if those objects don&#39;t exist or are otherwise ...">hwloc_bitmap_fill</a>(hwloc_bitmap_t bitmap);
94
<a name="l00130"></a>00130
95
<a name="l00132"></a>00132 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga8ea10f5ebaadb8418f28f953d6106190" title="Empty the bitmap bitmap and add bit id.">hwloc_bitmap_only</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
96
<a name="l00133"></a>00133
97
<a name="l00135"></a>00135 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga88204c1c313aa067da10241b5886a166" title="Fill the bitmap and clear the index id.">hwloc_bitmap_allbut</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
98
<a name="l00136"></a>00136
99
<a name="l00138"></a>00138 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga02eae57cff32b6aa55044e6609ae7d73" title="Setup bitmap bitmap from unsigned long mask.">hwloc_bitmap_from_ulong</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
100
<a name="l00139"></a>00139
101
<a name="l00141"></a>00141 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga3c44c943cb3a3e4577b32d924e4f36f2" title="Setup bitmap bitmap from unsigned long mask used as i -th subset.">hwloc_bitmap_from_ith_ulong</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
102
<a name="l00142"></a>00142
98
<a name="l00125"></a>00125 <span class="comment">/*</span>
99
<a name="l00126"></a>00126 <span class="comment"> * Building bitmaps.</span>
100
<a name="l00127"></a>00127 <span class="comment"> */</span>
101
<a name="l00128"></a>00128
102
<a name="l00130"></a>00130 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga6c540b9fe63b8223b6aba46d56dd63b8" title="Empty the bitmap bitmap.">hwloc_bitmap_zero</a>(hwloc_bitmap_t bitmap);
103
<a name="l00131"></a>00131
104
<a name="l00133"></a>00133 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga52456f7ef79d68e610cb65e3f7ffafad" title="Fill bitmap bitmap with all possible indexes (even if those objects don&#39;t exist or are otherwise ...">hwloc_bitmap_fill</a>(hwloc_bitmap_t bitmap);
105
<a name="l00134"></a>00134
106
<a name="l00136"></a>00136 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga8ea10f5ebaadb8418f28f953d6106190" title="Empty the bitmap bitmap and add bit id.">hwloc_bitmap_only</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
107
<a name="l00137"></a>00137
108
<a name="l00139"></a>00139 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga88204c1c313aa067da10241b5886a166" title="Fill the bitmap and clear the index id.">hwloc_bitmap_allbut</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
109
<a name="l00140"></a>00140
110
<a name="l00142"></a>00142 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga02eae57cff32b6aa55044e6609ae7d73" title="Setup bitmap bitmap from unsigned long mask.">hwloc_bitmap_from_ulong</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
103
111
<a name="l00143"></a>00143
104
<a name="l00144"></a>00144 <span class="comment">/*</span>
105
<a name="l00145"></a>00145 <span class="comment"> * Modifying bitmaps.</span>
106
<a name="l00146"></a>00146 <span class="comment"> */</span>
112
<a name="l00145"></a>00145 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga3c44c943cb3a3e4577b32d924e4f36f2" title="Setup bitmap bitmap from unsigned long mask used as i -th subset.">hwloc_bitmap_from_ith_ulong</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
113
<a name="l00146"></a>00146
107
114
<a name="l00147"></a>00147
108
<a name="l00149"></a>00149 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga497556af0cc34f109ae0277999c074d3" title="Add index id in bitmap bitmap.">hwloc_bitmap_set</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
109
<a name="l00150"></a>00150
110
<a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga371be6d389287d5b22a8034d61ccd7e3" title="Add indexess from begin to end in bitmap bitmap.">hwloc_bitmap_set_range</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> begin, <span class="keywordtype">unsigned</span> end);
111
<a name="l00153"></a>00153
112
<a name="l00155"></a>00155 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga56027d6b141a3da441925e6e999de1c1" title="Replace i -th subset of bitmap bitmap with unsigned long mask.">hwloc_bitmap_set_ith_ulong</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
113
<a name="l00156"></a>00156
114
<a name="l00158"></a>00158 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga54e89b87ba5f5c18323f16690e0e5730" title="Remove index id from bitmap bitmap.">hwloc_bitmap_clr</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
115
<a name="l00159"></a>00159
116
<a name="l00161"></a>00161 <span class="keywordtype">void</span> <a class="code" href="a00056.html#gacddc932644e34fc2e914caf2fdaa70ce" title="Remove index from begin to end in bitmap bitmap.">hwloc_bitmap_clr_range</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> begin, <span class="keywordtype">unsigned</span> end);
117
<a name="l00162"></a>00162
118
<a name="l00169"></a>00169 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga4630aa1b7e08eac5b41be126194e84a1" title="Keep a single index among those set in bitmap bitmap.">hwloc_bitmap_singlify</a>(hwloc_bitmap_t bitmap);
119
<a name="l00170"></a>00170
120
<a name="l00171"></a>00171
121
<a name="l00172"></a>00172 <span class="comment">/*</span>
122
<a name="l00173"></a>00173 <span class="comment"> * Consulting bitmaps.</span>
123
<a name="l00174"></a>00174 <span class="comment"> */</span>
115
<a name="l00148"></a>00148 <span class="comment">/*</span>
116
<a name="l00149"></a>00149 <span class="comment"> * Modifying bitmaps.</span>
117
<a name="l00150"></a>00150 <span class="comment"> */</span>
118
<a name="l00151"></a>00151
119
<a name="l00153"></a>00153 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga497556af0cc34f109ae0277999c074d3" title="Add index id in bitmap bitmap.">hwloc_bitmap_set</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
120
<a name="l00154"></a>00154
121
<a name="l00156"></a>00156 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga371be6d389287d5b22a8034d61ccd7e3" title="Add indexes from begin to end in bitmap bitmap.">hwloc_bitmap_set_range</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> begin, <span class="keywordtype">unsigned</span> end);
122
<a name="l00157"></a>00157
123
<a name="l00159"></a>00159 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga56027d6b141a3da441925e6e999de1c1" title="Replace i -th subset of bitmap bitmap with unsigned long mask.">hwloc_bitmap_set_ith_ulong</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
124
<a name="l00160"></a>00160
125
<a name="l00162"></a>00162 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga54e89b87ba5f5c18323f16690e0e5730" title="Remove index id from bitmap bitmap.">hwloc_bitmap_clr</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>);
126
<a name="l00163"></a>00163
127
<a name="l00165"></a>00165 <span class="keywordtype">void</span> <a class="code" href="a00056.html#gacddc932644e34fc2e914caf2fdaa70ce" title="Remove indexes from begin to end in bitmap bitmap.">hwloc_bitmap_clr_range</a>(hwloc_bitmap_t bitmap, <span class="keywordtype">unsigned</span> begin, <span class="keywordtype">unsigned</span> end);
128
<a name="l00166"></a>00166
129
<a name="l00173"></a>00173 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga4630aa1b7e08eac5b41be126194e84a1" title="Keep a single index among those set in bitmap bitmap.">hwloc_bitmap_singlify</a>(hwloc_bitmap_t bitmap);
130
<a name="l00174"></a>00174
124
131
<a name="l00175"></a>00175
125
<a name="l00177"></a>00177 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00056.html#ga4fee4e3cea99e4a389c54a6c3f0c78ed" title="Convert the beginning part of bitmap bitmap into unsigned long mask.">hwloc_bitmap_to_ulong</a>(hwloc_const_bitmap_t bitmap) ;
126
<a name="l00178"></a>00178
127
<a name="l00180"></a>00180 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00056.html#gabc0b9f4cae56a1303c38b2380086efc2" title="Convert the i -th subset of bitmap bitmap into unsigned long mask.">hwloc_bitmap_to_ith_ulong</a>(hwloc_const_bitmap_t bitmap, <span class="keywordtype">unsigned</span> i) ;
128
<a name="l00181"></a>00181
129
<a name="l00183"></a>00183 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga2583f44cbdb5fff2ea40efdcf3975d3f" title="Test whether index id is part of bitmap bitmap.">hwloc_bitmap_isset</a>(hwloc_const_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>) ;
130
<a name="l00184"></a>00184
131
<a name="l00186"></a>00186 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gaa94fed35d2a598bc4a8657b6955b7bf5" title="Test whether bitmap bitmap is empty.">hwloc_bitmap_iszero</a>(hwloc_const_bitmap_t bitmap) ;
132
<a name="l00187"></a>00187
133
<a name="l00189"></a>00189 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga59a07ecd8e74f2d4ee4271a1dbf0e4dd" title="Test whether bitmap bitmap is completely full.">hwloc_bitmap_isfull</a>(hwloc_const_bitmap_t bitmap) ;
134
<a name="l00190"></a>00190
135
<a name="l00195"></a>00195 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga42472a7b75ca79cae19f0611fdb849e6" title="Compute the first index (least significant bit) in bitmap bitmap.">hwloc_bitmap_first</a>(hwloc_const_bitmap_t bitmap) ;
136
<a name="l00196"></a>00196
137
<a name="l00201"></a>00201 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gae351afd7046295683112f0876cc782f1" title="Compute the next index in bitmap bitmap which is after index prev.">hwloc_bitmap_next</a>(hwloc_const_bitmap_t bitmap, <span class="keywordtype">unsigned</span> prev) ;
138
<a name="l00202"></a>00202
139
<a name="l00207"></a>00207 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga4d5786ea9561d9ddbf90bc0ce606c549" title="Compute the last index (most significant bit) in bitmap bitmap.">hwloc_bitmap_last</a>(hwloc_const_bitmap_t bitmap) ;
140
<a name="l00208"></a>00208
141
<a name="l00214"></a>00214 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga12d520387be74f849f191d7a06ac325c" title="Compute the &quot;weight&quot; of bitmap bitmap (i.e., number of indexes that are in the bitmap)...">hwloc_bitmap_weight</a>(hwloc_const_bitmap_t bitmap) ;
142
<a name="l00215"></a>00215
143
<a name="l00227"></a><a class="code" href="a00056.html#ga3f6861045a8029ade373510ffa727d2a">00227</a> <span class="preprocessor">#define hwloc_bitmap_foreach_begin(id, bitmap) \</span>
144
<a name="l00228"></a>00228 <span class="preprocessor">do { \</span>
145
<a name="l00229"></a>00229 <span class="preprocessor"> assert(hwloc_bitmap_weight(bitmap) != -1); \</span>
146
<a name="l00230"></a>00230 <span class="preprocessor"> for (id = hwloc_bitmap_first(bitmap); \</span>
147
<a name="l00231"></a>00231 <span class="preprocessor"> (unsigned) id != (unsigned) -1; \</span>
148
<a name="l00232"></a>00232 <span class="preprocessor"> id = hwloc_bitmap_next(bitmap, id)) { \</span>
149
<a name="l00233"></a>00233 <span class="preprocessor"></span>
150
<a name="l00237"></a><a class="code" href="a00056.html#gafcf3246db406218d4e155735b3fa6528">00237</a> <span class="preprocessor">#define hwloc_bitmap_foreach_end() \</span>
151
<a name="l00238"></a>00238 <span class="preprocessor"> } \</span>
152
<a name="l00239"></a>00239 <span class="preprocessor">} while (0)</span>
153
<a name="l00240"></a>00240 <span class="preprocessor"></span>
154
<a name="l00241"></a>00241
155
<a name="l00242"></a>00242 <span class="comment">/*</span>
156
<a name="l00243"></a>00243 <span class="comment"> * Combining bitmaps.</span>
157
<a name="l00244"></a>00244 <span class="comment"> */</span>
132
<a name="l00176"></a>00176 <span class="comment">/*</span>
133
<a name="l00177"></a>00177 <span class="comment"> * Consulting bitmaps.</span>
134
<a name="l00178"></a>00178 <span class="comment"> */</span>
135
<a name="l00179"></a>00179
136
<a name="l00181"></a>00181 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00056.html#ga4fee4e3cea99e4a389c54a6c3f0c78ed" title="Convert the beginning part of bitmap bitmap into unsigned long mask.">hwloc_bitmap_to_ulong</a>(hwloc_const_bitmap_t bitmap) ;
137
<a name="l00182"></a>00182
138
<a name="l00184"></a>00184 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00056.html#gabc0b9f4cae56a1303c38b2380086efc2" title="Convert the i -th subset of bitmap bitmap into unsigned long mask.">hwloc_bitmap_to_ith_ulong</a>(hwloc_const_bitmap_t bitmap, <span class="keywordtype">unsigned</span> i) ;
139
<a name="l00185"></a>00185
140
<a name="l00187"></a>00187 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga2583f44cbdb5fff2ea40efdcf3975d3f" title="Test whether index id is part of bitmap bitmap.">hwloc_bitmap_isset</a>(hwloc_const_bitmap_t bitmap, <span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>) ;
141
<a name="l00188"></a>00188
142
<a name="l00190"></a>00190 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gaa94fed35d2a598bc4a8657b6955b7bf5" title="Test whether bitmap bitmap is empty.">hwloc_bitmap_iszero</a>(hwloc_const_bitmap_t bitmap) ;
143
<a name="l00191"></a>00191
144
<a name="l00193"></a>00193 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga59a07ecd8e74f2d4ee4271a1dbf0e4dd" title="Test whether bitmap bitmap is completely full.">hwloc_bitmap_isfull</a>(hwloc_const_bitmap_t bitmap) ;
145
<a name="l00194"></a>00194
146
<a name="l00199"></a>00199 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga42472a7b75ca79cae19f0611fdb849e6" title="Compute the first index (least significant bit) in bitmap bitmap.">hwloc_bitmap_first</a>(hwloc_const_bitmap_t bitmap) ;
147
<a name="l00200"></a>00200
148
<a name="l00205"></a>00205 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gae351afd7046295683112f0876cc782f1" title="Compute the next index in bitmap bitmap which is after index prev.">hwloc_bitmap_next</a>(hwloc_const_bitmap_t bitmap, <span class="keywordtype">unsigned</span> prev) ;
149
<a name="l00206"></a>00206
150
<a name="l00211"></a>00211 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga4d5786ea9561d9ddbf90bc0ce606c549" title="Compute the last index (most significant bit) in bitmap bitmap.">hwloc_bitmap_last</a>(hwloc_const_bitmap_t bitmap) ;
151
<a name="l00212"></a>00212
152
<a name="l00218"></a>00218 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga12d520387be74f849f191d7a06ac325c" title="Compute the &quot;weight&quot; of bitmap bitmap (i.e., number of indexes that are in the bitmap)...">hwloc_bitmap_weight</a>(hwloc_const_bitmap_t bitmap) ;
153
<a name="l00219"></a>00219
154
<a name="l00231"></a><a class="code" href="a00056.html#ga3f6861045a8029ade373510ffa727d2a">00231</a> <span class="preprocessor">#define hwloc_bitmap_foreach_begin(id, bitmap) \</span>
155
<a name="l00232"></a>00232 <span class="preprocessor">do { \</span>
156
<a name="l00233"></a>00233 <span class="preprocessor"> assert(hwloc_bitmap_weight(bitmap) != -1); \</span>
157
<a name="l00234"></a>00234 <span class="preprocessor"> for (id = hwloc_bitmap_first(bitmap); \</span>
158
<a name="l00235"></a>00235 <span class="preprocessor"> (unsigned) id != (unsigned) -1; \</span>
159
<a name="l00236"></a>00236 <span class="preprocessor"> id = hwloc_bitmap_next(bitmap, id)) { \</span>
160
<a name="l00237"></a>00237 <span class="preprocessor"></span>
161
<a name="l00241"></a><a class="code" href="a00056.html#gafcf3246db406218d4e155735b3fa6528">00241</a> <span class="preprocessor">#define hwloc_bitmap_foreach_end() \</span>
162
<a name="l00242"></a>00242 <span class="preprocessor"> } \</span>
163
<a name="l00243"></a>00243 <span class="preprocessor">} while (0)</span>
164
<a name="l00244"></a>00244 <span class="preprocessor"></span>
158
165
<a name="l00245"></a>00245
159
<a name="l00247"></a>00247 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga1ba1de709ee9a7cf5cc8ad2d9a1a81d4" title="Or bitmaps bitmap1 and bitmap2 and store the result in bitmap res.">hwloc_bitmap_or</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
160
<a name="l00248"></a>00248
161
<a name="l00250"></a>00250 <span class="keywordtype">void</span> <a class="code" href="a00056.html#gac2f7675dcf1b664a832413d9990d1bcf" title="And bitmaps bitmap1 and bitmap2 and store the result in bitmap res.">hwloc_bitmap_and</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
162
<a name="l00251"></a>00251
163
<a name="l00253"></a>00253 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga7618a962685d95564564ba07e9b2199b" title="And bitmap bitmap1 and the negation of bitmap2 and store the result in bitmap res.">hwloc_bitmap_andnot</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
164
<a name="l00254"></a>00254
165
<a name="l00256"></a>00256 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga5743af61c30758df75aec29c12444616" title="Xor bitmaps bitmap1 and bitmap2 and store the result in bitmap res.">hwloc_bitmap_xor</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
166
<a name="l00257"></a>00257
167
<a name="l00259"></a>00259 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga4a8088d62755a083ffce9d592c9e3878" title="Negate bitmap bitmap and store the result in bitmap res.">hwloc_bitmap_not</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap);
168
<a name="l00260"></a>00260
166
<a name="l00246"></a>00246 <span class="comment">/*</span>
167
<a name="l00247"></a>00247 <span class="comment"> * Combining bitmaps.</span>
168
<a name="l00248"></a>00248 <span class="comment"> */</span>
169
<a name="l00249"></a>00249
170
<a name="l00251"></a>00251 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga1ba1de709ee9a7cf5cc8ad2d9a1a81d4" title="Or bitmaps bitmap1 and bitmap2 and store the result in bitmap res.">hwloc_bitmap_or</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
171
<a name="l00252"></a>00252
172
<a name="l00254"></a>00254 <span class="keywordtype">void</span> <a class="code" href="a00056.html#gac2f7675dcf1b664a832413d9990d1bcf" title="And bitmaps bitmap1 and bitmap2 and store the result in bitmap res.">hwloc_bitmap_and</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
173
<a name="l00255"></a>00255
174
<a name="l00257"></a>00257 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga7618a962685d95564564ba07e9b2199b" title="And bitmap bitmap1 and the negation of bitmap2 and store the result in bitmap res.">hwloc_bitmap_andnot</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
175
<a name="l00258"></a>00258
176
<a name="l00260"></a>00260 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga5743af61c30758df75aec29c12444616" title="Xor bitmaps bitmap1 and bitmap2 and store the result in bitmap res.">hwloc_bitmap_xor</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
169
177
<a name="l00261"></a>00261
170
<a name="l00262"></a>00262 <span class="comment">/*</span>
171
<a name="l00263"></a>00263 <span class="comment"> * Comparing bitmaps.</span>
172
<a name="l00264"></a>00264 <span class="comment"> */</span>
178
<a name="l00263"></a>00263 <span class="keywordtype">void</span> <a class="code" href="a00056.html#ga4a8088d62755a083ffce9d592c9e3878" title="Negate bitmap bitmap and store the result in bitmap res.">hwloc_bitmap_not</a> (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap);
179
<a name="l00264"></a>00264
173
180
<a name="l00265"></a>00265
174
<a name="l00267"></a>00267 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga575c27953709a8cb9a047aae65157526" title="Test whether bitmaps bitmap1 and bitmap2 intersects.">hwloc_bitmap_intersects</a> (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
175
<a name="l00268"></a>00268
176
<a name="l00270"></a>00270 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gaae29e14a926c198e8f91e6e4790621e7" title="Test whether bitmap sub_bitmap is part of bitmap super_bitmap.">hwloc_bitmap_isincluded</a> (hwloc_const_bitmap_t sub_bitmap, hwloc_const_bitmap_t super_bitmap) ;
177
<a name="l00271"></a>00271
178
<a name="l00273"></a>00273 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga4dd6a75ab63d33ef33bd626b0e489388" title="Test whether bitmap bitmap1 is equal to bitmap bitmap2.">hwloc_bitmap_isequal</a> (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
179
<a name="l00274"></a>00274
180
<a name="l00280"></a>00280 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gac1cbd1e03f9986552243761e657e1752" title="Compare bitmaps bitmap1 and bitmap2 using their lowest index.">hwloc_bitmap_compare_first</a>(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
181
<a name="l00281"></a>00281
182
<a name="l00287"></a>00287 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gadd3aa325f2d6a17b5aa3b3be9c740da0" title="Compare bitmaps bitmap1 and bitmap2 using their highest index.">hwloc_bitmap_compare</a>(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
183
<a name="l00288"></a>00288
184
<a name="l00292"></a>00292 <span class="preprocessor">#ifdef __cplusplus</span>
185
<a name="l00293"></a>00293 <span class="preprocessor"></span>} <span class="comment">/* extern "C" */</span>
186
<a name="l00294"></a>00294 <span class="preprocessor">#endif</span>
187
<a name="l00295"></a>00295 <span class="preprocessor"></span>
188
<a name="l00296"></a>00296
189
<a name="l00297"></a>00297 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_BITMAP_H */</span>
181
<a name="l00266"></a>00266 <span class="comment">/*</span>
182
<a name="l00267"></a>00267 <span class="comment"> * Comparing bitmaps.</span>
183
<a name="l00268"></a>00268 <span class="comment"> */</span>
184
<a name="l00269"></a>00269
185
<a name="l00271"></a>00271 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga575c27953709a8cb9a047aae65157526" title="Test whether bitmaps bitmap1 and bitmap2 intersects.">hwloc_bitmap_intersects</a> (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
186
<a name="l00272"></a>00272
187
<a name="l00274"></a>00274 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gaae29e14a926c198e8f91e6e4790621e7" title="Test whether bitmap sub_bitmap is part of bitmap super_bitmap.">hwloc_bitmap_isincluded</a> (hwloc_const_bitmap_t sub_bitmap, hwloc_const_bitmap_t super_bitmap) ;
188
<a name="l00275"></a>00275
189
<a name="l00277"></a>00277 <span class="keywordtype">int</span> <a class="code" href="a00056.html#ga4dd6a75ab63d33ef33bd626b0e489388" title="Test whether bitmap bitmap1 is equal to bitmap bitmap2.">hwloc_bitmap_isequal</a> (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
190
<a name="l00278"></a>00278
191
<a name="l00284"></a>00284 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gac1cbd1e03f9986552243761e657e1752" title="Compare bitmaps bitmap1 and bitmap2 using their lowest index.">hwloc_bitmap_compare_first</a>(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
192
<a name="l00285"></a>00285
193
<a name="l00291"></a>00291 <span class="keywordtype">int</span> <a class="code" href="a00056.html#gadd3aa325f2d6a17b5aa3b3be9c740da0" title="Compare bitmaps bitmap1 and bitmap2 using their highest index.">hwloc_bitmap_compare</a>(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) ;
194
<a name="l00292"></a>00292
195
<a name="l00296"></a>00296 <span class="preprocessor">#ifdef __cplusplus</span>
196
<a name="l00297"></a>00297 <span class="preprocessor"></span>} <span class="comment">/* extern "C" */</span>
197
<a name="l00298"></a>00298 <span class="preprocessor">#endif</span>
198
<a name="l00299"></a>00299 <span class="preprocessor"></span>
199
<a name="l00300"></a>00300
200
<a name="l00301"></a>00301 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_BITMAP_H */</span>
190
201
</pre></div></div>
192
<hr class="footer"/><address class="footer"><small>Generated on Mon Jan 24 2011 17:12:07 for Hardware Locality (hwloc) by 
203
<hr class="footer"/><address class="footer"><small>Generated on Wed Apr 6 2011 17:31:40 for Hardware Locality (hwloc) by 
193
204
<a href="http://www.doxygen.org/index.html">
194
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
205
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>