v3.12.8.1

This commit is contained in:
Jay D Dee
2020-04-17 16:12:45 -04:00
parent e96a6bd699
commit 972d4d70db
11 changed files with 203 additions and 63 deletions

View File

@@ -19,12 +19,11 @@
*/
#include "cpuminer-config.h"
#include "miner.h"
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include "algo-gate-api.h"
#include "yespower.h"
#include "yescrypt-r8g.h"
int scanhash_yespower_r8g( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr )
@@ -38,17 +37,7 @@ int scanhash_yespower_r8g( struct work *work, uint32_t max_nonce,
const uint32_t last_nonce = max_nonce;
const int thr_id = mythr->id;
static __thread int initialized = 0;
static __thread yespower_local_t local;
if ( !initialized )
{
if ( yespower_init_local( &local ) )
return -1;
initialized = 1;
}
yespower_params_t params =
yespower_params_t params =
{
.version = YESPOWER_0_5,
.N = 2048,
@@ -67,7 +56,7 @@ int scanhash_yespower_r8g( struct work *work, uint32_t max_nonce,
SHA256_Update( &sha256_prehash_ctx, endiandata, 64 );
do {
yespower_hash( &local, (unsigned char *)endiandata, params.perslen,
yespower_tls( (unsigned char *)endiandata, params.perslen,
&params, (yespower_binary_t*)hash, thr_id );
if unlikely( valid_hash( hash, ptarget ) && !opt_benchmark )
@@ -87,6 +76,7 @@ bool register_yescryptr8g_algo( algo_gate_t* gate )
{
gate->optimizations = SSE2_OPT | SHA_OPT;
gate->scanhash = (void*)&scanhash_yespower_r8g;
gate->hash = (void*)&yespower_tls;
pk_buffer_size = 26;
opt_sapling = true;
opt_target_factor = 65536.0;