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

Comparing cvsroot/libecb/ecb.pod (file contents):
Revision 1.37 by sf-exg, Wed Aug 24 23:28:47 2011 UTC vs.
Revision 1.39 by root, Sat Dec 10 11:58:38 2011 UTC

455For example: 455For example:
456 456
457 ecb_popcount32 (7) = 3 457 ecb_popcount32 (7) = 3
458 ecb_popcount32 (255) = 8 458 ecb_popcount32 (255) = 8
459 459
460=item uint8_t ecb_bitrev8 (uint8_t x)
461
462=item uint16_t ecb_bitrev16 (uint16_t x)
463
464=item uint32_t ecb_bitrev32 (uint32_t x)
465
466Reverses the bits in x, i.e. the MSB becomes the LSB, MSB-1 becomes LSB+1
467and so on.
468
469Example:
470
471 ecb_bitrev8 (0xa7) = 0xea
472 ecb_bitrev32 (0xffcc4411) = 0x882233ff
473
460=item uint32_t ecb_bswap16 (uint32_t x) 474=item uint32_t ecb_bswap16 (uint32_t x)
461 475
462=item uint32_t ecb_bswap32 (uint32_t x) 476=item uint32_t ecb_bswap32 (uint32_t x)
463 477
464=item uint64_t ecb_bswap64 (uint64_t x) 478=item uint64_t ecb_bswap64 (uint64_t x)
527 541
528=item x = ecb_div_ru (val, div) 542=item x = ecb_div_ru (val, div)
529 543
530Returns C<val> divided by C<div> rounded down or up, respectively. 544Returns C<val> divided by C<div> rounded down or up, respectively.
531C<val> and C<div> must have integer types and C<div> must be strictly 545C<val> and C<div> must have integer types and C<div> must be strictly
532positive. 546positive. Note that these functions are implemented with macros in C
547and with function templates in C++.
533 548
534=back 549=back
535 550
536=head2 UTILITY 551=head2 UTILITY
537 552

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines