Author

Topic: cgminer scryptXXXXXX.cl - OpenCL scrypt algorithm sources (Read 993 times)

newbie
Activity: 2
Merit: 0
Hello!

I use cgminer in --scrypt mode for my GPU.

And i want to write some support script, but i need to understand, what parameters are passed to mining core function search:

__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void search(__global const uint4 * restrict input,
volatile __global uint*restrict output, __global uint4*restrict padcache,
const uint4 midstate0, const uint4 midstate16, const uint target)
{
   uint gid = get_global_id(0);
   uint4 X[8];
   uint4 tstate0, tstate1, ostate0, ostate1, tmp0, tmp1;
   uint4 data = (uint4)(input[4].x,input[4].y,input[4].z,gid);
  uint4 pad0 = midstate0, pad1 = midstate16;



Here  https://litecoin.info/Scrypt i've found specification of standard getwork

~/litecoind getwork
{
    "midstate" : "40fd268321efcf60e625707d4e31f9deadd13157e228985de8a10a057b98ed4d",
    "data" : "0000000105e9a54b7f65b46864bc90f55d67cccd8b6404a02f5e064a6df69282adf6e2e5f7f953b 0632b25b099858b717bb7b24084148cfa841a89f106bc6b655b18d2ed4ebb191a1d018ea7000000 0000000080000000000000000000000000000000000000000000000000000000000000000000000 0000000000080020000",
    "hash1" : "0000000000000000000000000000000000000000000000000000000000000000000000800000000 0000000000000000000000000000000000000000000010000",
    "target" : "0000000000000000000000000000000000000000000000000000a78e01000000"
}

But in the source code i see "uint4 data = (uint4)(input[4].x,input[4].y,input[4].z,gid)", and i wonder what is input[] and gid - what is the current nonce to be checked in thread given?

Thank you in advance.
Jump to: