This commit is contained in:
Jay D Dee
2017-03-15 13:21:18 -04:00
parent 200b06f369
commit 2dcc4821b6
42 changed files with 73 additions and 705 deletions

View File

@@ -82,7 +82,6 @@ bool register_axiom_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_axiom;
gate->hash = (void*)&axiomhash;
gate->hash_alt = (void*)&axiomhash;
gate->get_max64 = (void*)&get_max64_0x40LL;
return true;
}

View File

@@ -100,7 +100,6 @@ bool register_blake_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_blake;
gate->hash = (void*)&blakehash;
gate->hash_alt = (void*)&blakehash;
gate->get_max64 = (void*)&blake_get_max64;
return true;
}

View File

@@ -109,7 +109,6 @@ bool register_vanilla_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_blakecoin;
gate->hash = (void*)&blakecoinhash;
gate->hash_alt = (void*)&blakecoinhash;
gate->get_max64 = (void*)&blakecoin_get_max64;
blakecoin_init( &blake_init_ctx );
return true;

View File

@@ -270,7 +270,6 @@ bool register_decred_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT;
gate->scanhash = (void*)&scanhash_decred;
gate->hash = (void*)&decred_hash;
gate->hash_alt = (void*)&decred_hash;
gate->get_nonceptr = (void*)&decred_get_nonceptr;
gate->get_max64 = (void*)&get_max64_0x3fffffLL;
gate->display_extra_data = (void*)&decred_decode_extradata;

View File

@@ -245,8 +245,6 @@ bool register_drop_algo( algo_gate_t* gate )
algo_not_tested();
gate->scanhash = (void*)&scanhash_drop;
gate->hash = (void*)&droplp_hash_pok;
gate->hash_alt = (void*)&droplp_hash_pok;
gate->hash_suw = (void*)&droplp_hash_pok;
gate->get_new_work = (void*)&drop_get_new_work;
gate->set_target = (void*)&scrypt_set_target;
gate->build_stratum_request = (void*)&std_be_build_stratum_request;

View File

@@ -131,7 +131,6 @@ bool register_fresh_algo( algo_gate_t* gate )
algo_not_tested();
gate->scanhash = (void*)&scanhash_fresh;
gate->hash = (void*)&freshhash;
gate->hash_alt = (void*)&freshhash;
gate->set_target = (void*)&fresh_set_target;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;

View File

@@ -104,7 +104,6 @@ bool register_groestl_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | AES_OPT;
gate->scanhash = (void*)&scanhash_groestl;
gate->hash = (void*)&groestlhash;
gate->hash_alt = (void*)&groestlhash;
gate->set_target = (void*)&groestl_set_target;
gate->gen_merkle_root = (void*)&SHA256_gen_merkle_root;
gate->get_max64 = (void*)&get_max64_0x3ffff;

View File

@@ -96,7 +96,6 @@ bool register_myriad_algo( algo_gate_t* gate )
init_myrgr_ctx();
gate->scanhash = (void*)&scanhash_myriad;
gate->hash = (void*)&myriadhash;
gate->hash_alt = (void*)&myriadhash;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;
};

View File

@@ -171,7 +171,6 @@ bool register_bastion_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | AES_OPT;
gate->scanhash = (void*)&scanhash_bastion;
gate->hash = (void*)&bastionhash;
gate->hash_alt = (void*)&bastionhash;
return true;
};

View File

@@ -420,7 +420,6 @@ bool register_hmq1725_algo( algo_gate_t* gate )
gate->set_target = (void*)&scrypt_set_target;
gate->scanhash = (void*)&scanhash_hmq1725;
gate->hash = (void*)&hmq1725hash;
gate->hash_alt = (void*)&hmq1725hash;
return true;
};

View File

@@ -213,7 +213,6 @@ bool register_lbry_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_lbry;
gate->hash = (void*)&lbry_hash;
gate->hash_alt = (void*)&lbry_hash;
gate->calc_network_diff = (void*)&lbry_calc_network_diff;
gate->get_max64 = (void*)&lbry_get_max64;
gate->build_stratum_request = (void*)&lbry_le_build_stratum_request;

View File

@@ -159,7 +159,6 @@ bool register_lyra2re_algo( algo_gate_t* gate )
// gate->miner_thread_init = (void*)&lyra2re_thread_init;
gate->scanhash = (void*)&scanhash_lyra2re;
gate->hash = (void*)&lyra2re_hash;
gate->hash_alt = (void*)&lyra2re_hash;
gate->get_max64 = (void*)&lyra2re_get_max64;
gate->set_target = (void*)&lyra2re_set_target;
return true;

View File

@@ -153,7 +153,6 @@ bool register_lyra2rev2_algo( algo_gate_t* gate )
gate->miner_thread_init = (void*)&lyra2rev2_thread_init;
gate->scanhash = (void*)&scanhash_lyra2rev2;
gate->hash = (void*)&lyra2rev2_hash;
gate->hash_alt = (void*)&lyra2rev2_hash;
gate->set_target = (void*)&lyra2rev2_set_target;
return true;
};

View File

@@ -4,19 +4,20 @@
#include "lyra2.h"
#include "avxdefs.h"
__thread uint64_t* zoin_wholeMatrix;
__thread uint64_t* lyra2z330_wholeMatrix;
void zoin_hash(void *state, const void *input, uint32_t height)
void lyra2z330_hash(void *state, const void *input, uint32_t height)
{
uint32_t _ALIGN(256) hash[16];
LYRA2Z( zoin_wholeMatrix, hash, 32, input, 80, input, 80, 2, 330, 256);
LYRA2Z( lyra2z330_wholeMatrix, hash, 32, input, 80, input, 80,
2, 330, 256 );
memcpy(state, hash, 32);
}
int scanhash_zoin( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done )
int scanhash_lyra2z330( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done )
{
uint32_t hash[8] __attribute__ ((aligned (64)));
uint32_t endiandata[20] __attribute__ ((aligned (64)));
@@ -34,7 +35,7 @@ int scanhash_zoin( int thr_id, struct work *work, uint32_t max_nonce,
do {
be32enc(&endiandata[19], nonce);
zoin_hash( hash, endiandata, work->height );
lyra2z330_hash( hash, endiandata, work->height );
if (hash[7] <= Htarg && fulltest(hash, ptarget)) {
work_set_target_ratio(work, hash);
@@ -51,28 +52,28 @@ int scanhash_zoin( int thr_id, struct work *work, uint32_t max_nonce,
return 0;
}
void zoin_set_target( struct work* work, double job_diff )
void lyra2z330_set_target( struct work* work, double job_diff )
{
work_set_target( work, job_diff / (256.0 * opt_diff_factor) );
}
bool zoin_thread_init()
bool lyra2z330_thread_init()
{
const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * 256; // nCols
const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8;
int i = (int64_t)ROW_LEN_BYTES * 330; // nRows;
zoin_wholeMatrix = _mm_malloc( i, 64 );
lyra2z330_wholeMatrix = _mm_malloc( i, 64 );
if ( zoin_wholeMatrix == NULL )
if ( lyra2z330_wholeMatrix == NULL )
return false;
#if defined (__AVX2__)
memset_zero_m256i( (__m256i*)zoin_wholeMatrix, i/32 );
memset_zero_m256i( (__m256i*)lyra2z330_wholeMatrix, i/32 );
#elif defined(__AVX__)
memset_zero_m128i( (__m128i*)zoin_wholeMatrix, i/16 );
memset_zero_m128i( (__m128i*)lyra2z330_wholeMatrix, i/16 );
#else
memset( zoin_wholeMatrix, 0, i );
memset( lyra2z330_wholeMatrix, 0, i );
#endif
return true;
}
@@ -80,12 +81,11 @@ bool zoin_thread_init()
bool register_lyra2z330_algo( algo_gate_t* gate )
{
gate->optimizations = SSE2_OPT | AES_OPT | AVX_OPT | AVX2_OPT;
gate->miner_thread_init = (void*)&zoin_thread_init;
gate->scanhash = (void*)&scanhash_zoin;
gate->hash = (void*)&zoin_hash;
gate->hash_alt = (void*)&zoin_hash;
gate->miner_thread_init = (void*)&lyra2z330_thread_init;
gate->scanhash = (void*)&scanhash_lyra2z330;
gate->hash = (void*)&lyra2z330_hash;
gate->get_max64 = (void*)&get_max64_0xffffLL;
gate->set_target = (void*)&zoin_set_target;
gate->set_target = (void*)&lyra2z330_set_target;
return true;
};

View File

@@ -115,7 +115,6 @@ bool register_zcoin_algo( algo_gate_t* gate )
gate->miner_thread_init = (void*)&zcoin_thread_init;
gate->scanhash = (void*)&scanhash_zcoin;
gate->hash = (void*)&zcoin_hash;
gate->hash_alt = (void*)&zcoin_hash;
gate->get_max64 = (void*)&get_max64_0xffffLL;
gate->set_target = (void*)&zcoin_set_target;
// gate->prevent_dupes = (void*)&zcoin_get_work_height;

View File

@@ -1085,7 +1085,6 @@ bool register_neoscrypt_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_neoscrypt;
gate->hash = (void*)&neoscrypt;
gate->hash_alt = (void*)&neoscrypt;
gate->get_max64 = (void*)&get_neoscrypt_max64;
gate->set_target = (void*)&scrypt_set_target;
gate->wait_for_diff = (void*)&neoscrypt_wait_for_diff;

View File

@@ -155,7 +155,6 @@ bool register_nist5_algo( algo_gate_t* gate )
init_nist5_ctx();
gate->scanhash = (void*)&scanhash_nist5;
gate->hash = (void*)&nist5hash;
gate->hash_alt = (void*)&nist5hash;
return true;
};

View File

@@ -173,83 +173,6 @@ inline static void quarkhash(void *state, const void *input)
memcpy(state, hash, 32);
}
void quarkhash_alt(void *state, const void *input)
{
sph_blake512_context ctx_blake1,
ctx_blake2;
sph_bmw512_context ctx_bmw1,
ctx_bmw2;
sph_groestl512_context ctx_groestl1,
ctx_groestl2;
sph_skein512_context ctx_skein1,
ctx_skein2;
sph_jh512_context ctx_jh1,
ctx_jh2;
sph_keccak512_context ctx_keccak1,
ctx_keccak2;
sph_blake512_init(&ctx_blake1);
sph_bmw512_init(&ctx_bmw1);
sph_groestl512_init(&ctx_groestl1);
sph_skein512_init(&ctx_skein1);
sph_groestl512_init(&ctx_groestl2);
sph_jh512_init(&ctx_jh1);
sph_blake512_init(&ctx_blake2);
sph_bmw512_init(&ctx_bmw2);
sph_keccak512_init(&ctx_keccak1);
sph_skein512_init(&ctx_skein2);
sph_keccak512_init(&ctx_keccak2);
sph_jh512_init(&ctx_jh2);
uint32_t _ALIGN(128) hash[16];
uint32_t mask = 8;
sph_blake512 (&ctx_blake1, input, 80);
sph_blake512_close (&ctx_blake1, hash); //0
sph_bmw512 (&ctx_bmw1, hash, 64);
sph_bmw512_close(&ctx_bmw1, hash); //1
if (hash[0] & mask) {
sph_groestl512 (&ctx_groestl1, hash, 64);
sph_groestl512_close(&ctx_groestl1, hash); //2
} else {
sph_skein512 (&ctx_skein1, hash, 64);
sph_skein512_close(&ctx_skein1, hash); //2
}
sph_groestl512 (&ctx_groestl2, hash, 64);
sph_groestl512_close(&ctx_groestl2, hash); //3
sph_jh512 (&ctx_jh1, hash, 64);
sph_jh512_close(&ctx_jh1, hash); //4
if (hash[0] & mask) {
sph_blake512 (&ctx_blake2, hash, 64);
sph_blake512_close(&ctx_blake2, hash); //5
} else {
sph_bmw512 (&ctx_bmw2, hash, 64);
sph_bmw512_close(&ctx_bmw2, hash); //5
}
sph_keccak512 (&ctx_keccak1, hash, 64);
sph_keccak512_close(&ctx_keccak1, hash); //6
sph_skein512 (&ctx_skein2, hash, 64);
sph_skein512_close(&ctx_skein2, hash); //7
if (hash[0] & mask) {
sph_keccak512 (&ctx_keccak2, hash, 64);
sph_keccak512_close(&ctx_keccak2, hash); //8
} else {
sph_jh512 (&ctx_jh2, hash, 64);
sph_jh512_close(&ctx_jh2, hash); //8
}
memcpy(state, hash, 32);
}
int scanhash_quark( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done)
{
@@ -287,7 +210,6 @@ bool register_quark_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | AES_OPT;
gate->scanhash = (void*)&scanhash_quark;
gate->hash = (void*)&quarkhash;
gate->hash_alt = (void*)&quarkhash_alt;
return true;
};

View File

@@ -156,7 +156,6 @@ bool register_deep_algo( algo_gate_t* gate )
init_deep_ctx();
gate->scanhash = (void*)&scanhash_deep;
gate->hash = (void*)&deep_hash;
// gate->hash_alt = (void*)&qubithash_alt;
return true;
};

View File

@@ -91,39 +91,6 @@ void qubithash(void *output, const void *input)
memcpy(output, hash, 32);
}
void qubithash_alt(void *output, const void *input)
{
sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
uint8_t hash[64];
sph_luffa512_init(&ctx_luffa);
sph_luffa512 (&ctx_luffa, input, 80);
sph_luffa512_close(&ctx_luffa, (void*) hash);
sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512 (&ctx_cubehash, (const void*) hash, 64);
sph_cubehash512_close(&ctx_cubehash, (void*) hash);
sph_shavite512_init(&ctx_shavite);
sph_shavite512 (&ctx_shavite, (const void*) hash, 64);
sph_shavite512_close(&ctx_shavite, (void*) hash);
sph_simd512_init(&ctx_simd);
sph_simd512 (&ctx_simd, (const void*) hash, 64);
sph_simd512_close(&ctx_simd, (void*) hash);
sph_echo512_init(&ctx_echo);
sph_echo512 (&ctx_echo, (const void*) hash, 64);
sph_echo512_close(&ctx_echo, (void*) hash);
memcpy(output, hash, 32);
}
int scanhash_qubit(int thr_id, struct work *work,
uint32_t max_nonce, uint64_t *hashes_done)
{
@@ -197,7 +164,6 @@ bool register_qubit_algo( algo_gate_t* gate )
init_qubit_ctx();
gate->scanhash = (void*)&scanhash_qubit;
gate->hash = (void*)&qubithash;
gate->hash_alt = (void*)&qubithash_alt;
return true;
};

View File

@@ -110,7 +110,6 @@ bool register_s3_algo( algo_gate_t* gate )
algo_not_tested();
gate->scanhash = (void*)&scanhash_s3;
gate->hash = (void*)&s3hash;
gate->hash_alt = (void*)&s3hash;
// gate->get_max64 = &s3_get_max64;
return true;
};

View File

@@ -781,7 +781,6 @@ bool register_scrypt_algo( algo_gate_t* gate )
gate->miner_thread_init =(void*)&scrypt_miner_thread_init;
gate->scanhash = (void*)&scanhash_scrypt;
gate->hash = (void*)&scrypt_1024_1_1_256_24way;
gate->hash_alt = (void*)&scrypt_1024_1_1_256_24way;
gate->set_target = (void*)&scrypt_set_target;
gate->get_max64 = (void*)&scrypt_get_max64;

View File

@@ -241,7 +241,6 @@ bool register_scryptjane_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_scryptjane;
gate->hash = (void*)&scryptjanehash;
gate->hash_alt = (void*)&scryptjanehash;
gate->set_target = (void*)&scrypt_set_target;
gate->get_max64 = (void*)&get_max64_0x40LL;

View File

@@ -640,7 +640,6 @@ int scanhash_sha256d(int thr_id, struct work *work,
bool register_sha256d_algo( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_sha256d;
gate->hash_alt = (void*)&sha256d;
gate->hash = (void*)&sha256d;
return true;
};

View File

@@ -136,7 +136,6 @@ bool register_sha256t_algo( algo_gate_t* gate )
sph_sha256_init( &sha256t_ctx );
gate->scanhash = (void*)&scanhash_sha256t;
gate->hash = (void*)&sha256t_hash;
gate->hash_alt = (void*)&sha256t_hash;
gate->set_target = (void*)&sha256t_set_target;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;

View File

@@ -109,7 +109,6 @@ bool register_veltor_algo( algo_gate_t* gate )
init_veltor_ctx();
gate->scanhash = (void*)&scanhash_veltor;
gate->hash = (void*)&veltorhash;
gate->hash_alt = (void*)&veltorhash;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;
}

View File

@@ -138,69 +138,6 @@ void c11hash( void *output, const void *input )
memcpy(output, hash+64, 32);
}
void c11hash_alt( void *output, const void *input )
{
unsigned char hash[128];
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_skein512_context ctx_skein;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_luffa512_context ctx_luffa1;
sph_cubehash512_context ctx_cubehash1;
sph_shavite512_context ctx_shavite1;
sph_simd512_context ctx_simd1;
sph_echo512_context ctx_echo;
sph_blake512_init(&ctx_blake);
sph_blake512 (&ctx_blake, input, 80);
sph_blake512_close (&ctx_blake, hash);
sph_bmw512_init(&ctx_bmw);
sph_bmw512 (&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hash);
sph_groestl512_init(&ctx_groestl);
sph_groestl512 (&ctx_groestl, hash, 64);
sph_groestl512_close(&ctx_groestl, hash);
sph_jh512_init(&ctx_jh);
sph_jh512 (&ctx_jh, hash, 64);
sph_jh512_close(&ctx_jh, hash);
sph_keccak512_init(&ctx_keccak);
sph_keccak512 (&ctx_keccak, hash, 64);
sph_keccak512_close(&ctx_keccak, hash);
sph_skein512_init(&ctx_skein);
sph_skein512 (&ctx_skein, hash, 64);
sph_skein512_close (&ctx_skein, hash);
sph_luffa512_init (&ctx_luffa1);
sph_luffa512 (&ctx_luffa1, hash, 64);
sph_luffa512_close (&ctx_luffa1, hash);
sph_cubehash512_init (&ctx_cubehash1);
sph_cubehash512 (&ctx_cubehash1, hash, 64);
sph_cubehash512_close(&ctx_cubehash1, hash);
sph_shavite512_init (&ctx_shavite1);
sph_shavite512 (&ctx_shavite1, hash, 64);
sph_shavite512_close(&ctx_shavite1, hash);
sph_simd512_init (&ctx_simd1);
sph_simd512 (&ctx_simd1, hash, 64);
sph_simd512_close(&ctx_simd1, hash);
sph_echo512_init (&ctx_echo);
sph_echo512 (&ctx_echo, hash, 64);
sph_echo512_close(&ctx_echo, hash);
memcpy(output, hash+64, 32);
}
int scanhash_c11( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done )
{
@@ -241,7 +178,6 @@ bool register_c11_algo( algo_gate_t* gate )
init_c11_ctx();
gate->scanhash = (void*)&scanhash_c11;
gate->hash = (void*)&c11hash;
gate->hash_alt = (void*)&c11hash_alt;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;
};

View File

@@ -136,71 +136,6 @@ static void x11_hash( void *state, const void *input )
memcpy( state, hash+64, 32 );
}
static void x11hash_alt( void *output, const void *input )
{
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_skein512_context ctx_skein;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_luffa512_context ctx_luffa1;
sph_cubehash512_context ctx_cubehash1;
sph_shavite512_context ctx_shavite1;
sph_simd512_context ctx_simd1;
sph_echo512_context ctx_echo1;
uint32_t _ALIGN(64) hashA[16], hashB[16];
sph_blake512_init(&ctx_blake);
sph_blake512 (&ctx_blake, input, 80);
sph_blake512_close (&ctx_blake, hashA);
sph_bmw512_init(&ctx_bmw);
sph_bmw512 (&ctx_bmw, hashA, 64);
sph_bmw512_close(&ctx_bmw, hashB);
sph_groestl512_init(&ctx_groestl);
sph_groestl512 (&ctx_groestl, hashB, 64);
sph_groestl512_close(&ctx_groestl, hashA);
sph_skein512_init(&ctx_skein);
sph_skein512 (&ctx_skein, hashA, 64);
sph_skein512_close (&ctx_skein, hashB);
sph_jh512_init(&ctx_jh);
sph_jh512 (&ctx_jh, hashB, 64);
sph_jh512_close(&ctx_jh, hashA);
sph_keccak512_init(&ctx_keccak);
sph_keccak512 (&ctx_keccak, hashA, 64);
sph_keccak512_close(&ctx_keccak, hashB);
sph_luffa512_init (&ctx_luffa1);
sph_luffa512 (&ctx_luffa1, hashB, 64);
sph_luffa512_close (&ctx_luffa1, hashA);
sph_cubehash512_init (&ctx_cubehash1);
sph_cubehash512 (&ctx_cubehash1, hashA, 64);
sph_cubehash512_close(&ctx_cubehash1, hashB);
sph_shavite512_init (&ctx_shavite1);
sph_shavite512 (&ctx_shavite1, hashB, 64);
sph_shavite512_close(&ctx_shavite1, hashA);
sph_simd512_init (&ctx_simd1);
sph_simd512 (&ctx_simd1, hashA, 64);
sph_simd512_close(&ctx_simd1, hashB);
sph_echo512_init (&ctx_echo1);
sph_echo512 (&ctx_echo1, hashB, 64);
sph_echo512_close(&ctx_echo1, hashA);
memcpy(output, hashA, 32);
}
int scanhash_x11( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done )
{
@@ -263,7 +198,6 @@ bool register_x11_algo( algo_gate_t* gate )
gate->scanhash = (void*)&scanhash_x11;
gate->hash = (void*)&x11_hash;
gate->get_max64 = (void*)&get_max64_0x3ffff;
gate->hash_alt = (void*)&x11hash_alt;
return true;
};

View File

@@ -303,7 +303,6 @@ bool register_x11evo_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | AES_OPT | AVX_OPT | AVX2_OPT;
gate->scanhash = (void*)&scanhash_x11evo;
gate->hash = (void*)&x11evo_hash;
gate->hash_alt = (void*)&x11evo_hash;
init_x11evo_ctx();
return true;
};

View File

@@ -179,7 +179,6 @@ bool register_sib_algo( algo_gate_t* gate )
init_sib_ctx();
gate->scanhash = (void*)&scanhash_sib;
gate->hash = (void*)&sibhash;
gate->hash_alt = (void*)&sibhash;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;
}

View File

@@ -175,79 +175,6 @@ static void x13hash(void *output, const void *input)
memcpy(output, hashB, 32);
}
void x13hash_alt(void *output, const void *input)
{
unsigned char hash[128]; // uint32_t hashA[16], hashB[16];
#define hashB hash+64
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
sph_hamsi512_context ctx_hamsi;
sph_fugue512_context ctx_fugue;
sph_blake512_init(&ctx_blake);
sph_blake512(&ctx_blake, input, 80);
sph_blake512_close(&ctx_blake, hash);
sph_bmw512_init(&ctx_bmw);
sph_bmw512(&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hashB);
sph_groestl512_init(&ctx_groestl);
sph_groestl512(&ctx_groestl, hashB, 64);
sph_groestl512_close(&ctx_groestl, hash);
sph_skein512_init(&ctx_skein);
sph_skein512(&ctx_skein, hash, 64);
sph_skein512_close(&ctx_skein, hashB);
sph_jh512_init(&ctx_jh);
sph_jh512(&ctx_jh, hashB, 64);
sph_jh512_close(&ctx_jh, hash);
sph_keccak512_init(&ctx_keccak);
sph_keccak512(&ctx_keccak, hash, 64);
sph_keccak512_close(&ctx_keccak, hashB);
sph_luffa512_init(&ctx_luffa);
sph_luffa512(&ctx_luffa, hashB, 64);
sph_luffa512_close(&ctx_luffa, hash);
sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512(&ctx_cubehash, hash, 64);
sph_cubehash512_close(&ctx_cubehash, hashB);
sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, hashB, 64);
sph_shavite512_close(&ctx_shavite, hash);
sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hashB);
sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, hashB, 64);
sph_echo512_close(&ctx_echo, hash);
sph_hamsi512_init(&ctx_hamsi);
sph_hamsi512(&ctx_hamsi, hash, 64);
sph_hamsi512_close(&ctx_hamsi, hashB);
sph_fugue512_init(&ctx_fugue);
sph_fugue512(&ctx_fugue, hashB, 64);
sph_fugue512_close(&ctx_fugue, hash);
memcpy(output, hash, 32);
}
int scanhash_x13(int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done)
{
@@ -331,7 +258,6 @@ bool register_x13_algo( algo_gate_t* gate )
init_x13_ctx();
gate->scanhash = (void*)&scanhash_x13;
gate->hash = (void*)&x13hash;
gate->hash_alt = (void*)&x13hash_alt;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;
};

View File

