Skip to content

Commit

Permalink
Merge pull request fireice-uk#1951 from psychocrypt/fix-fixAmdDriver1…
Browse files Browse the repository at this point in the history
…4XXCompile

fix AMD driver 14
  • Loading branch information
fireice-uk authored Oct 17, 2018
2 parents 21ac8ba + 2e918e7 commit 6601885
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xmrstak/backend/amd/amd_gpu/opencl/fast_int_math_v2.cl
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ inline uint2 fast_div_v2(const __local uint *RCP, ulong a, uint b)
* https://github.com/fireice-uk/xmr-stak/issues/1922
* This is a workaround for the broken compiler.
*/
const long xx = k - a;
((uint*)&q)[1] = (xx < 0) ? 1U : 0U;
ulong whyAMDwhy;
((uint*)&whyAMDwhy)[0] = as_uint2(k).s0;
((uint*)&whyAMDwhy)[1] = as_uint2(k).s1;
((uint*)&q)[1] = (whyAMDwhy < a) ? 1U : 0U;
#else
((uint*)&q)[1] = (k < a) ? 1U : 0U;
#endif
Expand Down

0 comments on commit 6601885

Please sign in to comment.