Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
azure-cloud-mining-script
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
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
Recolic
azure-cloud-mining-script
Commits
9813e1c0
There was an error fetching the commit references. Please try again later.
Commit
9813e1c0
authored
6 years ago
by
SChernykh
Committed by
psychocrypt
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
OpenCL: optimize cn-heavy div
optimize cryptonight_heavy diff
parent
6a95f0bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xmrstak/backend/amd/amd_gpu/opencl/fast_div_heavy.cl
+4
-8
4 additions, 8 deletions
xmrstak/backend/amd/amd_gpu/opencl/fast_div_heavy.cl
with
4 additions
and
8 deletions
xmrstak/backend/amd/amd_gpu/opencl/fast_div_heavy.cl
+
4
−
8
View file @
9813e1c0
...
...
@@ -6,23 +6,19 @@ inline long fast_div_heavy(long _a, int _b)
{
long a = abs(_a);
int b = abs(_b);
float rcp = native_recip(convert_float_rte(b));
float rcp2 = as_float(as_uint(rcp) + (32U << 23));
ulong q1 = convert_ulong_rte(convert_float_rte(as_int2(a).s1) * rcp2);
ulong q1 = convert_ulong(convert_float_rte(as_int2(a).s1) * rcp2);
a -= q1 * as_uint(b);
long q2 = convert_long_rte(convert_float_rtn(a) * rcp);
float q2f = convert_float_rte(as_int2(a >> 12).s0) * rcp;
q2f = as_float(as_uint(q2f) + (12U << 23));
long q2 = convert_long_rte(q2f);
int a2 = as_int2(a).s0 - as_int2(q2).s0 * b;
int q3 = convert_int_rte(convert_float_rte(a2) * rcp);
q3 += (a2 - q3 * b) >> 31;
const long q = q1 + q2 + q3;
return ((as_int2(_a).s1 ^ _b) < 0) ? -q : q;
}
#endif
)==="
\ No newline at end of file
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