@@ -182,86 +182,6 @@ static void x14hash(void *output, const void *input)
memcpy(output, hash, 32);
}
void x14hash_alt(void *output, const void *input)
{
unsigned char hash[128]; // uint32_t hashA[16], hashB[16];
#define hashB hash+64
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
sph_hamsi512_context ctx_hamsi;
sph_fugue512_context ctx_fugue;
sph_shabal512_context ctx_shabal;
sph_blake512_init(&ctx_blake);
sph_blake512(&ctx_blake, input, 80);
sph_blake512_close(&ctx_blake, hash);
sph_bmw512_init(&ctx_bmw);
sph_bmw512(&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hashB);
sph_groestl512_init(&ctx_groestl);
sph_groestl512(&ctx_groestl, hashB, 64);
sph_groestl512_close(&ctx_groestl, hash);
sph_skein512_init(&ctx_skein);
sph_skein512(&ctx_skein, hash, 64);
sph_skein512_close(&ctx_skein, hashB);
sph_jh512_init(&ctx_jh);
sph_jh512(&ctx_jh, hashB, 64);
sph_jh512_close(&ctx_jh, hash);
sph_keccak512_init(&ctx_keccak);
sph_keccak512(&ctx_keccak, hash, 64);
sph_keccak512_close(&ctx_keccak, hashB);
sph_luffa512_init(&ctx_luffa);
sph_luffa512(&ctx_luffa, hashB, 64);
sph_luffa512_close(&ctx_luffa, hash);
sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512(&ctx_cubehash, hash, 64);
sph_cubehash512_close(&ctx_cubehash, hashB);
sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, hashB, 64);
sph_shavite512_close(&ctx_shavite, hash);
sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hashB);
sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, hashB, 64);
sph_echo512_close(&ctx_echo, hash);
sph_hamsi512_init(&ctx_hamsi);
sph_hamsi512(&ctx_hamsi, hash, 64);
sph_hamsi512_close(&ctx_hamsi, hashB);
sph_fugue512_init(&ctx_fugue);
sph_fugue512(&ctx_fugue, hashB, 64);
sph_fugue512_close(&ctx_fugue, hash);
sph_shabal512_init(&ctx_shabal);
sph_shabal512(&ctx_shabal, hash, 64);
sph_shabal512_close(&ctx_shabal, hash);
memcpy(output, hash, 32);
}
int scanhash_x14(int thr_id, struct work *work,
uint32_t max_nonce, uint64_t *hashes_done)
{
@@ -336,7 +256,6 @@ bool register_x14_algo( algo_gate_t* gate )
init_x14_ctx();
gate->scanhash = (void*)&scanhash_x14;
gate->hash = (void*)&x14hash;
gate->hash_alt = (void*)&x14hash_alt;
gate->get_max64 = (void*)&get_max64_0x3ffff;
return true;
};

View File

@@ -187,89 +187,6 @@ static void x15hash(void *output, const void *input)
memcpy(output, hashB, 32);
}
void x15hash_alt(void *output, const void *input)
{
unsigned char hash[128]; // uint32_t hashA[16], hashB[16];
#define hashB hash+64
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
sph_hamsi512_context ctx_hamsi;
sph_fugue512_context ctx_fugue;
sph_shabal512_context ctx_shabal;
sph_whirlpool_context ctx_whirlpool;
sph_blake512_init(&ctx_blake);
sph_blake512(&ctx_blake, input, 80);
sph_blake512_close(&ctx_blake, hash);
sph_bmw512_init(&ctx_bmw);
sph_bmw512(&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hashB);
sph_groestl512_init(&ctx_groestl);
sph_groestl512(&ctx_groestl, hashB, 64);
sph_groestl512_close(&ctx_groestl, hash);
sph_skein512_init(&ctx_skein);
sph_skein512(&ctx_skein, hash, 64);
sph_skein512_close(&ctx_skein, hashB);
sph_jh512_init(&ctx_jh);
sph_jh512(&ctx_jh, hashB, 64);
sph_jh512_close(&ctx_jh, hash);
sph_keccak512_init(&ctx_keccak);
sph_keccak512(&ctx_keccak, hash, 64);
sph_keccak512_close(&ctx_keccak, hashB);
sph_luffa512_init(&ctx_luffa);
sph_luffa512(&ctx_luffa, hashB, 64);
sph_luffa512_close(&ctx_luffa, hash);
sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512(&ctx_cubehash, hash, 64);
sph_cubehash512_close(&ctx_cubehash, hashB);
sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, hashB, 64);
sph_shavite512_close(&ctx_shavite, hash);
sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hashB);
sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, hashB, 64);
sph_echo512_close(&ctx_echo, hash);
sph_hamsi512_init(&ctx_hamsi);
sph_hamsi512(&ctx_hamsi, hash, 64);
sph_hamsi512_close(&ctx_hamsi, hashB);
sph_fugue512_init(&ctx_fugue);
sph_fugue512(&ctx_fugue, hashB, 64);
sph_fugue512_close(&ctx_fugue, hash);
sph_shabal512_init(&ctx_shabal);
sph_shabal512(&ctx_shabal, hash, 64);
sph_shabal512_close(&ctx_shabal, hashB);
sph_whirlpool_init(&ctx_whirlpool);
sph_whirlpool(&ctx_whirlpool, hashB, 64);
sph_whirlpool_close(&ctx_whirlpool, hash);
memcpy(output, hash, 32);
}
int scanhash_x15(int thr_id, struct work *work,
uint32_t max_nonce, uint64_t *hashes_done)
{
@@ -351,7 +268,6 @@ bool register_x15_algo( algo_gate_t* gate )
init_x15_ctx();
gate->scanhash = (void*)&scanhash_x15;
gate->hash = (void*)&x15hash;
gate->hash_alt = (void*)&x15hash_alt;
return true;
};

