This commit is contained in:
Jay D Dee
2018-03-31 12:50:52 -04:00
parent f449c6725f
commit dd5e552357
51 changed files with 241 additions and 265 deletions

View File

@@ -83,7 +83,8 @@ void ExpandAESKey256(__m128i *keys, const __m128i *KeyBuf)
keys[14] = tmp1;
}
#ifdef __AVX__
#ifdef __SSE4_2__
//#ifdef __AVX__
#define AESENC(i,j) \
State[j] = _mm_aesenc_si128(State[j], ExpandedKey[j][i]);

View File

@@ -199,7 +199,7 @@ bool register_hodl_algo( algo_gate_t* gate )
// return false;
// }
pthread_barrier_init( &hodl_barrier, NULL, opt_n_threads );
gate->optimizations = AES_OPT | AVX_OPT | AVX2_OPT;
gate->optimizations = AES_OPT | SSE42_OPT | AVX2_OPT;
gate->scanhash = (void*)&hodl_scanhash;
gate->get_new_work = (void*)&hodl_get_new_work;
gate->longpoll_rpc_call = (void*)&hodl_longpoll_rpc_call;

View File

@@ -17,7 +17,8 @@ void GenerateGarbageCore( CacheEntry *Garbage, int ThreadID, int ThreadCount,
const uint32_t StartChunk = ThreadID * Chunk;
const uint32_t EndChunk = StartChunk + Chunk;
#ifdef __AVX__
#ifdef __SSE4_2__
//#ifdef __AVX__
uint64_t* TempBufs[ SHA512_PARALLEL_N ] ;
uint64_t* desination[ SHA512_PARALLEL_N ];
@@ -63,7 +64,8 @@ void Rev256(uint32_t *Dest, const uint32_t *Src)
int scanhash_hodl_wolf( int threadNumber, struct work* work, uint32_t max_nonce,
uint64_t *hashes_done )
{
#ifdef __AVX__
#ifdef __SSE4_2__
//#ifdef __AVX__
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
CacheEntry *Garbage = (CacheEntry*)hodl_scratchbuf;

View File

@@ -1,5 +1,6 @@
#ifndef __AVX2__
#ifdef __AVX__
#ifdef __SSE4_2__
//#ifdef __AVX__
//Dependencies
#include <string.h>

View File

@@ -6,7 +6,8 @@
void ExpandAESKey256(__m128i *keys, const __m128i *KeyBuf);
#ifdef __AVX__
#ifdef __SSE4_2__
//#ifdef __AVX__
#define AES_PARALLEL_N 8
#define BLOCK_COUNT 256