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

Safe HaskellNone
LanguageHaskell98

Data.Repa.Array.Material.Unboxed

Contents

Synopsis

Documentation

data U Source

Layout an array as a flat vector of unboxed elements.

This is the most efficient representation for numerical data.

The implementation uses Data.Vector.Unboxed which picks an efficient, specialised representation for every element type. In particular, unboxed vectors of pairs are represented as pairs of unboxed vectors.

UNSAFE: Indexing into raw material arrays is not bounds checked. You may want to wrap this with a Checked layout as well.

Constructors

Unboxed 

Fields

unboxedLength :: !Int
 

Instances

Eq U 
Show U 
Layout U

Unboxed arrays.

Unbox a => Bulk U a

Unboxed arrays.

Unbox a => Windowable U a

Windowing Unboxed arrays.

Unbox a => Target U a

Unboxed buffers.

Eq (Name U) 
Show (Name U) 
(Show a, Unbox a) => Show (Array U a) 
Unpack (Array U a) (Vector a) 
Unpack (Buffer s U a) (MVector s a) 
data Name U = U 
type Index U = Int 
data Array U = UArray !(Vector a) 
data Buffer s U a = UBuffer !(MVector s a) 

class (Vector Vector a, MVector MVector a) => Unbox a

Instances

Unbox Bool 
Unbox Char 
Unbox Double 
Unbox Float 
Unbox Int 
Unbox Int8 
Unbox Int16 
Unbox Int32 
Unbox Int64 
Unbox Word 
Unbox Word8 
Unbox Word16 
Unbox Word32 
Unbox Word64 
Unbox () 
(RealFloat a, Unbox a) => Unbox (Complex a) 
(Unbox a, Unbox b) => Unbox (a, b) 
(Unbox a, Unbox b, Unbox c) => Unbox (a, b, c) 
(Unbox a, Unbox b, Unbox c, Unbox d) => Unbox (a, b, c, d) 
(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Unbox (a, b, c, d, e) 
(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Unbox (a, b, c, d, e, f) 

Conversions

fromUnboxed :: Unbox a => Vector a -> Array U a Source

O(1). Wrap an unboxed vector as an array.

toUnboxed :: Unbox a => Array U a -> Vector a Source

O(1). Unwrap an unboxed vector from an array.