FastLED 3.9.3
|
Functions for doing a rotation of bits/bytes used by parallel output.
Definition in file bitswap.h.
Go to the source code of this file.
Classes | |
union | just8bits |
Structure representing 8 bits of access. More... | |
struct | sub4 |
Structure representing 32 bits of access. More... | |
union | bitswap_type |
Union containing a full 8 bytes to swap the bit orientation on. More... | |
Macros | |
#define | SWAPSA(X, N) |
Set out.X bits 0, 1, 2, and 3 to bit N of in.a.a , in.a.b , in.a.b , in.a.c , and in.a.d | |
#define | SWAPSB(X, N) |
Set out.X bits 0, 1, 2, and 3 to bit N of in.b.a , in.b.b , in.b.b , in.b.c , and in.b.d | |
#define | SWAPS(X, N) |
Set out.X bits to bit N of both in.a and in.b in order. | |
Functions | |
FASTLED_FORCE_INLINE void | swapbits8 (bitswap_type in, bitswap_type &out) |
Do an 8-byte by 8-bit rotation. | |
FASTLED_FORCE_INLINE void | slowswap (unsigned char *A, unsigned char *B) |
Slow version of the 8 byte by 8 bit rotation. | |
void | transpose8x1_noinline (unsigned char *A, unsigned char *B) |
Simplified form of bits rotating function. | |
FASTLED_FORCE_INLINE void | transpose8x1 (unsigned char *A, unsigned char *B) |
Simplified form of bits rotating function. | |
FASTLED_FORCE_INLINE void | transpose8x1_MSB (unsigned char *A, unsigned char *B) |
Simplified form of bits rotating function. | |
template<int m, int n> | |
FASTLED_FORCE_INLINE void | transpose8 (unsigned char *A, unsigned char *B) |
Templated bit-rotating function. | |
#define SWAPS | ( | X, | |
N ) |
Set out.X
bits to bit N of both in.a
and in.b
in order.
X | the sub4 of out to set |
N | the bit of each byte to retrieve |
#define SWAPSA | ( | X, | |
N ) |
Set out.X
bits 0, 1, 2, and 3 to bit N of in.a.a
, in.a.b
, in.a.b
, in.a.c
, and in.a.d
X | the sub4 of out to set |
N | the bit of each byte to retrieve |
#define SWAPSB | ( | X, | |
N ) |
Set out.X
bits 0, 1, 2, and 3 to bit N of in.b.a
, in.b.b
, in.b.b
, in.b.c
, and in.b.d
X | the sub4 of out to set |
N | the bit of each byte to retrieve |
FASTLED_FORCE_INLINE void slowswap | ( | unsigned char * | A, |
unsigned char * | B ) |
FASTLED_FORCE_INLINE void swapbits8 | ( | bitswap_type | in, |
bitswap_type & | out ) |
FASTLED_FORCE_INLINE void transpose8 | ( | unsigned char * | A, |
unsigned char * | B ) |
Templated bit-rotating function.
Based on code found here: https://web.archive.org/web/20190108225554/http://www.hackersdelight.org/hdcodetxt/transpose8.c.txt
FASTLED_FORCE_INLINE void transpose8x1 | ( | unsigned char * | A, |
unsigned char * | B ) |
Simplified form of bits rotating function.
This rotates data into LSB for a faster write (the code using this data can happily walk the array backwards).
Based on code found here: https://web.archive.org/web/20190108225554/http://www.hackersdelight.org/hdcodetxt/transpose8.c.txt
FASTLED_FORCE_INLINE void transpose8x1_MSB | ( | unsigned char * | A, |
unsigned char * | B ) |
Simplified form of bits rotating function.
Based on code found here: https://web.archive.org/web/20190108225554/http://www.hackersdelight.org/hdcodetxt/transpose8.c.txt
void transpose8x1_noinline | ( | unsigned char * | A, |
unsigned char * | B ) |
Simplified form of bits rotating function.
This rotates data into LSB for a faster write (the code using this data can happily walk the array backwards).
Based on code found here: https://web.archive.org/web/20190108225554/http://www.hackersdelight.org/hdcodetxt/transpose8.c.txt
Definition at line 4 of file transpose8x1_noinline.cpp.