diff --git a/tensor.go b/tensor.go index d1a2671..fc1d86f 100644 --- a/tensor.go +++ b/tensor.go @@ -26,9 +26,10 @@ func generatePrimesGPU(upperLimit int64, primes []int64, progress chan float32) fmt.Printf("Calculating with tensorflow\n\n") - for i := (primes[len(primes) - 1] + 2); i <= upperLimit; i += 2 { + continueFrom := primes[len(primes) - 1] + 2 + for i := continueFrom; i <= upperLimit; i += 2 { select { - case progress <- calculateProgress(6, upperLimit, 1, i): + case progress <- calculateProgress(continueFrom, upperLimit, i): default: }