Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fx_s1615
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RealCoding2_Team1
fx_s1615
Commits
68a82807
Commit
68a82807
authored
4 years ago
by
고예준
Browse files
Options
Downloads
Patches
Plain Diff
Update fx_1615_longlong.h_div02와 div03 순서 수정
parent
4aaa35bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fx_1615_longlong.h
+6
-7
6 additions, 7 deletions
fx_1615_longlong.h
with
6 additions
and
7 deletions
fx_1615_longlong.h
+
6
−
7
View file @
68a82807
...
@@ -11,24 +11,23 @@ typedef long long fixed64;
...
@@ -11,24 +11,23 @@ typedef long long fixed64;
// 32 bit 컴퓨터인데 성능이 중요하다면 MUL2나 MUL3 사용
// 32 bit 컴퓨터인데 성능이 중요하다면 MUL2나 MUL3 사용
#define FX_1615_LONGLONG_MUL2(a, b) ((a) * (b)) >> 15
#define FX_1615_LONGLONG_MUL2(a, b) ((a) * (b)) >> 15
#define FX_1615_LONGLONG_MUL3(a, b) ((a >> 8) * (b >> 7))
#define FX_1615_LONGLONG_MUL3(a, b) ((a >> 8) * (b >> 7))
#define FX_1615_LONGLONG_DIV01(a,b) (fx_s1615)((fixed64)((a >> 15) / (b >> 15)) << 15)
//
#define FX_1615_LONGLONG_DIV01(a,b) (fx_s1615)((fixed64)((a >> 15) / (b >> 15)) << 15)
#define FX_1615_LONGLONG_DIV02(a,b) (fx_s1615)(((fixed64)(a) << 15) / (b))
//
#define FX_1615_LONGLONG_DIV02(a,b) (fx_s1615)(((fixed64)(a) << 15) / (b))
// #define FX_1615_LONGLONG_DIV03(a,b) (fx_s1615)(((fixed64)((a) << 15) / b))
// #define FX_1615_LONGLONG_DIV03(a,b) (fx_s1615)(((fixed64)((a) << 15) / b))
// #define FX_1615_LONGLONG_DIV04(a,b) (fx_s1615)((((fixed64)(a << 4) / (b >> 4)) << 7))
// #define FX_1615_LONGLONG_DIV04(a,b) (fx_s1615)((((fixed64)(a << 4) / (b >> 4)) << 7))
// #define FX_1615_LONGLONG_DIV05(a,b) ((((a) << 8) / (b)) << 7)
// #define FX_1615_LONGLONG_DIV05(a,b) ((((a) << 8) / (b)) << 7)
// #define FX_1615_LONGLONG_DIV11(a,b) (((a << 7) / (b >> 4)) << 4) // DIV2 속도 테스트 2위
// #define FX_1615_LONGLONG_DIV11(a,b) (((a << 7) / (b >> 4)) << 4) // DIV2 속도 테스트 2위
// #define FX_1615_LONGLONG_DIV06(a,b) ((a) / ((b) >> 15))
// #define FX_1615_LONGLONG_DIV06(a,b) ((a) / ((b) >> 15))
// #define FX_1615_LONGLONG_DIV07(a,b) (((a << 8) / (b >> 4)) << 3) // DIV2 속도 테스트 1위
// #define FX_1615_LONGLONG_DIV07(a,b) (((a << 8) / (b >> 4)) << 3) // DIV2 속도 테스트 1위
// #define FX_1615_LONGLONG_DIV08(a,b) ((a << 8) / (b >> 7))
// #define FX_1615_LONGLONG_DIV08(a,b) ((a << 8) / (b >> 7))
// #define FX_1615_LONGLONG_DIV09(a,b) (((a << 4) / (b >> 4)) << 7) // DIV2 속도 테스트 3위
// #define FX_1615_LONGLONG_DIV09(a,b) (((a << 4) / (b >> 4)) << 7) // DIV2 속도 테스트 3위
// #define FX_1615_LONGLONG_DIV01(a,b) (fx_s1615)((fixed64)((a >> 15) / (b >> 15)) << 15)
// #define FX_1615_LONGLONG_DIV01(a,b) (fx_s1615)((fixed64)((a >> 15) / (b >> 15)) << 15)
// #define FX_1615_LONGLONG_DIV02(a,b) (fx_s1615)(((fixed64)(a) << 15) / (b))
// #define FX_1615_LONGLONG_DIV02(a,b) (fx_s1615)(((fixed64)(a) << 15) / (b))
#define FX_1615_LONGLONG_DIV01(a,b) (fx_s1615)((fixed64)((a >> 15) / (b >> 15)) << 15)
#define FX_1615_LONGLONG_DIV01(a,b) (fx_s1615)((fixed64)((a >> 15) / (b >> 15)) << 15)
#define FX_1615_LONGLONG_DIV02(a,b) (
fx_s1615)(((fixed64)(a)
<<
1
5) / (b
))
#define FX_1615_LONGLONG_DIV02(a,b) (
((a
<< 5) / (b
>> 6)) << 4) // DIV2 속도 테스트 4위
#define FX_1615_LONGLONG_DIV03(a,b) (
((a
<< 5) / (b
>> 6)) << 4) // DIV2 속도 테스트 4위
#define FX_1615_LONGLONG_DIV03(a,b) (
fx_s1615)(((fixed64)(a)
<<
1
5) / (b
))
//#define FX_1615_LONGLONG_DIV10(a,b) (((a << 5) / (b >> 6)) << 4) // DIV2 속도 테스트 4위
//#define FX_1615_LONGLONG_DIV10(a,b) (((a << 5) / (b >> 6)) << 4) // DIV2 속도 테스트 4위
...
...
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