1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Import PreVal4 and PreVal0 into poclbm kernel.

This commit is contained in:
Con Kolivas 2012-02-14 23:28:46 +11:00
parent f5c296785f
commit 5c4df1309a
2 changed files with 7 additions and 6 deletions

View File

@ -685,13 +685,15 @@ static cl_int queue_poclbm_kernel(_clState *clState, dev_blk_ctx *blk)
CL_SET_BLKARG(fW3); CL_SET_BLKARG(fW3);
CL_SET_BLKARG(fW15); CL_SET_BLKARG(fW15);
CL_SET_BLKARG(fW01r); CL_SET_BLKARG(fW01r);
CL_SET_BLKARG(fcty_e);
CL_SET_BLKARG(fcty_e2); CL_SET_BLKARG(fcty_e2);
CL_SET_BLKARG(D1A); CL_SET_BLKARG(D1A);
CL_SET_BLKARG(C1addK5); CL_SET_BLKARG(C1addK5);
CL_SET_BLKARG(B1addK6); CL_SET_BLKARG(B1addK6);
CL_SET_BLKARG(W16addK16); CL_SET_BLKARG(W16addK16);
CL_SET_BLKARG(W17addK17); CL_SET_BLKARG(W17addK17);
CL_SET_BLKARG(PreVal4);
CL_SET_BLKARG(PreVal0);
CL_SET_ARG(clState->outputBuffer); CL_SET_ARG(clState->outputBuffer);

View File

@ -73,9 +73,10 @@ __kernel void search(const uint state0, const uint state1, const uint state2, co
const uint f1, const uint g1, const uint h1, const uint f1, const uint g1, const uint h1,
const u base, const u base,
const uint fw0, const uint fw1, const uint fw2, const uint fw3, const uint fw15, const uint fw01r, const uint fw0, const uint fw1, const uint fw2, const uint fw3, const uint fw15, const uint fw01r,
const uint fcty_e, const uint fcty_e2, const uint fcty_e2,
const uint D1A, const uint C1addK5, const uint B1addK6, const uint D1A, const uint C1addK5, const uint B1addK6,
const uint W16addK16, const uint W17addK17, const uint W16addK16, const uint W17addK17,
const uint PreVal4, const uint Preval0,
__global uint * output) __global uint * output)
{ {
u W[24]; u W[24];
@ -89,11 +90,9 @@ __kernel void search(const uint state0, const uint state1, const uint state2, co
const u nonce = base + get_local_id(0) + get_group_id(0) * (WORKSIZE); const u nonce = base + get_local_id(0) + get_group_id(0) * (WORKSIZE);
#endif #endif
Vals[4]=fcty_e; Vals[4]=PreVal4+nonce;
Vals[4]+=nonce;
Vals[0]=Vals[4]; Vals[0]=Preval0+nonce;
Vals[0]+=state0;
Vals[3]=(rotr(Vals[0],6)^rotr(Vals[0],11)^rotr(Vals[0],25)); Vals[3]=(rotr(Vals[0],6)^rotr(Vals[0],11)^rotr(Vals[0],25));
Vals[3]+=ch(Vals[0],b1,c1); Vals[3]+=ch(Vals[0],b1,c1);