fix(progress): Now calculating progress correctly in tensor

This commit is contained in:
datalore 2024-10-03 13:20:59 +02:00
parent 1514bdb3fe
commit cca7fa0f95

View File

@ -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:
}