Skip to content

Commit

Permalink
v3.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDDee committed Dec 8, 2017
1 parent 4b57ac0 commit af1c940
Show file tree
Hide file tree
Showing 53 changed files with 1,297 additions and 4,763 deletions.
12 changes: 12 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@ LucasJones

tpruvot@github

elmad

djm34

palmd

ig0tik3d

Wolf0

Optiminer

Jay D Dee
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ cpuminer_SOURCES = \
algo/lyra2/sponge.c \
algo/lyra2/lyra2rev2.c \
algo/lyra2/lyra2re.c \
algo/lyra2/zcoin.c \
algo/lyra2/lyra2z-gate.c \
algo/lyra2/lyra2z.c \
algo/lyra2/lyra2z-4way.c \
algo/lyra2/lyra2z330.c \
algo/m7m.c \
algo/neoscrypt.c \
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ Supported Algorithms
heavy Heavy
hmq1725 Espers
hodl Hodlcoin
jha jackpotcoin
keccak Keccak
jha Jackpotcoin
keccak Maxcoin
keccakc Creative coin
lbry LBC, LBRY Credits
luffa Luffa
lyra2re lyra2
Expand All @@ -50,7 +51,7 @@ Supported Algorithms
pentablake Pentablake
phi1612 phi, LUX coin
pluck Pluck:128 (Supcoin)
polytimos
polytimos Ninja
quark Quark
qubit Qubit
scrypt scrypt(1024, 1, 1) (default)
Expand Down
11 changes: 11 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ Support for even older x86_64 without AES_NI or SSE2 is not availble.
Change Log
----------

v3.7.5

New algo keccakc for Creative coin with 4way optimizations

Rewrote some AVX/AVX2 code for more consistent implementation and some
optimizing.

Enhanced capabilities check to support 4way, mor eprecise reporting of
features (not all algos use SSE2), and better error messages when using
an incompatible pre-built version (Windows users).

v3.7.4

Removed unnecessary build options.
Expand Down
11 changes: 9 additions & 2 deletions algo-gate-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ void algo_not_tested()
applog(LOG_WARNING,"and bad things may happen. Use at your own risk.");
}

void four_way_not_tested()
{
applog( LOG_WARNING,"Algo %s has not been tested using 4way. It may not", algo_names[opt_algo] );
applog( LOG_WARNING,"work or may be slower. Please report your results.");
}

