ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.pod
(Generate patch)

Comparing libecb/ecb.pod (file contents):
Revision 1.11 by sf-exg, Thu May 26 21:18:52 2011 UTC vs.
Revision 1.13 by sf-exg, Thu May 26 22:14:52 2011 UTC

234equivalently the number of bits set to 0 before the least significant 234equivalently the number of bits set to 0 before the least significant
235bit set), starting from 0. If C<x> is 0 the result is undefined. A 235bit set), starting from 0. If C<x> is 0 the result is undefined. A
236common use case is to compute the integer binary logarithm, i.e., 236common use case is to compute the integer binary logarithm, i.e.,
237floor(log2(n)). For example: 237floor(log2(n)). For example:
238 238
239 ecb_ctz32(3) = 1 239 ecb_ctz32(3) = 0
240 ecb_ctz32(6) = 2 240 ecb_ctz32(6) = 1
241 241
242=item int ecb_popcount32 (uint32_t x) 242=item int ecb_popcount32 (uint32_t x)
243 243
244Returns the number of bits set to 1 in C<x>. For example: 244Returns the number of bits set to 1 in C<x>. For example:
245 245
248 248
249=item uint32_t ecb_bswap16 (uint32_t x) 249=item uint32_t ecb_bswap16 (uint32_t x)
250 250
251=item uint32_t ecb_bswap32 (uint32_t x) 251=item uint32_t ecb_bswap32 (uint32_t x)
252 252
253These two functions return the value of the 16-bit (32-bit) variable
254C<x> after reversing the order of bytes.
255
253=item uint32_t ecb_rotr32 (uint32_t x, unsigned int count) 256=item uint32_t ecb_rotr32 (uint32_t x, unsigned int count)
254 257
255=item uint32_t ecb_rotl32 (uint32_t x, unsigned int count) 258=item uint32_t ecb_rotl32 (uint32_t x, unsigned int count)
256 259
257These two functions return the value of C<x> after shifting all the bits 260These two functions return the value of C<x> after shifting all the bits
274 277
275=over 4 278=over 4
276 279
277=item element_count = ecb_array_length (name) [MACRO] 280=item element_count = ecb_array_length (name) [MACRO]
278 281
279=back 282Returns the number of elements in the array C<name>. For example:
280 283
284 int primes[] = { 2, 3, 5, 7, 11 };
285 int sum = 0;
281 286
287 for (i = 0; i < ecb_array_length (primes); i++)
288 sum += primes [i];
289
290=back
291
292

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines