diff --git a/main.go b/main.go index b3f7828..58f4999 100644 --- a/main.go +++ b/main.go @@ -89,7 +89,7 @@ func generatePrimesCPU(upperLimit int64, primes []int64, numRoutines int, progre fmt.Printf("Calculating with %d routines\n\n", numRoutines) - for i := (primes[len(primes) - 1] + 1); i <= upperLimit; i++ { + for i := (primes[len(primes) - 1] + 2); i <= upperLimit; i += 2 { select { case progress <- calculateProgress(6, upperLimit, 1, i): default: diff --git a/tensor.go b/tensor.go index 4948101..d1a2671 100644 --- a/tensor.go +++ b/tensor.go @@ -26,7 +26,7 @@ func generatePrimesGPU(upperLimit int64, primes []int64, progress chan float32) fmt.Printf("Calculating with tensorflow\n\n") - for i := (primes[len(primes) - 1] + 1); i <= upperLimit; i++ { + for i := (primes[len(primes) - 1] + 2); i <= upperLimit; i += 2 { select { case progress <- calculateProgress(6, upperLimit, 1, i): default: