Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.10 KB | None | 0 0
  1. __kernel void search(   const uint block0, const uint block1, const uint block2,
  2.                                                 const uint state0, const uint state1, const uint state2, const uint state3,
  3.                                                 const uint state4, const uint state5, const uint state6, const uint state7,
  4.                                                 const uint B1, const uint C1, const uint D1,
  5.                                                 const uint F1, const uint G1, const uint H1,
  6.                                                 const uint target,
  7.                                                 const uint base,
  8.                                                 __global uint * output)
  9. {
  10.         u nonce;
  11. #ifdef VECTORS
  12.         nonce.x = base + get_global_id(0);
  13.         nonce.y = nonce.x + 0x80000000;
  14. #else
  15.         nonce = base + get_global_id(0);
  16. #endif
  17.  
  18.         u work[64];
  19.     u A,B,C,D,E,F,G,H;
  20.         u t1;
  21.  
  22.         A=state0;
  23.         B=B1;
  24.         C=C1;
  25.         D=D1;
  26.         E=state4;
  27.         F=F1;
  28.         G=G1;
  29.         H=H1;
  30.  
  31.         work[0]=block0;
  32.         work[1]=block1;
  33.         work[2]=block2;
  34.         work[3]=nonce;
  35.         work[4]=0x80000000;
  36.         work[5]=0x00000000;
  37.         work[6]=0x00000000;
  38.         work[7]=0x00000000;
  39.         work[8]=0x00000000;
  40.         work[9]=0x00000000;
  41.         work[10]=0x00000000;
  42.         work[11]=0x00000000;
  43.         work[12]=0x00000000;
  44.         work[13]=0x00000000;
  45.         work[14]=0x00000000;
  46.         work[15]=0x00000280;
  47.  
  48.         // first 3 rounds already done
  49.         //sharound(A,B,C,D,E,F,G,H,work[0],0x428A2F98);
  50.         //sharound(H,A,B,C,D,E,F,G,work[1],0x71374491);
  51.         //sharound(G,H,A,B,C,D,E,F,work[2],0xB5C0FBCF);
  52.         sharound(F,G,H,A,B,C,D,E,work[3],0xE9B5DBA5);
  53.         sharound(E,F,G,H,A,B,C,D,work[4],0x3956C25B);
  54.         sharound(D,E,F,G,H,A,B,C,work[5],0x59F111F1);
  55.         sharound(C,D,E,F,G,H,A,B,work[6],0x923F82A4);
  56.         sharound(B,C,D,E,F,G,H,A,work[7],0xAB1C5ED5);
  57.         sharound(A,B,C,D,E,F,G,H,work[8],0xD807AA98);
  58.         sharound(H,A,B,C,D,E,F,G,work[9],0x12835B01);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement