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

Comparing libecb/ecb.pod (file contents):
Revision 1.36 by root, Sat Jun 18 13:37:39 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)
521change direction for negative values: 535change direction for negative values:
522 536
523 for (m = -100; m <= 100; ++m) 537 for (m = -100; m <= 100; ++m)
524 int elem = myarray [ecb_mod (m, ecb_array_length (myarray))]; 538 int elem = myarray [ecb_mod (m, ecb_array_length (myarray))];
525 539
540=item x = ecb_div_rd (val, div)
541
542=item x = ecb_div_ru (val, div)
543
544Returns C<val> divided by C<div> rounded down or up, respectively.
545C<val> and C<div> must have integer types and C<div> must be strictly
546positive. Note that these functions are implemented with macros in C
547and with function templates in C++.
548
526=back 549=back
527 550
528=head2 UTILITY 551=head2 UTILITY
529 552
530=over 4 553=over 4

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines