This commit is contained in:
Jay D Dee
2019-06-26 14:16:01 -04:00
parent d6e8d7a46e
commit 0d48d573ce
174 changed files with 1352 additions and 1556 deletions

View File

@@ -87,18 +87,18 @@ void x11evo_4way_hash( void *state, const void *input )
case 0:
blake512_4way( &ctx.blake, input, 80 );
blake512_4way_close( &ctx.blake, vhash );
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
break;
case 1:
bmw512_4way( &ctx.bmw, vhash, 64 );
bmw512_4way_close( &ctx.bmw, vhash );
if ( i >= len-1 )
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
break;
case 2:
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
update_and_final_groestl( &ctx.groestl, (char*)hash0,
(char*)hash0, 512 );
@@ -112,46 +112,46 @@ void x11evo_4way_hash( void *state, const void *input )
update_and_final_groestl( &ctx.groestl, (char*)hash3,
(char*)hash3, 512 );
if ( i < len-1 )
mm256_interleave_4x64( vhash,
mm256_intrlv_4x64( vhash,
hash0, hash1, hash2, hash3, 64<<3 );
break;
case 3:
skein512_4way( &ctx.skein, vhash, 64 );
skein512_4way_close( &ctx.skein, vhash );
if ( i >= len-1 )
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
break;
case 4:
jh512_4way( &ctx.jh, vhash, 64 );
jh512_4way_close( &ctx.jh, vhash );
if ( i >= len-1 )
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
break;
case 5:
keccak512_4way( &ctx.keccak, vhash, 64 );
keccak512_4way_close( &ctx.keccak, vhash );
if ( i >= len-1 )
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
break;
case 6:
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
mm256_interleave_2x128( vhash, hash0, hash1, 64<<3 );
mm256_intrlv_2x128( vhash, hash0, hash1, 64<<3 );
luffa_2way_update_close( &ctx.luffa, vhash, vhash, 64 );
mm256_deinterleave_2x128( hash0, hash1, vhash, 64<<3 );
mm256_interleave_2x128( vhash, hash2, hash3, 64<<3 );
mm256_dintrlv_2x128( hash0, hash1, vhash, 64<<3 );
mm256_intrlv_2x128( vhash, hash2, hash3, 64<<3 );
luffa_2way_init( &ctx.luffa, 512 );
luffa_2way_update_close( &ctx.luffa, vhash, vhash, 64 );
mm256_deinterleave_2x128( hash2, hash3, vhash, 64<<3 );
mm256_dintrlv_2x128( hash2, hash3, vhash, 64<<3 );
if ( i < len-1 )
mm256_interleave_4x64( vhash,
mm256_intrlv_4x64( vhash,
hash0, hash1, hash2, hash3, 64<<3 );
break;
case 7:
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
cubehashUpdateDigest( &ctx.cube, (byte*)hash0,
(const byte*) hash0, 64 );
@@ -165,11 +165,11 @@ void x11evo_4way_hash( void *state, const void *input )
cubehashUpdateDigest( &ctx.cube, (byte*)hash3,
(const byte*) hash3, 64 );
if ( i < len-1 )
mm256_interleave_4x64( vhash,
mm256_intrlv_4x64( vhash,
hash0, hash1, hash2, hash3, 64<<3 );
break;
case 8:
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
sph_shavite512( &ctx.shavite, hash0, 64 );
sph_shavite512_close( &ctx.shavite, hash0 );
@@ -186,25 +186,25 @@ void x11evo_4way_hash( void *state, const void *input )
sph_shavite512( &ctx.shavite, hash3, 64 );
sph_shavite512_close( &ctx.shavite, hash3 );
if ( i < len-1 )
mm256_interleave_4x64( vhash,
mm256_intrlv_4x64( vhash,
hash0, hash1, hash2, hash3, 64<<3 );
break;
case 9:
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
mm256_interleave_2x128( vhash, hash0, hash1, 64<<3 );
mm256_intrlv_2x128( vhash, hash0, hash1, 64<<3 );
simd_2way_update_close( &ctx.simd, vhash, vhash, 64<<3 );
mm256_deinterleave_2x128( hash0, hash1, vhash, 64<<3 );
mm256_interleave_2x128( vhash, hash2, hash3, 64<<3 );
mm256_dintrlv_2x128( hash0, hash1, vhash, 64<<3 );
mm256_intrlv_2x128( vhash, hash2, hash3, 64<<3 );
simd_2way_init( &ctx.simd, 512 );
simd_2way_update_close( &ctx.simd, vhash, vhash, 64<<3 );
mm256_deinterleave_2x128( hash2, hash3, vhash, 64<<3 );
mm256_dintrlv_2x128( hash2, hash3, vhash, 64<<3 );
if ( i < len-1 )
mm256_interleave_4x64( vhash,
mm256_intrlv_4x64( vhash,
hash0, hash1, hash2, hash3, 64<<3 );
break;
case 10:
mm256_deinterleave_4x64( hash0, hash1, hash2, hash3,
mm256_dintrlv_4x64( hash0, hash1, hash2, hash3,
vhash, 64<<3 );
update_final_echo( &ctx.echo, (BitSequence *)hash0,
(const BitSequence *) hash0, 512 );
@@ -218,7 +218,7 @@ void x11evo_4way_hash( void *state, const void *input )
update_final_echo( &ctx.echo, (BitSequence *)hash3,
(const BitSequence *) hash3, 512 );
if ( i < len-1 )
mm256_interleave_4x64( vhash,
mm256_intrlv_4x64( vhash,
hash0, hash1, hash2, hash3, 64<<3 );
break;
}
@@ -232,8 +232,8 @@ void x11evo_4way_hash( void *state, const void *input )
//static const uint32_t diff1targ = 0x0000ffff;
int scanhash_x11evo_4way( int thr_id, struct work* work, uint32_t max_nonce,
uint64_t *hashes_done )
int scanhash_x11evo_4way( struct work* work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr )
{
uint32_t hash[4*8] __attribute__ ((aligned (64)));
uint32_t vdata[24*4] __attribute__ ((aligned (64)));
@@ -242,8 +242,7 @@ int scanhash_x11evo_4way( int thr_id, struct work* work, uint32_t max_nonce,
uint32_t *ptarget = work->target;
uint32_t n = pdata[19];
const uint32_t first_nonce = pdata[19];
uint32_t *nonces = work->nonces;
int num_found = 0;
int thr_id = mythr->id; // thr_id arg is deprecated
uint32_t *noncep = vdata + 73; // 9*8 + 1
const uint32_t Htarg = ptarget[7];
@@ -270,7 +269,7 @@ int scanhash_x11evo_4way( int thr_id, struct work* work, uint32_t max_nonce,
}
uint64_t *edata = (uint64_t*)endiandata;
mm256_interleave_4x64( (uint64_t*)vdata, edata, edata, edata, edata, 640 );
mm256_intrlv_4x64( (uint64_t*)vdata, edata, edata, edata, edata, 640 );
do
{
@@ -284,18 +283,16 @@ int scanhash_x11evo_4way( int thr_id, struct work* work, uint32_t max_nonce,
for ( int i = 0; i < 4; i++ )
if ( ( ( (hash+(i<<3))[7] & hmask ) == 0 )
&& fulltest( hash+(i<<3), ptarget ) )
&& fulltest( hash+(i<<3), ptarget ) && !opt_benchmark )
{
pdata[19] = n+i;
nonces[ num_found++ ] = n+i;
work_set_target_ratio( work, hash+(i<<3) );
submit_lane_solution( work, hash+(i<<3), mythr, i );
}
n += 4;
} while ( ( num_found == 0 ) && ( n < max_nonce )
&& !work_restart[thr_id].restart );
} while ( ( n < max_nonce ) && !work_restart[thr_id].restart );
*hashes_done = n - first_nonce + 1;
return num_found;
return 0;
}
#endif