Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e384097e authored by hhakim's avatar hhakim
Browse files

Minor change.

Doc/comment in faust_bit_rev_permu.
parent f2c2bdd0
Branches
Tags
No related merge requests found
......@@ -12,18 +12,19 @@ namespace Faust {
while(lower_mask < upper_mask)
{
for(unsigned int i=0;i<size;i++){
for(unsigned int i=0;i<size;i++)
{
lobit = (v[i] & lower_mask) >>(shift);
hibit = (v[i] & upper_mask)>>(n-shift-1);
if(lobit > hibit){
//lobit == 1, hibit == 0
v[i] ^= lower_mask;
v[i] |= upper_mask;
// swap lobit == 1, hibit == 0
v[i] ^= lower_mask; // 1 ^ 1 == 0 == hibit
v[i] |= upper_mask; // 0 | 1 == 1 == lobit
}
else if (lobit < hibit){
//swap lobit == 0, hibit == 1
v[i] |= lower_mask;
v[i] ^= upper_mask;
v[i] |= lower_mask; // 0 | 1 == 1 == hibit
v[i] ^= upper_mask; // 1 ^ 1 == 0 == lobit
}
}
lower_mask <<= 1;
......
......@@ -4,9 +4,9 @@ namespace Faust {
/**
* \brief This function is only utility for faust_FFT.h(pp).
*
* Init v to (1,..,2^n-1).
* Init v to (0,..,2^n-1).
* And proceeds with a bit reversal permutation.
* E.g. : if n = 3, v=(0, 1, 2, 3, 4, 5, 6, 7, 8) and becomes (0, 4, 2, 6, 1, 5, 3, 7).
* E.g. : if n = 3, v=(0, 1, 2, 3, 4, 5, 6, 7) and becomes (0, 4, 2, 6, 1, 5, 3, 7).
*/
void bit_rev_permu(unsigned int n, unsigned int* v, const bool initv=true);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment