mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v23.5
This commit is contained in:
@@ -87,45 +87,38 @@ int hex_hash( void* output, const void* input, int thrid )
|
||||
case LUFFA:
|
||||
if ( i == 0 )
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512(&ctx.luffa, (const void*) in+64, 16 );
|
||||
sph_luffa512_close(&ctx.luffa, hash);
|
||||
#else
|
||||
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
|
||||
(const BitSequence*)in+64, 16 );
|
||||
#endif
|
||||
update_and_final_luffa( &ctx.luffa, hash, (const void*)in+64, 16 );
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512_init(&ctx.luffa );
|
||||
sph_luffa512(&ctx.luffa, (const void*) in, size );
|
||||
sph_luffa512_close(&ctx.luffa, hash);
|
||||
#else
|
||||
init_luffa( &ctx.luffa, 512 );
|
||||
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
|
||||
(const BitSequence*)in, size );
|
||||
#endif
|
||||
update_and_final_luffa( &ctx.luffa, hash, in, size );
|
||||
}
|
||||
break;
|
||||
case CUBEHASH:
|
||||
if ( i == 0 )
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*)hash,
|
||||
(const byte*)in+64, 16 );
|
||||
cubehashUpdateDigest( &ctx.cube, hash, (const void*)in+64, 16 );
|
||||
else
|
||||
{
|
||||
cubehashInit( &ctx.cube, 512, 16, 32 );
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*)hash,
|
||||
(const byte*)in, size );
|
||||
cubehashUpdateDigest( &ctx.cube, hash, in, size );
|
||||
}
|
||||
break;
|
||||
case SHAVITE:
|
||||
shavite512_full( &ctx.shavite, hash, in, size );
|
||||
break;
|
||||
case SIMD:
|
||||
#if defined(__aarch64__)
|
||||
sph_simd512_init( &ctx.simd );
|
||||
sph_simd512(&ctx.simd, (const void*) hash, 64);
|
||||
sph_simd512_close(&ctx.simd, hash);
|
||||
#else
|
||||
simd_full( &ctx.simd, (BitSequence *)hash,
|
||||
(const BitSequence*)in, size<<3 );
|
||||
init_sd( &ctx.simd, 512 );
|
||||
update_final_sd( &ctx.simd, (BitSequence *)hash,
|
||||
(const BitSequence*)in, size<<3 );
|
||||
#endif
|
||||
break;
|
||||
case ECHO:
|
||||
#if defined(__AES__)
|
||||
@@ -231,17 +224,12 @@ int scanhash_hex( struct work *work, uint32_t max_nonce,
|
||||
sph_skein512( &hex_ctx.skein, edata, 64 );
|
||||
break;
|
||||
case LUFFA:
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512_init(&hex_ctx.luffa );
|
||||
sph_luffa512(&hex_ctx.luffa, (const void*) edata, 64);
|
||||
#else
|
||||
init_luffa( &hex_ctx.luffa, 512 );
|
||||
update_luffa( &hex_ctx.luffa, (const BitSequence*)edata, 64 );
|
||||
#endif
|
||||
update_luffa( &hex_ctx.luffa, edata, 64 );
|
||||
break;
|
||||
case CUBEHASH:
|
||||
cubehashInit( &hex_ctx.cube, 512, 16, 32 );
|
||||
cubehashUpdate( &hex_ctx.cube, (const byte*)edata, 64 );
|
||||
cubehashUpdate( &hex_ctx.cube, edata, 64 );
|
||||
break;
|
||||
case HAMSI:
|
||||
sph_hamsi512_init( &hex_ctx.hamsi );
|
||||
|
Reference in New Issue
Block a user