Merge remote-tracking branch 'upstream/master'

master
Thomas Baumbach 2013-09-13 20:38:03 +02:00
commit 992c9cf1df
2 changed files with 5 additions and 5 deletions

View File

@ -1036,7 +1036,7 @@ bool CSieveOfEratosthenes::Weave()
// Apply the layer to the primary sieve arrays
if (nLayerSeq < nChainLength)
{
if (nLayerSeq < nBiTwinCC1Layers && nLayerSeq < nBiTwinCC2Layers)
if (nLayerSeq < nBiTwinCC2Layers)
{
for (unsigned int nWord = nMinWord; nWord < nMaxWord; nWord++)
{
@ -1045,7 +1045,7 @@ bool CSieveOfEratosthenes::Weave()
vfCompositeBiTwin[nWord] |= vfCompositeLayerCC1[nWord] | vfCompositeLayerCC2[nWord];
}
}
else if (nLayerSeq < nBiTwinCC2Layers)
else if (nLayerSeq < nBiTwinCC1Layers)
{
for (unsigned int nWord = nMinWord; nWord < nMaxWord; nWord++)
{
@ -1074,7 +1074,7 @@ bool CSieveOfEratosthenes::Weave()
sieve_word_t *vfExtCC1 = vfExtendedCompositeCunningham1 + nExtensionSeq * nCandidatesWords;
sieve_word_t *vfExtCC2 = vfExtendedCompositeCunningham2 + nExtensionSeq * nCandidatesWords;
sieve_word_t *vfExtTWN = vfExtendedCompositeBiTwin + nExtensionSeq * nCandidatesWords;
if (nLayerExtendedSeq < nBiTwinCC1Layers && nLayerExtendedSeq < nBiTwinCC2Layers)
if (nLayerExtendedSeq < nBiTwinCC2Layers)
{
for (unsigned int nWord = nExtMinWord; nWord < nMaxWord; nWord++)
{
@ -1083,7 +1083,7 @@ bool CSieveOfEratosthenes::Weave()
vfExtTWN[nWord] |= vfCompositeLayerCC1[nWord] | vfCompositeLayerCC2[nWord];
}
}
else if (nLayerExtendedSeq < nBiTwinCC2Layers)
else if (nLayerExtendedSeq < nBiTwinCC1Layers)
{
for (unsigned int nWord = nExtMinWord; nWord < nMaxWord; nWord++)
{

View File

@ -32,7 +32,7 @@ public:
extern std::vector<unsigned int> vPrimes;
static const unsigned int nMaxSieveExtensions = 20;
static const unsigned int nMinSieveExtensions = 0;
static const unsigned int nDefaultSieveExtensions = 6;
static const unsigned int nDefaultSieveExtensions = 9;
static const unsigned int nDefaultSieveExtensionsTestnet = 4;
extern unsigned int nSieveExtensions;
static const unsigned int nMaxSievePercentage = 100;