repa-3.4.1.4: High performance, regular, shape polymorphic parallel arrays.

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Repr.Unboxed

Synopsis

Documentation

data U #

Unboxed arrays are represented as unboxed vectors.

The implementation uses Data.Vector.Unboxed which is based on type families and picks an efficient, specialised representation for every element type. In particular, unboxed vectors of pairs are represented as pairs of unboxed vectors. This is the most efficient representation for numerical data.

Instances
Unbox a => Source U a #

Read elements from an unboxed vector array.

Instance details

Defined in Data.Array.Repa.Repr.Unboxed

Associated Types

data Array U sh a :: Type #

Methods

extent :: Shape sh => Array U sh a -> sh #

index :: Shape sh => Array U sh a -> sh -> a #

unsafeIndex :: Shape sh => Array U sh a -> sh -> a #

linearIndex :: Shape sh => Array U sh a -> Int -> a #

unsafeLinearIndex :: Shape sh => Array U sh a -> Int -> a #

deepSeqArray :: Shape sh => Array U sh a -> b -> b #

Unbox e => Target U e #

Filling of unboxed vector arrays.

Instance details

Defined in Data.Array.Repa.Repr.Unboxed

Associated Types

data MVec U e :: Type #

Methods

newMVec :: Int -> IO (MVec U e) #

unsafeWriteMVec :: MVec U e -> Int -> e -> IO () #

unsafeFreezeMVec :: sh -> MVec U e -> IO (Array U sh e) #

deepSeqMVec :: MVec U e -> a -> a #

touchMVec :: MVec U e -> IO () #

Unbox a => Structured U a b # 
Instance details

Defined in Data.Array.Repa.Operators.Mapping

Associated Types

type TR U :: Type #

Methods

smap :: Shape sh => (a -> b) -> Array U sh a -> Array (TR U) sh b #

szipWith :: (Shape sh, Source r c) => (c -> a -> b) -> Array r sh c -> Array U sh a -> Array (TR U) sh b #

(Read sh, Read e, Unbox e) => Read (Array U sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

Methods

readsPrec :: Int -> ReadS (Array U sh e) #

readList :: ReadS [Array U sh e] #

readPrec :: ReadPrec (Array U sh e) #

readListPrec :: ReadPrec [Array U sh e] #

(Show sh, Show e, Unbox e) => Show (Array U sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

Methods

showsPrec :: Int -> Array U sh e -> ShowS #

show :: Array U sh e -> String #

showList :: [Array U sh e] -> ShowS #

(Arbitrary sh, Arbitrary a, Unbox a, Shape sh) => Arbitrary (Array U sh a) # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

arbitrary :: Gen (Array U sh a) #

shrink :: Array U sh a -> [Array U sh a] #

data Array U sh a # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

data Array U sh a = AUnboxed !sh !(Vector a)
data MVec U e # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

data MVec U e = UMVec (IOVector e)
type TR U # 
Instance details

Defined in Data.Array.Repa.Operators.Mapping

type TR U = D

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

Instances
Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox () 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Complex a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b) => Unbox (a, b) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c) => Unbox (a, b, c) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d) => Unbox (a, b, c, d) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Unbox (a, b, c, d, e) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Unbox (a, b, c, d, e, f) 
Instance details

Defined in Data.Vector.Unboxed.Base

data family Array r sh e #

Instances
(Shape sh, Eq sh, Source r a, Eq a) => Eq (Array r sh a) # 
Instance details

Defined in Data.Array.Repa.Operators.Reduction

Methods

(==) :: Array r sh a -> Array r sh a -> Bool #

(/=) :: Array r sh a -> Array r sh a -> Bool #

Read (Array r1 sh e) => Read (Array (S r1) sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.HintSmall

Methods

readsPrec :: Int -> ReadS (Array (S r1) sh e) #

readList :: ReadS [Array (S r1) sh e] #

readPrec :: ReadPrec (Array (S r1) sh e) #

readListPrec :: ReadPrec [Array (S r1) sh e] #

Read (Array r1 sh e) => Read (Array (I r1) sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.HintInterleave

Methods

readsPrec :: Int -> ReadS (Array (I r1) sh e) #

readList :: ReadS [Array (I r1) sh e] #

readPrec :: ReadPrec (Array (I r1) sh e) #

readListPrec :: ReadPrec [Array (I r1) sh e] #

Read sh => Read (Array B sh Word8) # 
Instance details

Defined in Data.Array.Repa.Repr.ByteString

(Read sh, Read e) => Read (Array V sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Vector

Methods

readsPrec :: Int -> ReadS (Array V sh e) #

readList :: ReadS [Array V sh e] #

readPrec :: ReadPrec (Array V sh e) #

readListPrec :: ReadPrec [Array V sh e] #

Read sh => Read (Array X sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Undefined

Methods

readsPrec :: Int -> ReadS (Array X sh e) #

readList :: ReadS [Array X sh e] #

readPrec :: ReadPrec (Array X sh e) #

readListPrec :: ReadPrec [Array X sh e] #

(Read sh, Read e, Unbox e) => Read (Array U sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

Methods

readsPrec :: Int -> ReadS (Array U sh e) #

readList :: ReadS [Array U sh e] #

readPrec :: ReadPrec (Array U sh e) #

readListPrec :: ReadPrec [Array U sh e] #

Show (Array r1 sh e) => Show (Array (S r1) sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.HintSmall

Methods

showsPrec :: Int -> Array (S r1) sh e -> ShowS #

show :: Array (S r1) sh e -> String #

showList :: [Array (S r1) sh e] -> ShowS #

Show (Array r1 sh e) => Show (Array (I r1) sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.HintInterleave

Methods

showsPrec :: Int -> Array (I r1) sh e -> ShowS #

show :: Array (I r1) sh e -> String #

showList :: [Array (I r1) sh e] -> ShowS #

Show sh => Show (Array B sh Word8) # 
Instance details

Defined in Data.Array.Repa.Repr.ByteString

Methods

showsPrec :: Int -> Array B sh Word8 -> ShowS #

show :: Array B sh Word8 -> String #

showList :: [Array B sh Word8] -> ShowS #

(Show sh, Show e) => Show (Array V sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Vector

Methods

showsPrec :: Int -> Array V sh e -> ShowS #

show :: Array V sh e -> String #

showList :: [Array V sh e] -> ShowS #

Show sh => Show (Array X sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Undefined

Methods

showsPrec :: Int -> Array X sh e -> ShowS #

show :: Array X sh e -> String #

showList :: [Array X sh e] -> ShowS #

(Show sh, Show e, Unbox e) => Show (Array U sh e) # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

Methods

showsPrec :: Int -> Array U sh e -> ShowS #

show :: Array U sh e -> String #

showList :: [Array U sh e] -> ShowS #

(Arbitrary sh, Arbitrary a, Shape sh) => Arbitrary (Array V sh a) # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

arbitrary :: Gen (Array V sh a) #

shrink :: Array V sh a -> [Array V sh a] #

(Arbitrary sh, Arbitrary a, Unbox a, Shape sh) => Arbitrary (Array U sh a) # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

arbitrary :: Gen (Array U sh a) #

shrink :: Array U sh a -> [Array U sh a] #

(CoArbitrary sh, CoArbitrary a, Source r a, Shape sh) => CoArbitrary (Array r sh a) # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

coarbitrary :: Array r sh a -> Gen b -> Gen b #

data Array D sh a # 
Instance details

Defined in Data.Array.Repa.Repr.Delayed

data Array D sh a = ADelayed !sh (sh -> a)
data Array F sh a # 
Instance details

Defined in Data.Array.Repa.Repr.ForeignPtr

data Array F sh a = AForeignPtr !sh !Int !(ForeignPtr a)
data Array V sh a # 
Instance details

Defined in Data.Array.Repa.Repr.Vector

data Array V sh a = AVector !sh !(Vector a)
data Array X sh e # 
Instance details

Defined in Data.Array.Repa.Repr.Undefined

data Array X sh e = AUndefined !sh
data Array C sh a # 
Instance details

Defined in Data.Array.Repa.Repr.Cursored

data Array C sh a where
data Array U sh a # 
Instance details

Defined in Data.Array.Repa.Repr.Unboxed

data Array U sh a = AUnboxed !sh !(Vector a)
data Array B sh Word8 # 
Instance details

Defined in Data.Array.Repa.Repr.ByteString

data Array (S r1) sh a # 
Instance details

Defined in Data.Array.Repa.Repr.HintSmall

data Array (S r1) sh a = ASmall !(Array r1 sh a)
data Array (I r1) sh a # 
Instance details

Defined in Data.Array.Repa.Repr.HintInterleave

data Array (I r1) sh a = AInterleave !(Array r1 sh a)
data Array (P r1 r2) sh e # 
Instance details

Defined in Data.Array.Repa.Repr.Partitioned

data Array (P r1 r2) sh e = APart !sh !(Range sh) !(Array r1 sh e) !(Array r2 sh e)

computeUnboxedS :: (Load r1 sh e, Unbox e) => Array r1 sh e -> Array U sh e #

Sequential computation of array elements..

  • This is an alias for computeS with a more specific type.

computeUnboxedP :: (Load r1 sh e, Monad m, Unbox e) => Array r1 sh e -> m (Array U sh e) #

Parallel computation of array elements.

  • This is an alias for computeP with a more specific type.

fromListUnboxed :: (Shape sh, Unbox a) => sh -> [a] -> Array U sh a #

O(n). Convert a list to an unboxed vector array.

  • This is an alias for fromList with a more specific type.

fromUnboxed :: sh -> Vector e -> Array U sh e #

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

toUnboxed :: Array U sh e -> Vector e #

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

zip :: (Shape sh, Unbox a, Unbox b) => Array U sh a -> Array U sh b -> Array U sh (a, b) #

O(1). Zip some unboxed arrays. The shapes must be identical else error.

zip3 :: (Shape sh, Unbox a, Unbox b, Unbox c) => Array U sh a -> Array U sh b -> Array U sh c -> Array U sh (a, b, c) #

O(1). Zip some unboxed arrays. The shapes must be identical else error.

zip4 :: (Shape sh, Unbox a, Unbox b, Unbox c, Unbox d) => Array U sh a -> Array U sh b -> Array U sh c -> Array U sh d -> Array U sh (a, b, c, d) #

O(1). Zip some unboxed arrays. The shapes must be identical else error.

zip5 :: (Shape sh, Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Array U sh a -> Array U sh b -> Array U sh c -> Array U sh d -> Array U sh e -> Array U sh (a, b, c, d, e) #

O(1). Zip some unboxed arrays. The shapes must be identical else error.

zip6 :: (Shape sh, Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Array U sh a -> Array U sh b -> Array U sh c -> Array U sh d -> Array U sh e -> Array U sh f -> Array U sh (a, b, c, d, e, f) #

O(1). Zip some unboxed arrays. The shapes must be identical else error.

unzip :: (Unbox a, Unbox b) => Array U sh (a, b) -> (Array U sh a, Array U sh b) #

O(1). Unzip an unboxed array.

unzip3 :: (Unbox a, Unbox b, Unbox c) => Array U sh (a, b, c) -> (Array U sh a, Array U sh b, Array U sh c) #

O(1). Unzip an unboxed array.

unzip4 :: (Unbox a, Unbox b, Unbox c, Unbox d) => Array U sh (a, b, c, d) -> (Array U sh a, Array U sh b, Array U sh c, Array U sh d) #

O(1). Unzip an unboxed array.

unzip5 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Array U sh (a, b, c, d, e) -> (Array U sh a, Array U sh b, Array U sh c, Array U sh d, Array U sh e) #

O(1). Unzip an unboxed array.

unzip6 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Array U sh (a, b, c, d, e, f) -> (Array U sh a, Array U sh b, Array U sh c, Array U sh d, Array U sh e, Array U sh f) #

O(1). Unzip an unboxed array.