You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that I was playing around and noticed it:
I was unable to compile any of the examples. Sporadically I tested
import weave
funcinitialize(buffer: ptrUncheckedArray[float32], len: int) =for i in0..< len:
buffer[i] = i.float32proctranspose(M, N: int, bufIn, bufOut: ptrUncheckedArray[float32]) =## Transpose a MxN matrix into a NxM matrix with nested for loopsparallelFor j in0..< N:
captures: {M, N, bufIn, bufOut}
parallelFor i in0..< M:
captures: {j, M, N, bufIn, bufOut}
bufOut[j*M+i] = bufIn[i*N+j]
procmain() =let M =200let N =2000let input =newSeq[float32](M*N)
# We can't work with seq directly as it's managed by GC, take a ptr to the buffer.let bufIn =cast[ptrUncheckedArray[float32]](input[0].unsafeAddr)
bufIn.initialize(M*N)
var output =newSeq[float32](N*M)
let bufOut =cast[ptrUncheckedArray[float32]](output[0].addr)
init(Weave)
transpose(M, N, bufIn, bufOut)
exit(Weave)
main()
On nim 2.0.0, 2.0.4 and 1.6.20, all of them have various versions of compiler errors:
With 1.6.20: nim r -f --cc:clang -d:useMalloc --threads:on src/playground.nim:
Given that I was playing around and noticed it:
I was unable to compile any of the examples. Sporadically I tested
On nim 2.0.0, 2.0.4 and 1.6.20, all of them have various versions of compiler errors:
With 1.6.20:
nim r -f --cc:clang -d:useMalloc --threads:on src/playground.nim
:With 2.0.0:
nim r -f --cc:clang -d:useMalloc src/playground.nim
Similar issues appear with the other examples I sporadically tested, leading me to assume that none of them currently work.
The text was updated successfully, but these errors were encountered: