Skip to content

Commit

Permalink
Merge pull request #374 from badman74/develop
Browse files Browse the repository at this point in the history
more algo optimization
  • Loading branch information
ystarnaud committed Aug 3, 2014
2 parents 7584c8d + 1f51943 commit e334f11
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 33 deletions.
6 changes: 3 additions & 3 deletions algorithm.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ static algorithm_settings_t algos[] = {

// kernels starting from this will have difficulty calculated by using quarkcoin algorithm
#define A_QUARK(a, b) \
{ a, ALGO_QUARK, 256, 256, 256, 0, 0, 0xFF, 0xFFFFFFULL, 0x0000ffffUL, 0, 0, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, b, queue_sph_kernel, gen_hash, NULL}
{ a, ALGO_QUARK, 256, 256, 256, 0, 0, 0xFF, 0xFFFFFFULL, 0x0000ffffUL, 0, 0, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, b, queue_sph_kernel, gen_hash, append_x11_compiler_options}
A_QUARK( "quarkcoin", quarkcoin_regenhash),
A_QUARK( "qubitcoin", qubitcoin_regenhash),
A_QUARK( "animecoin", animecoin_regenhash),
Expand All @@ -607,7 +607,7 @@ static algorithm_settings_t algos[] = {

// kernels starting from this will have difficulty calculated by using bitcoin algorithm
#define A_DARK(a, b) \
{ a, ALGO_X11, 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 0, 0, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, b, queue_sph_kernel, gen_hash, NULL}
{ a, ALGO_X11, 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 0, 0, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, b, queue_sph_kernel, gen_hash, append_x11_compiler_options}
A_DARK( "darkcoin", darkcoin_regenhash),
A_DARK( "inkcoin", inkcoin_regenhash),
A_DARK( "myriadcoin-groestl", myriadcoin_groestl_regenhash),
Expand All @@ -628,7 +628,7 @@ static algorithm_settings_t algos[] = {
{ "bitblock", ALGO_X15, 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 14, 4 * 16 * 4194304, 0, bitblock_regenhash, queue_bitblock_kernel, gen_hash, append_x13_compiler_options},
{ "bitblockold", ALGO_X15, 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 10, 4 * 16 * 4194304, 0, bitblock_regenhash, queue_bitblockold_kernel, gen_hash, append_x13_compiler_options},

{ "talkcoin-mod", ALGO_NIST, 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 4, 8 * 16 * 4194304, 0, talkcoin_regenhash, queue_talkcoin_mod_kernel, gen_hash, NULL},
{ "talkcoin-mod", ALGO_NIST, 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 4, 8 * 16 * 4194304, 0, talkcoin_regenhash, queue_talkcoin_mod_kernel, gen_hash, append_x11_compiler_options},

{ "fresh", ALGO_FRESH, 1, 256, 256, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 4, 4 * 16 * 4194304, 0, fresh_regenhash, queue_fresh_kernel, gen_hash, NULL},

Expand Down
14 changes: 10 additions & 4 deletions kernel/animecoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ typedef long sph_s64;
#define SPH_JH_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_KECCAK_NOCOPY 0
#define SPH_COMPACT_BLAKE_64 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_GROESTL_BIG_ENDIAN 0

#define SPH_CUBEHASH_UNROLL 0
#define SPH_KECCAK_UNROLL 0

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif

#include "blake.cl"
#include "bmw.cl"
Expand Down
14 changes: 10 additions & 4 deletions kernel/darkcoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ typedef long sph_s64;
#define SPH_JH_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_KECCAK_NOCOPY 0
#define SPH_COMPACT_BLAKE_64 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_GROESTL_BIG_ENDIAN 0

#define SPH_CUBEHASH_UNROLL 0
#define SPH_KECCAK_UNROLL 0

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif

#include "blake.cl"
#include "bmw.cl"
Expand Down
5 changes: 4 additions & 1 deletion kernel/groestlcoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ typedef long sph_s64;

#define SPH_ECHO_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_CUBEHASH_UNROLL 0

#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif

#include "groestl.cl"

#define SWAP4(x) as_uint(as_uchar4(x).wzyx)
Expand Down
14 changes: 10 additions & 4 deletions kernel/inkcoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ typedef long sph_s64;
#define SPH_JH_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_KECCAK_NOCOPY 0
#define SPH_COMPACT_BLAKE_64 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_GROESTL_BIG_ENDIAN 0

#define SPH_CUBEHASH_UNROLL 0
#define SPH_KECCAK_UNROLL 0

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif

#include "shavite.cl"

Expand Down
17 changes: 12 additions & 5 deletions kernel/marucoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,21 @@ typedef long sph_s64;
#define SPH_JH_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_KECCAK_NOCOPY 0
#define SPH_COMPACT_BLAKE_64 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_GROESTL_BIG_ENDIAN 0
#define SPH_CUBEHASH_UNROLL 0
#define SPH_KECCAK_UNROLL 0
#if !defined SPH_HAMSI_EXPAND_BIG
#define SPH_HAMSI_EXPAND_BIG 4

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif
#ifndef SPH_HAMSI_EXPAND_BIG
#define SPH_HAMSI_EXPAND_BIG 4
#endif

#include "blake.cl"
Expand Down
5 changes: 4 additions & 1 deletion kernel/myriadcoin-groestl.cl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ typedef long sph_s64;

#define SPH_ECHO_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_CUBEHASH_UNROLL 0

#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif

#include "groestl.cl"

#define SWAP4(x) as_uint(as_uchar4(x).wzyx)
Expand Down
14 changes: 10 additions & 4 deletions kernel/quarkcoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ typedef long sph_s64;
#define SPH_JH_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_KECCAK_NOCOPY 0
#define SPH_COMPACT_BLAKE_64 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_GROESTL_BIG_ENDIAN 0

#define SPH_CUBEHASH_UNROLL 0
#define SPH_KECCAK_UNROLL 0

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif

#include "blake.cl"
#include "bmw.cl"
Expand Down
5 changes: 4 additions & 1 deletion kernel/qubitcoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ typedef long sph_s64;

#define SPH_ECHO_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_CUBEHASH_UNROLL 0

#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif

#include "luffa.cl"
#include "cubehash.cl"
#include "shavite.cl"
Expand Down
14 changes: 10 additions & 4 deletions kernel/sifcoin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ typedef long sph_s64;
#define SPH_JH_64 1
#define SPH_SIMD_NOCOPY 0
#define SPH_KECCAK_NOCOPY 0
#define SPH_COMPACT_BLAKE_64 0
#define SPH_LUFFA_PARALLEL 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_GROESTL_BIG_ENDIAN 0

#define SPH_CUBEHASH_UNROLL 0
#define SPH_KECCAK_UNROLL 0

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_LUFFA_PARALLEL
#define SPH_LUFFA_PARALLEL 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif

#include "blake.cl"
#include "bmw.cl"
Expand Down
9 changes: 7 additions & 2 deletions kernel/talkcoin-mod.cl
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,18 @@ typedef int sph_s32;
#define SPH_ROTL64(x, n) rotate(as_ulong(x), (n) & 0xFFFFFFFFFFFFFFFFUL)
#define SPH_ROTR64(x, n) SPH_ROTL64(x, (64 - (n)))

#define SPH_COMPACT_BLAKE_64 0
#define SPH_GROESTL_BIG_ENDIAN 0
#define SPH_SMALL_FOOTPRINT_GROESTL 0
#define SPH_JH_64 1
#define SPH_KECCAK_64 1
#define SPH_KECCAK_NOCOPY 0
#define SPH_KECCAK_UNROLL 0

#ifndef SPH_COMPACT_BLAKE_64
#define SPH_COMPACT_BLAKE_64 0
#endif
#ifndef SPH_KECCAK_UNROLL
#define SPH_KECCAK_UNROLL 0
#endif

#include "blake.cl"
#include "groestl.cl"
Expand Down

0 comments on commit e334f11

Please sign in to comment.