mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.21.3
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "algo/shabal/sph_shabal.h"
|
||||
#include "algo/whirlpool/sph_whirlpool.h"
|
||||
#include "algo/sha/sph_sha2.h"
|
||||
#include "algo/tiger/sph_tiger.h"
|
||||
|
||||
#if defined(__AES__)
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
@@ -57,13 +58,11 @@
|
||||
|
||||
#define X16R_8WAY 1
|
||||
#define X16RV2_8WAY 1
|
||||
#define X16RT_8WAY 1
|
||||
#define X21S_8WAY 1
|
||||
|
||||
#elif defined(__AVX2__) && defined(__AES__)
|
||||
|
||||
#define X16RV2_4WAY 1
|
||||
#define X16RT_4WAY 1
|
||||
#define X21S_4WAY 1
|
||||
#define X16R_4WAY 1
|
||||
|
||||
@@ -89,23 +88,29 @@ enum x16r_Algo {
|
||||
X16R_HASH_FUNC_COUNT
|
||||
};
|
||||
|
||||
extern __thread char x16r_hash_order[ X16R_HASH_FUNC_COUNT + 1 ];
|
||||
|
||||
extern void (*x16_r_s_getAlgoString) ( const uint8_t*, char* );
|
||||
void x16r_getAlgoString( const uint8_t *prevblock, char *output );
|
||||
void x16s_getAlgoString( const uint8_t *prevblock, char *output );
|
||||
void x16rt_getAlgoString( const uint32_t *timeHash, char *output );
|
||||
//extern __thread char x16r_hash_order[ X16R_HASH_FUNC_COUNT + 1 ];
|
||||
extern char x16r_hash_order[ X16R_HASH_FUNC_COUNT + 1 ];
|
||||
|
||||
|
||||
extern void (*x16r_gate_get_hash_order) ( const struct work *, char * );
|
||||
|
||||
// x16r, x16rv2
|
||||
void x16r_get_hash_order( const struct work *, char * );
|
||||
// x16s, x21s
|
||||
void x16s_get_hash_order( const struct work *, char * );
|
||||
// x16rt
|
||||
void x16rt_get_hash_order( const struct work *, char * );
|
||||
|
||||
void x16rt_getTimeHash( const uint32_t timeStamp, void* timeHash );
|
||||
|
||||
bool register_x16r_algo( algo_gate_t* gate );
|
||||
bool register_x16rv2_algo( algo_gate_t* gate );
|
||||
bool register_x16s_algo( algo_gate_t* gate );
|
||||
bool register_x16rt_algo( algo_gate_t* gate );
|
||||
bool register_hex__algo( algo_gate_t* gate );
|
||||
bool register_x21s__algo( algo_gate_t* gate );
|
||||
bool register_hex_algo( algo_gate_t* gate );
|
||||
bool register_x21s_algo( algo_gate_t* gate );
|
||||
|
||||
// x16r, x16s
|
||||
// x16r, x16s, x16rt
|
||||
#if defined(X16R_8WAY)
|
||||
|
||||
union _x16r_8way_context_overlay
|
||||
@@ -136,15 +141,15 @@ union _x16r_8way_context_overlay
|
||||
|
||||
typedef union _x16r_8way_context_overlay x16r_8way_context_overlay;
|
||||
|
||||
extern __thread x16r_8way_context_overlay x16r_ctx;
|
||||
extern x16r_8way_context_overlay x16r_ctx;
|
||||
extern uint32_t x16r_8way_vdata[24*8] __attribute__ ((aligned (64)));
|
||||
|
||||
void x16r_8way_prehash( void *, void * );
|
||||
int x16r_8way_hash_generic( void *, const void *, int );
|
||||
int x16r_8way_hash( void *, const void *, int );
|
||||
void x16r_8way_do_prehash( void *, const void * );
|
||||
int x16r_8way_prehash( struct work * );
|
||||
int x16r_8way_hash_generic( void *, const void *, const int );
|
||||
int x16r_8way_hash( void *, const void *, const int );
|
||||
int scanhash_x16r_8way( struct work *, uint32_t ,
|
||||
uint64_t *, struct thr_info * );
|
||||
extern __thread x16r_8way_context_overlay x16r_ctx;
|
||||
|
||||
|
||||
#elif defined(X16R_4WAY)
|
||||
|
||||
@@ -177,14 +182,15 @@ union _x16r_4way_context_overlay
|
||||
|
||||
typedef union _x16r_4way_context_overlay x16r_4way_context_overlay;
|
||||
|
||||
extern __thread x16r_4way_context_overlay x16r_ctx;
|
||||
extern x16r_4way_context_overlay x16r_ctx;
|
||||
extern uint32_t x16r_4way_vdata[24*4] __attribute__ ((aligned (64)));
|
||||
|
||||
void x16r_4way_prehash( void *, void * );
|
||||
int x16r_4way_hash_generic( void *, const void *, int );
|
||||
int x16r_4way_hash( void *, const void *, int );
|
||||
void x16r_4way_do_prehash( void *, const void * );
|
||||
int x16r_4way_prehash( struct work * );
|
||||
int x16r_4way_hash_generic( void *, const void *, const int );
|
||||
int x16r_4way_hash( void *, const void *, const int );
|
||||
int scanhash_x16r_4way( struct work *, uint32_t,
|
||||
uint64_t *, struct thr_info * );
|
||||
extern __thread x16r_4way_context_overlay x16r_ctx;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -217,80 +223,113 @@ union _x16r_context_overlay
|
||||
|
||||
typedef union _x16r_context_overlay x16r_context_overlay;
|
||||
|
||||
extern __thread x16r_context_overlay x16_ctx;
|
||||
extern x16r_context_overlay x16_ctx;
|
||||
extern uint32_t x16r_edata[24] __attribute__ ((aligned (32)));
|
||||
|
||||
void x16r_prehash( void *, void * );
|
||||
int x16r_hash_generic( void *, const void *, int );
|
||||
int x16r_hash( void *, const void *, int );
|
||||
void x16r_do_prehash( const void * );
|
||||
int x16r_prehash( const struct work * );
|
||||
int x16r_hash_generic( void *, const void *, const int );
|
||||
int x16r_hash( void *, const void *, const int );
|
||||
int scanhash_x16r( struct work *, uint32_t, uint64_t *, struct thr_info * );
|
||||
|
||||
// x16Rv2
|
||||
#if defined(X16RV2_8WAY)
|
||||
|
||||
int x16rv2_8way_hash( void *state, const void *input, int thrid );
|
||||
int scanhash_x16rv2_8way( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
union _x16rv2_8way_context_overlay
|
||||
{
|
||||
blake512_8way_context blake;
|
||||
bmw512_8way_context bmw;
|
||||
skein512_8way_context skein;
|
||||
jh512_8way_context jh;
|
||||
keccak512_8way_context keccak;
|
||||
luffa_4way_context luffa;
|
||||
cubehashParam cube;
|
||||
simd_4way_context simd;
|
||||
hamsi512_8way_context hamsi;
|
||||
hashState_fugue fugue;
|
||||
shabal512_8way_context shabal;
|
||||
sph_whirlpool_context whirlpool;
|
||||
sha512_8way_context sha512;
|
||||
sph_tiger_context tiger;
|
||||
#if defined(__VAES__)
|
||||
groestl512_4way_context groestl;
|
||||
shavite512_4way_context shavite;
|
||||
echo_4way_context echo;
|
||||
#else
|
||||
hashState_groestl groestl;
|
||||
shavite512_context shavite;
|
||||
hashState_echo echo;
|
||||
#endif
|
||||
} __attribute__ ((aligned (64)));
|
||||
|
||||
typedef union _x16rv2_8way_context_overlay x16rv2_8way_context_overlay;
|
||||
extern x16rv2_8way_context_overlay x16rv2_ctx;
|
||||
|
||||
int x16rv2_8way_prehash( struct work * );
|
||||
int x16rv2_8way_hash( void *state, const void *input, const int thrid );
|
||||
//int scanhash_x16rv2_8way( struct work *work, uint32_t max_nonce,
|
||||
// uint64_t *hashes_done, struct thr_info *mythr );
|
||||
|
||||
#elif defined(X16RV2_4WAY)
|
||||
|
||||
int x16rv2_4way_hash( void *state, const void *input, int thrid );
|
||||
int scanhash_x16rv2_4way( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
|
||||
union _x16rv2_4way_context_overlay
|
||||
{
|
||||
blake512_4way_context blake;
|
||||
bmw512_4way_context bmw;
|
||||
#if defined(__VAES__)
|
||||
groestl512_2way_context groestl;
|
||||
shavite512_2way_context shavite;
|
||||
echo_2way_context echo;
|
||||
#else
|
||||
|
||||
int x16rv2_hash( void *state, const void *input, int thr_id );
|
||||
int scanhash_x16rv2( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
|
||||
hashState_groestl groestl;
|
||||
shavite512_context shavite;
|
||||
hashState_echo echo;
|
||||
#endif
|
||||
skein512_4way_context skein;
|
||||
jh512_4way_context jh;
|
||||
keccak512_4way_context keccak;
|
||||
luffa_2way_context luffa;
|
||||
cubehashParam cube;
|
||||
simd_2way_context simd;
|
||||
hamsi512_4way_context hamsi;
|
||||
hashState_fugue fugue;
|
||||
shabal512_4way_context shabal;
|
||||
sph_whirlpool_context whirlpool;
|
||||
sha512_4way_context sha512;
|
||||
sph_tiger_context tiger;
|
||||
};
|
||||
|
||||
// x16rt, veil
|
||||
#if defined(X16R_8WAY)
|
||||
typedef union _x16rv2_4way_context_overlay x16rv2_4way_context_overlay;
|
||||
extern x16rv2_4way_context_overlay x16rv2_ctx;
|
||||
|
||||
//void x16rt_8way_hash( void *state, const void *input );
|
||||
int scanhash_x16rt_8way( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
|
||||
#elif defined(X16R_4WAY)
|
||||
|
||||
//void x16rt_4way_hash( void *state, const void *input );
|
||||
int scanhash_x16rt_4way( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
int x16rv2_4way_hash( void *state, const void *input, const int thrid );
|
||||
int x16rv2_4way_prehash( struct work * );
|
||||
|
||||
#else
|
||||
|
||||
//void x16rt_hash( void *state, const void *input );
|
||||
int scanhash_x16rt( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
int x16rv2_hash( void *state, const void *input, const int thr_id );
|
||||
int x16rv2_prehash( const struct work * );
|
||||
|
||||
#endif
|
||||
|
||||
// x21s
|
||||
#if defined(X16R_8WAY)
|
||||
|
||||
int x21s_8way_hash( void *state, const void *input, int thrid );
|
||||
int scanhash_x21s_8way( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
int x21s_8way_hash( void *state, const void *input, const int thrid );
|
||||
bool x21s_8way_thread_init();
|
||||
|
||||
#elif defined(X16R_4WAY)
|
||||
|
||||
int x21s_4way_hash( void *state, const void *input, int thrid );
|
||||
int scanhash_x21s_4way( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
int x21s_4way_hash( void *state, const void *input, const int thrid );
|
||||
bool x21s_4way_thread_init();
|
||||
|
||||
#else
|
||||
|
||||
int x21s_hash( void *state, const void *input, int thr_id );
|
||||
int scanhash_x21s( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
int x21s_hash( void *state, const void *input, const int thr_id );
|
||||
bool x21s_thread_init();
|
||||
|
||||
#endif
|
||||
|
||||
//void hex_hash( void *state, const void *input );
|
||||
int scanhash_hex( struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done, struct thr_info *mythr );
|
||||
|
||||
|
Reference in New Issue
Block a user