Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
faust group
faust
Commits
e384097e
Commit
e384097e
authored
5 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Minor change.
Doc/comment in faust_bit_rev_permu.
parent
f2c2bdd0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/algorithm/factorization/faust_bit_rev_permu.cpp
+7
-6
7 additions, 6 deletions
src/algorithm/factorization/faust_bit_rev_permu.cpp
src/algorithm/factorization/faust_bit_rev_permu.h
+2
-2
2 additions, 2 deletions
src/algorithm/factorization/faust_bit_rev_permu.h
with
9 additions
and
8 deletions
src/algorithm/factorization/faust_bit_rev_permu.cpp
+
7
−
6
View file @
e384097e
...
@@ -12,18 +12,19 @@ namespace Faust {
...
@@ -12,18 +12,19 @@ namespace Faust {
while
(
lower_mask
<
upper_mask
)
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
);
lobit
=
(
v
[
i
]
&
lower_mask
)
>>
(
shift
);
hibit
=
(
v
[
i
]
&
upper_mask
)
>>
(
n
-
shift
-
1
);
hibit
=
(
v
[
i
]
&
upper_mask
)
>>
(
n
-
shift
-
1
);
if
(
lobit
>
hibit
){
if
(
lobit
>
hibit
){
//lobit == 1, hibit == 0
//
swap
lobit == 1, hibit == 0
v
[
i
]
^=
lower_mask
;
v
[
i
]
^=
lower_mask
;
// 1 ^ 1 == 0 == hibit
v
[
i
]
|=
upper_mask
;
v
[
i
]
|=
upper_mask
;
// 0 | 1 == 1 == lobit
}
}
else
if
(
lobit
<
hibit
){
else
if
(
lobit
<
hibit
){
//swap lobit == 0, hibit == 1
//swap lobit == 0, hibit == 1
v
[
i
]
|=
lower_mask
;
v
[
i
]
|=
lower_mask
;
// 0 | 1 == 1 == hibit
v
[
i
]
^=
upper_mask
;
v
[
i
]
^=
upper_mask
;
// 1 ^ 1 == 0 == lobit
}
}
}
}
lower_mask
<<=
1
;
lower_mask
<<=
1
;
...
...
This diff is collapsed.
Click to expand it.
src/algorithm/factorization/faust_bit_rev_permu.h
+
2
−
2
View file @
e384097e
...
@@ -4,9 +4,9 @@ namespace Faust {
...
@@ -4,9 +4,9 @@ namespace Faust {
/**
/**
* \brief This function is only utility for faust_FFT.h(pp).
* \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.
* 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
);
void
bit_rev_permu
(
unsigned
int
n
,
unsigned
int
*
v
,
const
bool
initv
=
true
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment