
21 Nov
2013
21 Nov
'13
10:52 a.m.
On 21 November 2013 16:25, Ryan Newton
[@Aleksey] Very good point! I'd missed that vector does the SOA->AOS business too. (I thought that was just Repa & Accelerate.)
In any case, an unboxed vector of tuples can't actually support atomic CAS anyway, so not supporting it is inevitable. It does mean that exposeMutableByteArray can't be a method of the Unbox class. It would need to be another class capturing the subset of vector types that are "Atomic" (support concurrent/atomic memory ops).
Data.Vector.Primitive? Uboxed vectors for doubles/ints/etc are just newtype wrapper over primitive vectors AFAIR. So we probably only need ability to coerce unboxed vector to primitive ones..