This commit is contained in:
Jay D Dee
2023-10-06 22:18:09 -04:00
parent bc5a5c6df8
commit 31c4dedf59
144 changed files with 5931 additions and 3746 deletions

View File

@@ -26,8 +26,14 @@ void x16r_prehash( void *edata, void *pdata )
sph_skein512( &x16_ctx.skein, edata, 64 );
break;
case LUFFA:
#if defined(__aarch64__)
sph_luffa512_init( &x16_ctx.luffa );
sph_luffa512( &x16_ctx.luffa, edata, 64 );
#else
init_luffa( &x16_ctx.luffa, 512 );
update_luffa( &x16_ctx.luffa, (const BitSequence*)edata, 64 );
#endif
break;
case CUBEHASH:
cubehashInit( &x16_ctx.cube, 512, 16, 32 );
@@ -108,13 +114,24 @@ int x16r_hash_generic( void* output, const void* input, int thrid )
sph_skein512_close( &ctx.skein, hash );
break;
case LUFFA:
#if defined(__aarch64__)
if ( i == 0 )
sph_luffa512(&ctx.luffa, in+64, 16 );
else
{
sph_luffa512_init( &ctx.luffa );
sph_luffa512( &ctx.luffa, in, size );
}
sph_luffa512_close( &ctx.luffa, hash );
#else
if ( i == 0 )
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
(const BitSequence*)in+64, 16 );
else
luffa_full( &ctx.luffa, (BitSequence*)hash, 512,
(const BitSequence*)in, size );
break;
#endif
break;
case CUBEHASH:
if ( i == 0 )
cubehashUpdateDigest( &ctx.cube, (byte*)hash,
@@ -216,7 +233,7 @@ int scanhash_x16r( struct work *work, uint32_t max_nonce,
const bool bench = opt_benchmark;
if ( bench ) ptarget[7] = 0x0cff;
mm128_bswap32_80( edata, pdata );
v128_bswap32_80( edata, pdata );
static __thread uint32_t s_ntime = UINT32_MAX;
uint32_t ntime = bswap_32( pdata[17] );