void algo_not_implemented()
{
applog(LOG_ERR,"Algo %s has not been Implemented.",algo_names[opt_algo]);
Expand Down Expand Up @@ -124,7 +130,7 @@ void init_algo_gate( algo_gate_t* gate )
gate->do_this_thread = (void*)&return_true;
gate->longpoll_rpc_call = (void*)&std_longpoll_rpc_call;
gate->stratum_handle_response = (void*)&std_stratum_handle_response;
gate->optimizations = SSE2_OPT;
gate->optimizations = EMPTY_SET;
gate->ntime_index = STD_NTIME_INDEX;
gate->nbits_index = STD_NBITS_INDEX;
gate->nonce_index = STD_NONCE_INDEX;
Expand Down Expand Up @@ -171,11 +177,12 @@ bool register_algo_gate( int algo, algo_gate_t *gate )
case ALGO_HODL: register_hodl_algo ( gate ); break;
case ALGO_JHA: register_jha_algo ( gate ); break;
case ALGO_KECCAK: register_keccak_algo ( gate ); break;
case ALGO_KECCAKC: register_keccakc_algo ( gate ); break;
case ALGO_LBRY: register_lbry_algo ( gate ); break;
case ALGO_LUFFA: register_luffa_algo ( gate ); break;
case ALGO_LYRA2RE: register_lyra2re_algo ( gate ); break;
case ALGO_LYRA2REV2: register_lyra2rev2_algo ( gate ); break;
case ALGO_LYRA2Z: register_zcoin_algo ( gate ); break;
case ALGO_LYRA2Z: register_lyra2z_algo ( gate ); break;
case ALGO_LYRA2Z330: register_lyra2z330_algo ( gate ); break;
case ALGO_M7M: register_m7m_algo ( gate ); break;
case ALGO_MYR_GR: register_myriad_algo ( gate ); break;
Expand Down
15 changes: 8 additions & 7 deletions algo-gate-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@

typedef uint32_t set_t;

#define EMPTY_SET 0
#define SSE2_OPT 1
#define AES_OPT 2
#define AVX_OPT 4
#define AVX2_OPT 8
#define SHA_OPT 16
#define EMPTY_SET 0
#define SSE2_OPT 1
#define AES_OPT 2
#define AVX_OPT 4
#define AVX2_OPT 8
#define SHA_OPT 0x10
#define FOUR_WAY_OPT 0x20

// return set containing all elements from sets a & b
inline set_t set_union ( set_t a, set_t b ) { return a | b; }
Expand Down Expand Up @@ -156,7 +157,7 @@ bool return_false();
void *return_null();
void algo_not_tested();
void algo_not_implemented();

void four_way_not_tested();

// Warning: algo_gate.nonce_index should only be used in targetted code
// due to different behaviours by different targets. The JR2 index uses an
Expand Down
16 changes: 8 additions & 8 deletions algo/blake/blake-4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@

void blakehash_4way(void *state, const void *input)
{
uint32_t hash0[16] __attribute__ ((aligned (64)));
uint32_t hash1[16] __attribute__ ((aligned (64)));
uint32_t hash2[16] __attribute__ ((aligned (64)));
uint32_t hash3[16] __attribute__ ((aligned (64)));
uint32_t vhash[16*4] __attribute__ ((aligned (64)));
uint32_t vhash[4*4] __attribute__ ((aligned (64)));
uint32_t hash0[4] __attribute__ ((aligned (32)));
uint32_t hash1[4] __attribute__ ((aligned (32)));
uint32_t hash2[4] __attribute__ ((aligned (32)));
uint32_t hash3[4] __attribute__ ((aligned (32)));
blake256_4way_context ctx;

blake256_4way_init( &ctx );
blake256_4way( &ctx, input, 16 );
blake256_4way_close( &ctx, vhash );

m128_deinterleave_4x32( hash0, hash1, hash2, hash3, vhash, 512 );
mm_deinterleave_4x32( hash0, hash1, hash2, hash3, vhash, 256 );

memcpy( state, hash0, 32 );
memcpy( state+32, hash1, 32 );
Expand All @@ -32,7 +32,7 @@ int scanhash_blake_4way( int thr_id, struct work *work, uint32_t max_nonce,
uint64_t *hashes_done )
{
uint32_t vdata[20*4] __attribute__ ((aligned (64)));
uint32_t hash[4*8] __attribute__ ((aligned (64)));
uint32_t hash[4*4] __attribute__ ((aligned (32)));
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
const uint32_t first_nonce = pdata[19];
Expand All @@ -49,7 +49,7 @@ int scanhash_blake_4way( int thr_id, struct work *work, uint32_t max_nonce,
// we need big endian data...
swab32_array( endiandata, pdata, 20 );

m128_interleave_4x32( vdata, endiandata, endiandata, endiandata,
mm_interleave_4x32( vdata, endiandata, endiandata, endiandata,
endiandata, 640 );

uint32_t *noncep = vdata + 76; // 19*4
Expand Down
5 changes: 3 additions & 2 deletions algo/blake/blake-gate.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ bool register_blake_algo( algo_gate_t* gate )
// gate->scanhash = (void*)&scanhash_blake_8way;
// gate->hash = (void*)&blakehash_8way;
#if defined(BLAKE_4WAY)
gate->optimizations = SSE2_OPT | AVX_OPT;
four_way_not_tested();
gate->optimizations = FOUR_WAY_OPT;
gate->scanhash = (void*)&scanhash_blake_4way;
gate->hash = (void*)&blakehash_4way;
four_way_not_tested();
#else
gate->optimizations = SSE2_OPT;
gate->scanhash = (void*)&scanhash_blake;
gate->hash = (void*)&blakehash;
#endif
Expand Down
Loading

0 comments on commit af1c940

Please sign in to comment.