mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
#include "keccak-gate.h"
|
|
|
|
|
|
bool register_keccak_algo( algo_gate_t* gate )
|
|
{
|
|
gate->optimizations = AVX2_OPT | AVX512_OPT;
|
|
gate->gen_merkle_root = (void*)&SHA256_gen_merkle_root;
|
|
opt_target_factor = 128.0;
|
|
#if defined (KECCAK_8WAY)
|
|
gate->scanhash = (void*)&scanhash_keccak_8way;
|
|
gate->hash = (void*)&keccakhash_8way;
|
|
#elif defined (KECCAK_4WAY)
|
|
gate->scanhash = (void*)&scanhash_keccak_4way;
|
|
gate->hash = (void*)&keccakhash_4way;
|
|
#else
|
|
gate->scanhash = (void*)&scanhash_keccak;
|
|
gate->hash = (void*)&keccakhash;
|
|
#endif
|
|
return true;
|
|
};
|
|
|
|
bool register_keccakc_algo( algo_gate_t* gate )
|
|
{
|
|
gate->optimizations = AVX2_OPT | AVX512_OPT;
|
|
gate->gen_merkle_root = (void*)&sha256d_gen_merkle_root;
|
|
opt_target_factor = 256.0;
|
|
#if defined (KECCAK_8WAY)
|
|
gate->scanhash = (void*)&scanhash_keccak_8way;
|
|
gate->hash = (void*)&keccakhash_8way;
|
|
#elif defined (KECCAK_4WAY)
|
|
gate->scanhash = (void*)&scanhash_keccak_4way;
|
|
gate->hash = (void*)&keccakhash_4way;
|
|
#else
|
|
gate->scanhash = (void*)&scanhash_keccak;
|
|
gate->hash = (void*)&keccakhash;
|
|
#endif
|
|
return true;
|
|
};
|
|
|