Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fx_s2308
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
battle_C_5
fx_s2308
Commits
5b1c3f51
Commit
5b1c3f51
authored
4 years ago
by
WooNaYoung
Browse files
Options
Downloads
Patches
Plain Diff
Modify div_perf.c for changing uppercase conversion
parent
9ffc1689
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
div_perf.c
+4
-4
4 additions, 4 deletions
div_perf.c
with
4 additions
and
4 deletions
div_perf.c
+
4
−
4
View file @
5b1c3f51
...
@@ -9,8 +9,8 @@ typedef long fixed32;
...
@@ -9,8 +9,8 @@ typedef long fixed32;
#define DOUBLE_TO_FX(a) (((int)(a*(256.0))))
#define DOUBLE_TO_FX(a) (((int)(a*(256.0))))
#define FX_DIV(a,b) DOUBLE_TO_FX(FX_TO_DOUBLE(a)/FX_TO_DOUBLE(b))
#define FX_DIV(a,b) DOUBLE_TO_FX(FX_TO_DOUBLE(a)/FX_TO_DOUBLE(b))
#define
fx_s
2308_
l_div
1(a,b) (int)(((long long)(a)/(b))<<8)
#define
FX_S
2308_
L_DIV
1(a,b) (int)(((long long)(a)/(b))<<8)
#define
fx_s
2308_
l_div
2(a,b) (int)((a<<8)/(b))
#define
FX_S
2308_
L_DIV
2(a,b) (int)((a<<8)/(b))
long
long
div_sum_double_test
()
long
long
div_sum_double_test
()
{
{
...
@@ -30,7 +30,7 @@ long long div1_sum_longlong_test()
...
@@ -30,7 +30,7 @@ long long div1_sum_longlong_test()
for
(
int
i
=
1
;
i
<
TEST_NUM
;
i
++
)
for
(
int
i
=
1
;
i
<
TEST_NUM
;
i
++
)
{
{
sum
+=
fx_s
2308_
l_div
1
(
DOUBLE_TO_FX
(
i
),
DOUBLE_TO_FX
(
i
));
sum
+=
FX_S
2308_
L_DIV
1
(
DOUBLE_TO_FX
(
i
),
DOUBLE_TO_FX
(
i
));
}
}
return
sum
;
return
sum
;
...
@@ -42,7 +42,7 @@ long long div2_sum_longlong_test()
...
@@ -42,7 +42,7 @@ long long div2_sum_longlong_test()
for
(
int
i
=
1
;
i
<
TEST_NUM
;
i
++
)
for
(
int
i
=
1
;
i
<
TEST_NUM
;
i
++
)
{
{
sum
+=
fx_s
2308_
l_div
2
(
DOUBLE_TO_FX
(
i
),
DOUBLE_TO_FX
(
i
));
sum
+=
FX_S
2308_
L_DIV
2
(
DOUBLE_TO_FX
(
i
),
DOUBLE_TO_FX
(
i
));
}
}
return
sum
;
return
sum
;
...
...
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