mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.7.6
This commit is contained in:
@@ -252,8 +252,8 @@ SPH_XCAT(HASH, _addbits_and_close)(void *cc,
|
||||
current = (unsigned)sc->count_low & (SPH_BLEN - 1U);
|
||||
#endif
|
||||
|
||||
uint64_t *b= (uint64_t*)sc->buf;
|
||||
uint64_t *s= (uint64_t*)sc->state;
|
||||
//uint64_t *b= (uint64_t*)sc->buf;
|
||||
//uint64_t *s= (uint64_t*)sc->state;
|
||||
// printf("Sptr 1= %u\n",current);
|
||||
// printf("SBuf %016llx %016llx %016llx %016llx\n", b[0], b[1], b[2], b[3] );
|
||||
// printf("SBuf %016llx %016llx %016llx %016llx\n", b[4], b[5], b[6], b[7] );
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "whirlpool-gate.h"
|
||||
|
||||
#if defined(__AVX2__)
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@@ -6,8 +9,6 @@
|
||||
#include "sph_whirlpool.h"
|
||||
#include "whirlpool-hash-4way.h"
|
||||
|
||||
#if defined(__AVX2__)
|
||||
|
||||
static __thread whirlpool_4way_context whirl_mid;
|
||||
|
||||
void whirlpool_hash_4way( void *state, const void *input )
|
||||
@@ -50,7 +51,7 @@ void whirlpool_hash_4way( void *state, const void *input )
|
||||
}
|
||||
|
||||
int scanhash_whirlpool_4way( int thr_id, struct work* work, uint32_t max_nonce,
|
||||
unsigned long *hashes_done )
|
||||
uint64_t *hashes_done )
|
||||
{
|
||||
uint32_t hash[4*8] __attribute__ ((aligned (64)));
|
||||
uint32_t vdata[20*4] __attribute__ ((aligned (64)));
|
||||
@@ -67,8 +68,8 @@ int scanhash_whirlpool_4way( int thr_id, struct work* work, uint32_t max_nonce,
|
||||
uint32_t *noncep2 = vdata + 77;
|
||||
uint32_t *noncep3 = vdata + 79;
|
||||
|
||||
// if (opt_benchmark)
|
||||
// ((uint32_t*)ptarget)[7] = 0x0000ff;
|
||||
if (opt_benchmark)
|
||||
((uint32_t*)ptarget)[7] = 0x0000ff;
|
||||
|
||||
for (int i=0; i < 19; i++)
|
||||
be32enc(&endiandata[i], pdata[i]);
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
|
||||
bool register_whirlpool_algo( algo_gate_t* gate )
|
||||
{
|
||||
//#if defined (WHIRLPOOL_4WAY)
|
||||
// gate->scanhash = (void*)&scanhash_whirlpool_4way;
|
||||
// gate->hash = (void*)&whirlpool_hash_4way;
|
||||
//#else
|
||||
#if defined (WHIRLPOOL_4WAY)
|
||||
four_way_not_tested();
|
||||
gate->scanhash = (void*)&scanhash_whirlpool_4way;
|
||||
gate->hash = (void*)&whirlpool_hash_4way;
|
||||
#else
|
||||
gate->scanhash = (void*)&scanhash_whirlpool;
|
||||
gate->hash = (void*)&whirlpool_hash;
|
||||
init_whirlpool_ctx();
|
||||
//#endif
|
||||
#endif
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
#define WHIRLPOOL_4WAY
|
||||
#endif
|
||||
|
||||
//#if defined (WHIRLPOOL_4WAY)
|
||||
#if defined (WHIRLPOOL_4WAY)
|
||||
|
||||
//void whirlpool_hash_4way(void *state, const void *input);
|
||||
void whirlpool_hash_4way(void *state, const void *input);
|
||||
|
||||
//int scanhash_whirlpool_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
||||
// uint64_t *hashes_done );
|
||||
//#endif
|
||||
int scanhash_whirlpool_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done );
|
||||
#else
|
||||
|
||||
void whirlpool_hash( void *state, const void *input );
|
||||
|
||||
@@ -22,3 +22,4 @@ int scanhash_whirlpool( int thr_id, struct work *work, uint32_t max_nonce,
|
||||
uint64_t *hashes_done );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3365,6 +3365,8 @@ do { \
|
||||
// scalar array of constants "table" and return referenced 64 bit entry.
|
||||
#define t_lane( table, inv, row, lane ) \
|
||||
table[ _mm256_extract_epi64( t_row( inv, row ), lane ) ]
|
||||
// table[ t_rwo( inv, row )[ lane ] ];
|
||||
|
||||
|
||||
// Build a vector from elements of non-contiguous 64 bit data extracted from
|
||||
// scalar "table".
|
||||
|
||||
Reference in New Issue
Block a user