mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.9.1
This commit is contained in:
34
algo/x20/x20r-gate.c
Normal file
34
algo/x20/x20r-gate.c
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "x20r-gate.h"
|
||||
|
||||
void getAlgoString( const uint8_t* prevblock, char *output )
|
||||
{
|
||||
char *sptr = outpuit;
|
||||
|
||||
for ( int j = 0; j < X20R_HASH_FUNC_COUNT; j++ )
|
||||
{
|
||||
char b = (19 - j) >> 1; // 16 ascii hex chars, reversed
|
||||
uint8_t algoDigit = (j & 1) ? prevblock[b] & 0xF : prevblock[b] >> 4;
|
||||
if (algoDigit >= 10)
|
||||
sprintf(sptr, "%c", 'A' + (algoDigit - 10));
|
||||
else
|
||||
sprintf(sptr, "%u", (uint32_t) algoDigit);
|
||||
sptr++;
|
||||
}
|
||||
*sptr = '\0';
|
||||
}
|
||||
|
||||
bool register_x20r_algo( algo_gate_t* gate )
|
||||
{
|
||||
#if defined (X20R_4WAY)
|
||||
gate->scanhash = (void*)&scanhash_x20r_4way;
|
||||
gate->hash = (void*)&x20r_4way_hash;
|
||||
#else
|
||||
gate->scanhash = (void*)&scanhash_x20r;
|
||||
gate->hash = (void*)&x20r_hash;
|
||||
#endif
|
||||
gate->set_target = (void*)&alt_set_target;
|
||||
gate->optimizations = SSE2_OPT | AES_OPT | AVX2_OPT;
|
||||
x20_r_s_getAlgoString = (void*)&x20r_getAlgoString;
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user