Open mratsim opened 4 years ago
Original issue fixed but now there is a new one it's not a showstopper but always having to put the generic type is annoying and even if Arraymancer is clean, users proc can still trigger it: https://github.com/nim-lang/Nim/issues/13193
Laser-based tensors use either a raw pointer to be able to plug in buffers coming from external libraries (Numpy, PyTorch, Tensorflow) and also exchange buffer with zero-copy. Or they use a seq for Nim ref types or strings.
https://github.com/mratsim/Arraymancer/blob/d3f078a6e577b232e2b1c8973add319f285fdd9e/src/laser/tensor/datatypes.nim#L12-L30
Unfortunately supportsCopyMem doesn't work properly in type section, making Laser Dead On Arrival :/. https://github.com/nim-lang/Nim/issues/13095