View File

@@ -198,100 +198,6 @@ static void x17hash(void *output, const void *input)
memcpy(output, hashB, 32);
}
void x17hash_alt(void *output, const void *input)
{
unsigned char hash[128]; // uint32_t hashA[16], hashB[16];
#define hashB hash+64
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
sph_hamsi512_context ctx_hamsi;
sph_fugue512_context ctx_fugue;
sph_shabal512_context ctx_shabal;
sph_whirlpool_context ctx_whirlpool;
sph_sha512_context ctx_sha512;
sph_haval256_5_context ctx_haval;
sph_blake512_init(&ctx_blake);
sph_blake512(&ctx_blake, input, 80);
sph_blake512_close(&ctx_blake, hash);
sph_bmw512_init(&ctx_bmw);
sph_bmw512(&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hashB);
sph_groestl512_init(&ctx_groestl);
sph_groestl512(&ctx_groestl, hashB, 64);
sph_groestl512_close(&ctx_groestl, hash);
sph_skein512_init(&ctx_skein);
sph_skein512(&ctx_skein, hash, 64);
sph_skein512_close(&ctx_skein, hashB);
sph_jh512_init(&ctx_jh);
sph_jh512(&ctx_jh, hashB, 64);
sph_jh512_close(&ctx_jh, hash);
sph_keccak512_init(&ctx_keccak);
sph_keccak512(&ctx_keccak, hash, 64);
sph_keccak512_close(&ctx_keccak, hashB);
sph_luffa512_init(&ctx_luffa);
sph_luffa512(&ctx_luffa, hashB, 64);
sph_luffa512_close(&ctx_luffa, hash);
sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512(&ctx_cubehash, hash, 64);
sph_cubehash512_close(&ctx_cubehash, hashB);
sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, hashB, 64);
sph_shavite512_close(&ctx_shavite, hash);
sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hashB);
sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, hashB, 64);
sph_echo512_close(&ctx_echo, hash);
sph_hamsi512_init(&ctx_hamsi);
sph_hamsi512(&ctx_hamsi, hash, 64);
sph_hamsi512_close(&ctx_hamsi, hashB);
sph_fugue512_init(&ctx_fugue);
sph_fugue512(&ctx_fugue, hashB, 64);
sph_fugue512_close(&ctx_fugue, hash);
sph_shabal512_init(&ctx_shabal);
sph_shabal512(&ctx_shabal, hash, 64);
sph_shabal512_close(&ctx_shabal, hashB);
sph_whirlpool_init(&ctx_whirlpool);
sph_whirlpool(&ctx_whirlpool, hashB, 64);
sph_whirlpool_close(&ctx_whirlpool, hash);
sph_sha512_init(&ctx_sha512);
sph_sha512(&ctx_sha512,(const void*) hash, 64);
sph_sha512_close(&ctx_sha512,(void*) hash);
sph_haval256_5_init(&ctx_haval);
sph_haval256_5(&ctx_haval,(const void*) hash, 64);
sph_haval256_5_close(&ctx_haval,hash);
memcpy(output, hash, 32);
}
int scanhash_x17(int thr_id, struct work *work,
uint32_t max_nonce, uint64_t *hashes_done)
{
@@ -373,7 +279,6 @@ bool register_x17_algo( algo_gate_t* gate )
init_x17_ctx();
gate->scanhash = (void*)&scanhash_x17;
gate->hash = (void*)&x17hash;
gate->hash_alt = (void*)&x17hash_alt;
return true;
};

View File

@@ -53,7 +53,6 @@ bool register_yescrypt_algo ( algo_gate_t* gate )
{
gate->scanhash = (void*)&scanhash_yescrypt;
gate->hash = (void*)&yescrypt_hash;
gate->hash_alt = (void*)&yescrypthash;
gate->set_target = (void*)&scrypt_set_target;
gate->get_max64 = (void*)&yescrypt_get_max64;
return true;

View File

@@ -226,7 +226,6 @@ bool register_zr5_algo( algo_gate_t* gate )
gate->get_new_work = (void*)&zr5_get_new_work;
gate->scanhash = (void*)&scanhash_zr5;
gate->hash = (void*)&zr5hash;
gate->hash_alt = (void*)&zr5hash;
gate->get_max64 = (void*)&zr5_get_max64;
gate->display_extra_data = (void*)&zr5_display_pok;
gate->build_stratum_request = (void*)&std_be_build_stratum_request;