repa-array-4.0.0.2: Bulk array representations and operators.

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Repa.Fusion.Unpack

Synopsis

Documentation

class Unpack a t | a -> t where Source

Unpack the pieces of a structure into a tuple.

This is used in a low-level fusion optimisation to ensure that intermediate values are unboxed.

Methods

unpack :: a -> t Source

repack :: a -> t -> a Source

Instances

Unpack (Array F a) (Vector a) 
Unpack (Array U a) (Vector a) 
Unpack (Buffer s B a) (MVector s a) 
Unpack (Buffer s F a) (MVector s a)

Unpack Foreign buffers

Unpack (Buffer s U a) (MVector s a) 
Unpack (Buffer s r a) tBuf => Unpack (Buffer s (E r l) a) (l, tBuf) 
(Unpack (Buffer s r1 a) t1, Unpack (Buffer s r2 b) t2) => Unpack (Buffer s (T2 r1 r2) (a, b)) (t1, t2)