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

Comparing libecb/ecb.pod (file contents):
Revision 1.35 by root, Fri Jun 17 21:38:31 2011 UTC vs.
Revision 1.36 by root, Sat Jun 18 13:37:39 2011 UTC

396After processing the node, (part of) the next node might already be in 396After processing the node, (part of) the next node might already be in
397cache. 397cache.
398 398
399=back 399=back
400 400
401=head2 BIT FIDDLING / BITSTUFFS 401=head2 BIT FIDDLING / BIT WIZARDRY
402 402
403=over 4 403=over 4
404 404
405=item bool ecb_big_endian () 405=item bool ecb_big_endian ()
406 406
417=item int ecb_ctz64 (uint64_t x) 417=item int ecb_ctz64 (uint64_t x)
418 418
419Returns the index of the least significant bit set in C<x> (or 419Returns the index of the least significant bit set in C<x> (or
420equivalently the number of bits set to 0 before the least significant bit 420equivalently the number of bits set to 0 before the least significant bit
421set), starting from 0. If C<x> is 0 the result is undefined. 421set), starting from 0. If C<x> is 0 the result is undefined.
422
423For smaller types than C<uint32_t> you can safely use C<ecb_ctz32>.
422 424
423For example: 425For example:
424 426
425 ecb_ctz32 (3) = 0 427 ecb_ctz32 (3) = 0
426 ecb_ctz32 (6) = 1 428 ecb_ctz32 (6) = 1
438This function is similar to the "count leading zero bits" function, except 440This function is similar to the "count leading zero bits" function, except
439that that one returns how many zero bits are "in front" of the number (in 441that that one returns how many zero bits are "in front" of the number (in
440the given data type), while C<ecb_ld> returns how many bits the number 442the given data type), while C<ecb_ld> returns how many bits the number
441itself requires. 443itself requires.
442 444
445For smaller types than C<uint32_t> you can safely use C<ecb_ld32>.
446
443=item int ecb_popcount32 (uint32_t x) 447=item int ecb_popcount32 (uint32_t x)
444 448
445=item int ecb_popcount64 (uint64_t x) 449=item int ecb_popcount64 (uint64_t x)
446 450
447Returns the number of bits set to 1 in C<x>. For example: 451Returns the number of bits set to 1 in C<x>.
452
453For smaller types than C<uint32_t> you can safely use C<ecb_popcount32>.
454
455For example:
448 456
449 ecb_popcount32 (7) = 3 457 ecb_popcount32 (7) = 3
450 ecb_popcount32 (255) = 8 458 ecb_popcount32 (255) = 8
451 459
452=item uint32_t ecb_bswap16 (uint32_t x) 460=item uint32_t ecb_bswap16 (uint32_t x)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines