Post
Topic
Board Mining (Altcoins)
Re: [ANN] sgminer v5 - optimized X11/X13/NeoScrypt/Lyra2RE/etc. kernel-switch miner
by
djm34
on 26/01/2015, 15:38:00 UTC
(number & (power_of_two - 1)) of course.
A bit more detail for non programmer?
Are you saying you want to program crypto algorythms in opencl without understanding "(number & (power_of_two - 1))"?
I kinda feel the same way, but I'll be a little gentler. BitmoreCoin, you may want to look up bitwise operators and things like that - an AND operation is far, far faster than modulus (modulus and division are ouch slow, as a general rule).

I think he means how to adjust the statements inside the case 0 and case 1.
hu ?
he means   N % 2^n <=> N & (2^n-1)  but gets computed faster in some bad compilation case...
similarly      N / 2^n <=> N >> (n)
     and      N * 2^n <=> N << (n)