Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
28656a1a
Commit
28656a1a
authored
Oct 02, 2024
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test log2_approx.boundaries
parent
d6f9bcd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
openair1/PHY/TOOLS/tests/test_log2_approx.cpp
openair1/PHY/TOOLS/tests/test_log2_approx.cpp
+9
-0
No files found.
openair1/PHY/TOOLS/tests/test_log2_approx.cpp
View file @
28656a1a
...
...
@@ -16,6 +16,15 @@ TEST(log2_approx, complete)
EXPECT_EQ
(
log2_approx
(
i
),
log2_approx_ref
(
i
));
}
TEST
(
log2_approx
,
boundaries
)
{
for
(
int
i
=
0
;
i
<
32
;
i
++
)
{
uint32_t
i2
=
std
::
pow
(
2.0
,
i
+
0.5
);
EXPECT_EQ
(
log2_approx
(
i2
),
i
)
<<
"log2("
<<
i2
<<
")"
;
EXPECT_EQ
(
log2_approx
(
i2
+
1
),
i
+
1
)
<<
"log2("
<<
i2
+
1
<<
")"
;
}
}
TEST
(
log2_approx64
,
boundaries
)
{
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment