forked from nicehash/sgminer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added .cl files for kernel building - fix on algorithm_settings params and added an alias - several improvements suggested by bitbandi
- Loading branch information
Showing
17 changed files
with
785 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
// blake | ||
{ | ||
sph_u64 H0 = SPH_C64(0x6A09E667F3BCC908), H1 = SPH_C64(0xBB67AE8584CAA73B); | ||
sph_u64 H2 = SPH_C64(0x3C6EF372FE94F82B), H3 = SPH_C64(0xA54FF53A5F1D36F1); | ||
sph_u64 H4 = SPH_C64(0x510E527FADE682D1), H5 = SPH_C64(0x9B05688C2B3E6C1F); | ||
sph_u64 H6 = SPH_C64(0x1F83D9ABFB41BD6B), H7 = SPH_C64(0x5BE0CD19137E2179); | ||
sph_u64 S0 = 0, S1 = 0, S2 = 0, S3 = 0; | ||
sph_u64 T0 = SPH_C64(0xFFFFFFFFFFFFFC00) + (80 << 3), T1 = 0xFFFFFFFFFFFFFFFF;; | ||
|
||
if ((T0 = SPH_T64(T0 + 1024)) < 1024) | ||
{ | ||
T1 = SPH_T64(T1 + 1); | ||
} | ||
sph_u64 M0, M1, M2, M3, M4, M5, M6, M7; | ||
sph_u64 M8, M9, MA, MB, MC, MD, ME, MF; | ||
sph_u64 V0, V1, V2, V3, V4, V5, V6, V7; | ||
sph_u64 V8, V9, VA, VB, VC, VD, VE, VF; | ||
M0 = DEC64BE(block + 0); | ||
M1 = DEC64BE(block + 8); | ||
M2 = DEC64BE(block + 16); | ||
M3 = DEC64BE(block + 24); | ||
M4 = DEC64BE(block + 32); | ||
M5 = DEC64BE(block + 40); | ||
M6 = DEC64BE(block + 48); | ||
M7 = DEC64BE(block + 56); | ||
M8 = DEC64BE(block + 64); | ||
M9 = DEC64BE(block + 72); | ||
M9 &= 0xFFFFFFFF00000000; | ||
M9 ^= SWAP4(gid); | ||
MA = 0x8000000000000000; | ||
MB = 0; | ||
MC = 0; | ||
MD = 1; | ||
ME = 0; | ||
MF = 0x280; | ||
|
||
COMPRESS64; | ||
|
||
hash.h8[0] = H0; | ||
hash.h8[1] = H1; | ||
hash.h8[2] = H2; | ||
hash.h8[3] = H3; | ||
hash.h8[4] = H4; | ||
hash.h8[5] = H5; | ||
hash.h8[6] = H6; | ||
hash.h8[7] = H7; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
// bmw | ||
{ | ||
sph_u64 BMW_H[16]; | ||
for (unsigned u = 0; u < 16; u++) | ||
BMW_H[u] = BMW_IV512[u]; | ||
|
||
sph_u64 BMW_h1[16], BMW_h2[16]; | ||
sph_u64 mv[16]; | ||
|
||
mv[0] = SWAP8(hash.h8[0]); | ||
mv[1] = SWAP8(hash.h8[1]); | ||
mv[2] = SWAP8(hash.h8[2]); | ||
mv[3] = SWAP8(hash.h8[3]); | ||
mv[4] = SWAP8(hash.h8[4]); | ||
mv[5] = SWAP8(hash.h8[5]); | ||
mv[6] = SWAP8(hash.h8[6]); | ||
mv[7] = SWAP8(hash.h8[7]); | ||
mv[8] = 0x80; | ||
mv[9] = 0; | ||
mv[10] = 0; | ||
mv[11] = 0; | ||
mv[12] = 0; | ||
mv[13] = 0; | ||
mv[14] = 0; | ||
mv[15] = 0x200; | ||
#define M(x) (mv[x]) | ||
#define H(x) (BMW_H[x]) | ||
#define dH(x) (BMW_h2[x]) | ||
|
||
FOLDb; | ||
|
||
#undef M | ||
#undef H | ||
#undef dH | ||
|
||
#define M(x) (BMW_h2[x]) | ||
#define H(x) (final_b[x]) | ||
#define dH(x) (BMW_h1[x]) | ||
|
||
FOLDb; | ||
|
||
#undef M | ||
#undef H | ||
#undef dH | ||
|
||
hash.h8[0] = SWAP8(BMW_h1[8]); | ||
hash.h8[1] = SWAP8(BMW_h1[9]); | ||
hash.h8[2] = SWAP8(BMW_h1[10]); | ||
hash.h8[3] = SWAP8(BMW_h1[11]); | ||
hash.h8[4] = SWAP8(BMW_h1[12]); | ||
hash.h8[5] = SWAP8(BMW_h1[13]); | ||
hash.h8[6] = SWAP8(BMW_h1[14]); | ||
hash.h8[7] = SWAP8(BMW_h1[15]); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
// cubehash.h1 | ||
{ | ||
sph_u32 x0 = SPH_C32(0x2AEA2A61), x1 = SPH_C32(0x50F494D4), x2 = SPH_C32(0x2D538B8B), x3 = SPH_C32(0x4167D83E); | ||
sph_u32 x4 = SPH_C32(0x3FEE2313), x5 = SPH_C32(0xC701CF8C), x6 = SPH_C32(0xCC39968E), x7 = SPH_C32(0x50AC5695); | ||
sph_u32 x8 = SPH_C32(0x4D42C787), x9 = SPH_C32(0xA647A8B3), xa = SPH_C32(0x97CF0BEF), xb = SPH_C32(0x825B4537); | ||
sph_u32 xc = SPH_C32(0xEEF864D2), xd = SPH_C32(0xF22090C4), xe = SPH_C32(0xD0E5CD33), xf = SPH_C32(0xA23911AE); | ||
sph_u32 xg = SPH_C32(0xFCD398D9), xh = SPH_C32(0x148FE485), xi = SPH_C32(0x1B017BEF), xj = SPH_C32(0xB6444532); | ||
sph_u32 xk = SPH_C32(0x6A536159), xl = SPH_C32(0x2FF5781C), xm = SPH_C32(0x91FA7934), xn = SPH_C32(0x0DBADEA9); | ||
sph_u32 xo = SPH_C32(0xD65C8A2B), xp = SPH_C32(0xA5A70E75), xq = SPH_C32(0xB1C62456), xr = SPH_C32(0xBC796576); | ||
sph_u32 xs = SPH_C32(0x1921C8F7), xt = SPH_C32(0xE7989AF1), xu = SPH_C32(0x7795D246), xv = SPH_C32(0xD43E3B44); | ||
|
||
x0 ^= SWAP4(hash.h4[1]); | ||
x1 ^= SWAP4(hash.h4[0]); | ||
x2 ^= SWAP4(hash.h4[3]); | ||
x3 ^= SWAP4(hash.h4[2]); | ||
x4 ^= SWAP4(hash.h4[5]); | ||
x5 ^= SWAP4(hash.h4[4]); | ||
x6 ^= SWAP4(hash.h4[7]); | ||
x7 ^= SWAP4(hash.h4[6]); | ||
|
||
for (int i = 0; i < 13; i++) { | ||
SIXTEEN_ROUNDS; | ||
|
||
if (i == 0) { | ||
x0 ^= SWAP4(hash.h4[9]); | ||
x1 ^= SWAP4(hash.h4[8]); | ||
x2 ^= SWAP4(hash.h4[11]); | ||
x3 ^= SWAP4(hash.h4[10]); | ||
x4 ^= SWAP4(hash.h4[13]); | ||
x5 ^= SWAP4(hash.h4[12]); | ||
x6 ^= SWAP4(hash.h4[15]); | ||
x7 ^= SWAP4(hash.h4[14]); | ||
} | ||
else if (i == 1) { | ||
x0 ^= 0x80; | ||
} | ||
else if (i == 2) { | ||
xv ^= SPH_C32(1); | ||
} | ||
} | ||
|
||
hash.h4[0] = x0; | ||
hash.h4[1] = x1; | ||
hash.h4[2] = x2; | ||
hash.h4[3] = x3; | ||
hash.h4[4] = x4; | ||
hash.h4[5] = x5; | ||
hash.h4[6] = x6; | ||
hash.h4[7] = x7; | ||
hash.h4[8] = x8; | ||
hash.h4[9] = x9; | ||
hash.h4[10] = xa; | ||
hash.h4[11] = xb; | ||
hash.h4[12] = xc; | ||
hash.h4[13] = xd; | ||
hash.h4[14] = xe; | ||
hash.h4[15] = xf; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
// echo | ||
{ | ||
sph_u64 W00, W01, W10, W11, W20, W21, W30, W31, W40, W41, W50, W51, W60, W61, W70, W71, W80, W81, W90, W91, WA0, WA1, WB0, WB1, WC0, WC1, WD0, WD1, WE0, WE1, WF0, WF1; | ||
sph_u64 Vb00, Vb01, Vb10, Vb11, Vb20, Vb21, Vb30, Vb31, Vb40, Vb41, Vb50, Vb51, Vb60, Vb61, Vb70, Vb71; | ||
Vb00 = Vb10 = Vb20 = Vb30 = Vb40 = Vb50 = Vb60 = Vb70 = 512UL; | ||
Vb01 = Vb11 = Vb21 = Vb31 = Vb41 = Vb51 = Vb61 = Vb71 = 0; | ||
|
||
sph_u32 K0 = 512; | ||
sph_u32 K1 = 0; | ||
sph_u32 K2 = 0; | ||
sph_u32 K3 = 0; | ||
|
||
W00 = Vb00; | ||
W01 = Vb01; | ||
W10 = Vb10; | ||
W11 = Vb11; | ||
W20 = Vb20; | ||
W21 = Vb21; | ||
W30 = Vb30; | ||
W31 = Vb31; | ||
W40 = Vb40; | ||
W41 = Vb41; | ||
W50 = Vb50; | ||
W51 = Vb51; | ||
W60 = Vb60; | ||
W61 = Vb61; | ||
W70 = Vb70; | ||
W71 = Vb71; | ||
W80 = hash.h8[0]; | ||
W81 = hash.h8[1]; | ||
W90 = hash.h8[2]; | ||
W91 = hash.h8[3]; | ||
WA0 = hash.h8[4]; | ||
WA1 = hash.h8[5]; | ||
WB0 = hash.h8[6]; | ||
WB1 = hash.h8[7]; | ||
WC0 = 0x80; | ||
WC1 = 0; | ||
WD0 = 0; | ||
WD1 = 0; | ||
WE0 = 0; | ||
WE1 = 0x200000000000000; | ||
WF0 = 0x200; | ||
WF1 = 0; | ||
|
||
for (unsigned u = 0; u < 10; u++) { | ||
BIG_ROUND; | ||
} | ||
|
||
Vb00 ^= hash.h8[0] ^ W00 ^ W80; | ||
Vb01 ^= hash.h8[1] ^ W01 ^ W81; | ||
Vb10 ^= hash.h8[2] ^ W10 ^ W90; | ||
Vb11 ^= hash.h8[3] ^ W11 ^ W91; | ||
Vb20 ^= hash.h8[4] ^ W20 ^ WA0; | ||
Vb21 ^= hash.h8[5] ^ W21 ^ WA1; | ||
Vb30 ^= hash.h8[6] ^ W30 ^ WB0; | ||
Vb31 ^= hash.h8[7] ^ W31 ^ WB1; | ||
|
||
hash.h8[0] = Vb00; | ||
hash.h8[1] = Vb01; | ||
hash.h8[2] = Vb10; | ||
hash.h8[3] = Vb11; | ||
hash.h8[4] = Vb20; | ||
hash.h8[5] = Vb21; | ||
hash.h8[6] = Vb30; | ||
hash.h8[7] = Vb31; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
bool result = (hash.h8[3] <= target); | ||
if (result) | ||
output[output[0xFF]++] = SWAP4(gid); | ||
} | ||
|
||
#endif // X11EVO_CL |
Oops, something went wrong.