From cca7fa0f9516dfb8ef4bf6b13cbe47fc9874c514 Mon Sep 17 00:00:00 2001 From: datalore Date: Thu, 3 Oct 2024 13:20:59 +0200 Subject: [PATCH] fix(progress): Now calculating progress correctly in tensor --- tensor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: }