fix(progress): Now calculating progress correctly in tensor
This commit is contained in:
parent
1514bdb3fe
commit
cca7fa0f95
@ -26,9 +26,10 @@ func generatePrimesGPU(upperLimit int64, primes []int64, progress chan float32)
|
|||||||
|
|
||||||
fmt.Printf("Calculating with tensorflow\n\n")
|
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 {
|
select {
|
||||||
case progress <- calculateProgress(6, upperLimit, 1, i):
|
case progress <- calculateProgress(continueFrom, upperLimit, i):
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user