This code works as desired in parallel. Thanks for the instructions.
proc column_load(prime, j, k, r: int) {.gcsafe.} =
{.gcsafe.}:
for ri in residues: # for each prime|residue pair
let prod = r * ri # compute res
Well you access a global with GC'ed memory. You can use something like this to
make the compiler shut up
var globalSeqHere: seq[int] = @[]
proc foo() {.gcsafe.} =
{.gcsafe.}:
for i in 0..
Yes, you are right -- it is possible to write Nim code that does not compile or
does not work as you expected.
But for most of us Nim seems to work well most of the time. When you do not
like Nim, why are you not just using another one, there are many interesting
languages available.
For your