mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.8.3.1
This commit is contained in:
@@ -53,6 +53,7 @@ int scanhash_blake_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
@@ -126,7 +127,7 @@ int scanhash_blake_8way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 8; i++ )
|
for ( int i = 0; i < 8; i++ )
|
||||||
if ( (hash+i)[7] <= HTarget && fulltest( hash+i, ptarget ) )
|
if ( (hash+i)[7] <= HTarget && fulltest( hash+i, ptarget ) )
|
||||||
{
|
{
|
||||||
found[i] = true;
|
pdata[19] = n+i;
|
||||||
num_found++;
|
num_found++;
|
||||||
nonces[i] = n+i;
|
nonces[i] = n+i;
|
||||||
work_set_target_ratio( work, hash+1 );
|
work_set_target_ratio( work, hash+1 );
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ int scanhash_blake2s_8way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 8; i++ )
|
for ( int i = 0; i < 8; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
@@ -119,6 +120,7 @@ int scanhash_blake2s_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ int scanhash_blakecoin_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
@@ -124,6 +125,7 @@ int scanhash_blakecoin_8way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 8; i++ )
|
for ( int i = 0; i < 8; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ int scanhash_decred_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= HTarget && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[DECRED_NONCE_INDEX] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ int scanhash_myriad_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ int scanhash_jha_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( !( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( !( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ int scanhash_keccak_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & 0xFFFFFF00 ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & 0xFFFFFF00 ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ int scanhash_allium_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ int scanhash_lyra2h_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ int scanhash_lyra2rev2_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ int scanhash_lyra2z_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
@@ -197,6 +198,7 @@ int scanhash_lyra2z_8way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 8; i++ )
|
for ( int i = 0; i < 8; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,196 +0,0 @@
|
|||||||
/**
|
|
||||||
* Header file for Blake2b's internal permutation in the form of a sponge.
|
|
||||||
* This code is based on the original Blake2b's implementation provided by
|
|
||||||
* Samuel Neves (https://blake2.net/)
|
|
||||||
*
|
|
||||||
* Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014.
|
|
||||||
*
|
|
||||||
* This software is hereby placed in the public domain.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
|
|
||||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
||||||
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
||||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
||||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
#ifndef SPONGE_H_
|
|
||||||
#define SPONGE_H_
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "avxdefs.h"
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
#define ALIGN __attribute__ ((aligned(32)))
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#define ALIGN __declspec(align(32))
|
|
||||||
#else
|
|
||||||
#define ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*Blake2b IV Array*/
|
|
||||||
static const uint64_t blake2b_IV[8] =
|
|
||||||
{
|
|
||||||
0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL,
|
|
||||||
0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL,
|
|
||||||
0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL,
|
|
||||||
0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/*Blake2b's rotation*/
|
|
||||||
static inline uint64_t rotr64( const uint64_t w, const unsigned c ){
|
|
||||||
return ( w >> c ) | ( w << ( 64 - c ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined __AVX2__
|
|
||||||
// only available with avx2
|
|
||||||
|
|
||||||
// process 4 columns in parallel
|
|
||||||
// returns void, updates all args
|
|
||||||
#define G_4X64(a,b,c,d) \
|
|
||||||
a = _mm256_add_epi64( a, b ); \
|
|
||||||
d = mm256_rotr_64( _mm256_xor_si256( d, a), 32 ); \
|
|
||||||
c = _mm256_add_epi64( c, d ); \
|
|
||||||
b = mm256_rotr_64( _mm256_xor_si256( b, c ), 24 ); \
|
|
||||||
a = _mm256_add_epi64( a, b ); \
|
|
||||||
d = mm256_rotr_64( _mm256_xor_si256( d, a ), 16 ); \
|
|
||||||
c = _mm256_add_epi64( c, d ); \
|
|
||||||
b = mm256_rotr_64( _mm256_xor_si256( b, c ), 63 );
|
|
||||||
|
|
||||||
#define LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
G_4X64( s0, s1, s2, s3 ); \
|
|
||||||
s1 = mm256_rotr256_1x64( s1); \
|
|
||||||
s2 = mm256_swap_128( s2 ); \
|
|
||||||
s3 = mm256_rotl256_1x64( s3 ); \
|
|
||||||
G_4X64( s0, s1, s2, s3 ); \
|
|
||||||
s1 = mm256_rotl256_1x64( s1 ); \
|
|
||||||
s2 = mm256_swap_128( s2 ); \
|
|
||||||
s3 = mm256_rotr256_1x64( s3 );
|
|
||||||
|
|
||||||
#define LYRA_12_ROUNDS_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
LYRA_ROUND_AVX2( s0, s1, s2, s3 ) \
|
|
||||||
|
|
||||||
#else
|
|
||||||
// only available with avx
|
|
||||||
|
|
||||||
// process 2 columns in parallel
|
|
||||||
// returns void, all args updated
|
|
||||||
#define G_2X64(a,b,c,d) \
|
|
||||||
a = _mm_add_epi64( a, b ); \
|
|
||||||
d = mm_rotr_64( _mm_xor_si128( d, a), 32 ); \
|
|
||||||
c = _mm_add_epi64( c, d ); \
|
|
||||||
b = mm_rotr_64( _mm_xor_si128( b, c ), 24 ); \
|
|
||||||
a = _mm_add_epi64( a, b ); \
|
|
||||||
d = mm_rotr_64( _mm_xor_si128( d, a ), 16 ); \
|
|
||||||
c = _mm_add_epi64( c, d ); \
|
|
||||||
b = mm_rotr_64( _mm_xor_si128( b, c ), 63 );
|
|
||||||
|
|
||||||
#define LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
G_2X64( s0, s2, s4, s6 ); \
|
|
||||||
G_2X64( s1, s3, s5, s7 ); \
|
|
||||||
mm_rotl256_1x64( s2, s3 ); \
|
|
||||||
mm_swap_128( s4, s5 ); \
|
|
||||||
mm_rotr256_1x64( s6, s7 ); \
|
|
||||||
G_2X64( s0, s2, s4, s6 ); \
|
|
||||||
G_2X64( s1, s3, s5, s7 ); \
|
|
||||||
mm_rotr256_1x64( s2, s3 ); \
|
|
||||||
mm_swap_128( s4, s5 ); \
|
|
||||||
mm_rotl256_1x64( s6, s7 );
|
|
||||||
|
|
||||||
#define LYRA_12_ROUNDS_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
LYRA_ROUND_AVX(s0,s1,s2,s3,s4,s5,s6,s7) \
|
|
||||||
|
|
||||||
|
|
||||||
#endif // AVX2
|
|
||||||
|
|
||||||
// Scalar
|
|
||||||
//Blake2b's G function
|
|
||||||
#define G(r,i,a,b,c,d) \
|
|
||||||
do { \
|
|
||||||
a = a + b; \
|
|
||||||
d = rotr64(d ^ a, 32); \
|
|
||||||
c = c + d; \
|
|
||||||
b = rotr64(b ^ c, 24); \
|
|
||||||
a = a + b; \
|
|
||||||
d = rotr64(d ^ a, 16); \
|
|
||||||
c = c + d; \
|
|
||||||
b = rotr64(b ^ c, 63); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
|
|
||||||
/*One Round of the Blake2b's compression function*/
|
|
||||||
#define ROUND_LYRA(r) \
|
|
||||||
G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \
|
|
||||||
G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \
|
|
||||||
G(r,2,v[ 2],v[ 6],v[10],v[14]); \
|
|
||||||
G(r,3,v[ 3],v[ 7],v[11],v[15]); \
|
|
||||||
G(r,4,v[ 0],v[ 5],v[10],v[15]); \
|
|
||||||
G(r,5,v[ 1],v[ 6],v[11],v[12]); \
|
|
||||||
G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \
|
|
||||||
G(r,7,v[ 3],v[ 4],v[ 9],v[14]);
|
|
||||||
|
|
||||||
|
|
||||||
//---- Housekeeping
|
|
||||||
void initState( uint64_t state[/*16*/] );
|
|
||||||
|
|
||||||
//---- Squeezes
|
|
||||||
void squeeze( uint64_t *state, unsigned char *out, unsigned int len );
|
|
||||||
void reducedSqueezeRow0( uint64_t* state, uint64_t* row, uint64_t nCols );
|
|
||||||
|
|
||||||
//---- Absorbs
|
|
||||||
void absorbBlock( uint64_t *state, const uint64_t *in );
|
|
||||||
void absorbBlockBlake2Safe( uint64_t *state, const uint64_t *in );
|
|
||||||
|
|
||||||
//---- Duplexes
|
|
||||||
void reducedDuplexRow1( uint64_t *state, const uint64_t *rowIn,
|
|
||||||
uint64_t *rowOut, uint64_t nCols);
|
|
||||||
void reducedDuplexRowSetup( uint64_t *state, const uint64_t *rowIn,
|
|
||||||
uint64_t *rowInOut, uint64_t *rowOut, uint64_t nCols );
|
|
||||||
void reducedDuplexRow( uint64_t *state, const uint64_t *rowIn,
|
|
||||||
uint64_t *rowInOut, uint64_t *rowOut, uint64_t nCols );
|
|
||||||
|
|
||||||
//---- Misc
|
|
||||||
//void printArray(unsigned char *array, unsigned int size, char *name);
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
////TESTS////
|
|
||||||
//void reducedDuplexRowc(uint64_t *state, uint64_t *rowIn, uint64_t *rowInOut, uint64_t *rowOut);
|
|
||||||
//void reducedDuplexRowd(uint64_t *state, uint64_t *rowIn, uint64_t *rowInOut, uint64_t *rowOut);
|
|
||||||
//void reducedDuplexRowSetupv4(uint64_t *state, uint64_t *rowIn1, uint64_t *rowIn2, uint64_t *rowOut1, uint64_t *rowOut2);
|
|
||||||
//void reducedDuplexRowSetupv5(uint64_t *state, uint64_t *rowIn, uint64_t *rowInOut, uint64_t *rowOut);
|
|
||||||
//void reducedDuplexRowSetupv5c(uint64_t *state, uint64_t *rowIn, uint64_t *rowInOut, uint64_t *rowOut);
|
|
||||||
//void reducedDuplexRowSetupv5d(uint64_t *state, uint64_t *rowIn, uint64_t *rowInOut, uint64_t *rowOut);
|
|
||||||
/////////////
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* SPONGE_H_ */
|
|
||||||
@@ -126,6 +126,7 @@ int scanhash_nist5_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( !( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( !( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ int scanhash_anime_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ int scanhash_quark_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & 0xFFFFFF00 ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & 0xFFFFFF00 ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ int scanhash_qubit_2way( int thr_id, struct work *work,uint32_t max_nonce,
|
|||||||
}
|
}
|
||||||
if ( !( (hash+8)[7] & mask ) && fulltest( hash+8, ptarget) )
|
if ( !( (hash+8)[7] & mask ) && fulltest( hash+8, ptarget) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+1;
|
||||||
nonces[ num_found++ ] = n+1;
|
nonces[ num_found++ ] = n+1;
|
||||||
work_set_target_ratio( work, hash+8 );
|
work_set_target_ratio( work, hash+8 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ int scanhash_lbry_8way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 8; i++ )
|
for ( int i = 0; i < 8; i++ )
|
||||||
if ( !( (hash+(i<<3))[7] & mask ) && fulltest( hash+(i<<3), ptarget ) )
|
if ( !( (hash+(i<<3))[7] & mask ) && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[27] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
@@ -227,6 +228,7 @@ int scanhash_lbry_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( !( (hash+(i<<3))[7] & mask ) && fulltest( hash+(i<<3), ptarget ) )
|
if ( !( (hash+(i<<3))[7] & mask ) && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[27] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ int scanhash_skein_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ int scanhash_skein2_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ int scanhash_c11_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ int scanhash_timetravel_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ int scanhash_timetravel10_4way( int thr_id, struct work *work,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ int scanhash_tribus_4way(int thr_id, struct work *work, uint32_t max_nonce, uint
|
|||||||
if ( ( !( (hash+(i<<3))[7] & mask ) )
|
if ( ( !( (hash+(i<<3))[7] & mask ) )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ int scanhash_x11_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,6 +286,7 @@ int scanhash_x11evo_4way( int thr_id, struct work* work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & hmask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & hmask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ int scanhash_x11gost_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ int scanhash_x12_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ int scanhash_phi1612_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ int scanhash_skunk_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ int scanhash_x13_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ int scanhash_x13sm3_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ int scanhash_polytimos_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ int scanhash_veltor_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ int scanhash_x14_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ int scanhash_x15_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ int scanhash_x16r_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ int scanhash_x17_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
if ( ( ( (hash+(i<<3))[7] & mask ) == 0 )
|
||||||
&& fulltest( hash+(i<<3), ptarget ) )
|
&& fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,6 +411,7 @@ int scanhash_xevan_4way( int thr_id, struct work *work, uint32_t max_nonce,
|
|||||||
for ( int i = 0; i < 4; i++ )
|
for ( int i = 0; i < 4; i++ )
|
||||||
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
if ( (hash+(i<<3))[7] <= Htarg && fulltest( hash+(i<<3), ptarget ) )
|
||||||
{
|
{
|
||||||
|
pdata[19] = n+i;
|
||||||
nonces[ num_found++ ] = n+i;
|
nonces[ num_found++ ] = n+i;
|
||||||
work_set_target_ratio( work, hash+(i<<3) );
|
work_set_target_ratio( work, hash+(i<<3) );
|
||||||
}
|
}
|
||||||
|
|||||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.8.3.
|
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.8.4.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||||
@@ -577,8 +577,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='cpuminer-opt'
|
PACKAGE_NAME='cpuminer-opt'
|
||||||
PACKAGE_TARNAME='cpuminer-opt'
|
PACKAGE_TARNAME='cpuminer-opt'
|
||||||
PACKAGE_VERSION='3.8.3'
|
PACKAGE_VERSION='3.8.4'
|
||||||
PACKAGE_STRING='cpuminer-opt 3.8.3'
|
PACKAGE_STRING='cpuminer-opt 3.8.4'
|
||||||
PACKAGE_BUGREPORT=''
|
PACKAGE_BUGREPORT=''
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures cpuminer-opt 3.8.3 to adapt to many kinds of systems.
|
\`configure' configures cpuminer-opt 3.8.4 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1392,7 +1392,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of cpuminer-opt 3.8.3:";;
|
short | recursive ) echo "Configuration of cpuminer-opt 3.8.4:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1497,7 +1497,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
cpuminer-opt configure 3.8.3
|
cpuminer-opt configure 3.8.4
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by cpuminer-opt $as_me 3.8.3, which was
|
It was created by cpuminer-opt $as_me 3.8.4, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2981,7 +2981,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='cpuminer-opt'
|
PACKAGE='cpuminer-opt'
|
||||||
VERSION='3.8.3'
|
VERSION='3.8.4'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -6677,7 +6677,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by cpuminer-opt $as_me 3.8.3, which was
|
This file was extended by cpuminer-opt $as_me 3.8.4, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -6743,7 +6743,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
cpuminer-opt config.status 3.8.3
|
cpuminer-opt config.status 3.8.4
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([cpuminer-opt], [3.8.3])
|
AC_INIT([cpuminer-opt], [3.8.3.1])
|
||||||
|
|
||||||
AC_PREREQ([2.59c])
|
AC_PREREQ([2.59c])
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|||||||
36
cpu-miner.c
36
cpu-miner.c
@@ -140,6 +140,7 @@ bool opt_stratum_stats = false;
|
|||||||
|
|
||||||
uint32_t accepted_count = 0L;
|
uint32_t accepted_count = 0L;
|
||||||
uint32_t rejected_count = 0L;
|
uint32_t rejected_count = 0L;
|
||||||
|
uint32_t solved_count = 0L;
|
||||||
double *thr_hashrates;
|
double *thr_hashrates;
|
||||||
double *thr_hashcount;
|
double *thr_hashcount;
|
||||||
double global_hashcount = 0;
|
double global_hashcount = 0;
|
||||||
@@ -769,6 +770,8 @@ static int share_result( int result, struct work *work, const char *reason )
|
|||||||
float rate;
|
float rate;
|
||||||
char rate_s[8] = {0};
|
char rate_s[8] = {0};
|
||||||
double sharediff = work ? work->sharediff : stratum.sharediff;
|
double sharediff = work ? work->sharediff : stratum.sharediff;
|
||||||
|
bool solved = result && (net_diff > 0.0 ) && ( sharediff >= net_diff );
|
||||||
|
char sol[32] = {0};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pthread_mutex_lock(&stats_lock);
|
pthread_mutex_lock(&stats_lock);
|
||||||
@@ -778,6 +781,16 @@ static int share_result( int result, struct work *work, const char *reason )
|
|||||||
hashrate += thr_hashrates[i];
|
hashrate += thr_hashrates[i];
|
||||||
}
|
}
|
||||||
result ? accepted_count++ : rejected_count++;
|
result ? accepted_count++ : rejected_count++;
|
||||||
|
/*
|
||||||
|
if ( solved )
|
||||||
|
{
|
||||||
|
solved_count++;
|
||||||
|
if ( use_colors )
|
||||||
|
sprintf( sol, CL_GRN "Solved" CL_WHT " %d", solved_count );
|
||||||
|
else
|
||||||
|
sprintf( sol, "Solved %d", solved_count );
|
||||||
|
}
|
||||||
|
*/
|
||||||
pthread_mutex_unlock(&stats_lock);
|
pthread_mutex_unlock(&stats_lock);
|
||||||
global_hashcount = hashcount;
|
global_hashcount = hashcount;
|
||||||
global_hashrate = hashrate;
|
global_hashrate = hashrate;
|
||||||
@@ -787,9 +800,13 @@ static int share_result( int result, struct work *work, const char *reason )
|
|||||||
: ( 100. * rejected_count / total_submits ) );
|
: ( 100. * rejected_count / total_submits ) );
|
||||||
|
|
||||||
if (use_colors)
|
if (use_colors)
|
||||||
|
{
|
||||||
sres = (result ? CL_GRN "Accepted" CL_WHT : CL_RED "Rejected" CL_WHT );
|
sres = (result ? CL_GRN "Accepted" CL_WHT : CL_RED "Rejected" CL_WHT );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
sres = (result ? "Accepted" : "Rejected" );
|
sres = (result ? "Accepted" : "Rejected" );
|
||||||
|
}
|
||||||
|
|
||||||
// Contrary to rounding convention 100% means zero rejects, exactly 100%.
|
// Contrary to rounding convention 100% means zero rejects, exactly 100%.
|
||||||
// Rates > 99% and < 100% (rejects>0) display 99.9%.
|
// Rates > 99% and < 100% (rejects>0) display 99.9%.
|
||||||
@@ -844,13 +861,13 @@ static int share_result( int result, struct work *work, const char *reason )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if ((defined(_WIN64) || defined(__WINDOWS__)))
|
#if ((defined(_WIN64) || defined(__WINDOWS__)))
|
||||||
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g, %s %sH/s",
|
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g %s, %s %sH/s",
|
||||||
sres, ( result ? accepted_count : rejected_count ),
|
sres, ( result ? accepted_count : rejected_count ),
|
||||||
total_submits, rate_s, sharediff, hr, hr_units );
|
total_submits, rate_s, sharediff, sol, hr, hr_units );
|
||||||
#else
|
#else
|
||||||
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g, %s %sH/s, %dC",
|
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g %s, %s %sH/s, %dC",
|
||||||
sres, ( result ? accepted_count : rejected_count ),
|
sres, ( result ? accepted_count : rejected_count ),
|
||||||
total_submits, rate_s, sharediff, hr, hr_units,
|
total_submits, rate_s, sharediff, sol, hr, hr_units,
|
||||||
(uint32_t)cpu_temp(0) );
|
(uint32_t)cpu_temp(0) );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1549,6 +1566,7 @@ void SHA256_gen_merkle_root( char* merkle_root, struct stratum_ctx* sctx )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// default
|
||||||
void std_set_target( struct work* work, double job_diff )
|
void std_set_target( struct work* work, double job_diff )
|
||||||
{
|
{
|
||||||
work_set_target( work, job_diff / opt_diff_factor );
|
work_set_target( work, job_diff / opt_diff_factor );
|
||||||
@@ -1558,7 +1576,7 @@ void scrypt_set_target( struct work* work, double job_diff )
|
|||||||
{
|
{
|
||||||
work_set_target( work, job_diff / (65536.0 * opt_diff_factor) );
|
work_set_target( work, job_diff / (65536.0 * opt_diff_factor) );
|
||||||
}
|
}
|
||||||
|
// another popular choice.
|
||||||
void alt_set_target( struct work* work, double job_diff )
|
void alt_set_target( struct work* work, double job_diff )
|
||||||
{
|
{
|
||||||
work_set_target( work, job_diff / (256.0 * opt_diff_factor) );
|
work_set_target( work, job_diff / (256.0 * opt_diff_factor) );
|
||||||
@@ -1608,6 +1626,8 @@ void std_get_new_work( struct work* work, struct work* g_work, int thr_id,
|
|||||||
{
|
{
|
||||||
uint32_t *nonceptr = algo_gate.get_nonceptr( work->data );
|
uint32_t *nonceptr = algo_gate.get_nonceptr( work->data );
|
||||||
|
|
||||||
|
// This logic depends on expression short circuiting to prevent tripping
|
||||||
|
// over NULL job_id pointers when benchmarking.
|
||||||
if ( ( memcmp( work->data, g_work->data, algo_gate.work_cmp_size )
|
if ( ( memcmp( work->data, g_work->data, algo_gate.work_cmp_size )
|
||||||
&& clean_job )
|
&& clean_job )
|
||||||
|| ( *nonceptr >= *end_nonce_ptr )
|
|| ( *nonceptr >= *end_nonce_ptr )
|
||||||
@@ -1874,6 +1894,7 @@ static void *miner_thread( void *userdata )
|
|||||||
// if nonce(s) submit work
|
// if nonce(s) submit work
|
||||||
if ( nonce_found && !opt_benchmark )
|
if ( nonce_found && !opt_benchmark )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
int num_submitted = 0;
|
int num_submitted = 0;
|
||||||
|
|
||||||
for ( int n = 0; n < nonce_found; n++ )
|
for ( int n = 0; n < nonce_found; n++ )
|
||||||
@@ -1893,13 +1914,14 @@ static void *miner_thread( void *userdata )
|
|||||||
// must be a one way algo, nonce is already in work data
|
// must be a one way algo, nonce is already in work data
|
||||||
if ( !num_submitted )
|
if ( !num_submitted )
|
||||||
{
|
{
|
||||||
|
*/
|
||||||
if ( !submit_work( mythr, &work ) )
|
if ( !submit_work( mythr, &work ) )
|
||||||
{
|
{
|
||||||
applog( LOG_WARNING, "Failed to submit share." );
|
applog( LOG_WARNING, "Failed to submit share." );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
applog( LOG_NOTICE, "Share submitted." );
|
applog( LOG_NOTICE, "Share submitted." );
|
||||||
}
|
// }
|
||||||
|
|
||||||
// prevent stale work in solo
|
// prevent stale work in solo
|
||||||
// we can't submit twice a block!
|
// we can't submit twice a block!
|
||||||
@@ -2359,7 +2381,7 @@ static void *stratum_thread(void *userdata )
|
|||||||
if ( !opt_quiet )
|
if ( !opt_quiet )
|
||||||
{
|
{
|
||||||
if (net_diff > 0.)
|
if (net_diff > 0.)
|
||||||
applog(LOG_BLUE, "%s block %d, diff %.3f",
|
applog(LOG_BLUE, "%s block %d, network diff %.3f",
|
||||||
algo_names[opt_algo], stratum.bloc_height, net_diff);
|
algo_names[opt_algo], stratum.bloc_height, net_diff);
|
||||||
else
|
else
|
||||||
applog(LOG_BLUE, "%s %s block %d", short_url,
|
applog(LOG_BLUE, "%s %s block %d", short_url,
|
||||||
|
|||||||
Reference in New Issue
Block a user