Copyright | (c) Alexey Kuleshevich 2018 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data family Array r ix e :: *
- type family Elt r ix e :: * where ...
- type family EltRepr r ix :: *
- class (Typeable r, Index ix) => Construct r ix e
- class Size r ix e => Source r ix e
- class Size r ix e => Load r ix e where
- loadS :: Monad m => Array r ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m ()
- loadP :: [Int] -> Array r ix e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO ()
- loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride ix -> Sz ix -> Array r ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m ()
- loadArray :: Monad m => Int -> (m () -> m ()) -> Array r ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m ()
- class Construct r ix e => Size r ix e
- class Size r ix e => Slice r ix e
- class OuterSlice r ix e where
- outerLength :: Array r ix e -> Int
- class Size r ix e => InnerSlice r ix e
- class Source r ix e => Manifest r ix e
- class Manifest r ix e => Mutable r ix e
- class Construct r ix e => Ragged r ix e where
- empty :: Comp -> Array r ix e
- isNull :: Array r ix e -> Bool
- cons :: Elt r ix e -> Array r ix e -> Array r ix e
- uncons :: Array r ix e -> Maybe (Elt r ix e, Array r ix e)
- edgeSize :: Array r ix e -> Sz ix
- flatten :: Array r ix e -> Array r Ix1 e
- loadRagged :: (IO () -> IO ()) -> (Int -> e -> IO a) -> Int -> Int -> ix -> Array r ix e -> IO ()
- raggedFormat :: (e -> String) -> String -> Array r ix e -> String
- class Nested r ix e where
- fromNested :: NestedStruct r ix e -> Array r ix e
- toNested :: Array r ix e -> NestedStruct r ix e
- type family NestedStruct r ix e :: *
- data L = L
- data LN
- type family ListItem ix e :: * where ...
- data Comp where
- pattern Par :: Comp
- module Data.Massiv.Core.Index
Documentation
data family Array r ix e :: * Source #
The array family. Representations r
describes how data is arranged or computed. All arrays
have a common property that each index ix
always maps to the same unique element, even if that
element does not exist in memory and has to be computed upon lookup. Data is always arranged in a
nested fasion, depth of which is controlled by
.Rank
ix
Instances
Functor (Array D ix) Source # | |
Functor (Array DW ix) Source # | |
Functor (Array DI ix) Source # | |
Index ix => Applicative (Array D ix) Source # | |
Defined in Data.Massiv.Array.Delayed.Internal | |
Index ix => Foldable (Array D ix) Source # | Row-major sequential folding over a Delayed array. |
Defined in Data.Massiv.Array.Delayed.Internal fold :: Monoid m => Array D ix m -> m # foldMap :: Monoid m => (a -> m) -> Array D ix a -> m # foldr :: (a -> b -> b) -> b -> Array D ix a -> b # foldr' :: (a -> b -> b) -> b -> Array D ix a -> b # foldl :: (b -> a -> b) -> b -> Array D ix a -> b # foldl' :: (b -> a -> b) -> b -> Array D ix a -> b # foldr1 :: (a -> a -> a) -> Array D ix a -> a # foldl1 :: (a -> a -> a) -> Array D ix a -> a # toList :: Array D ix a -> [a] # null :: Array D ix a -> Bool # length :: Array D ix a -> Int # elem :: Eq a => a -> Array D ix a -> Bool # maximum :: Ord a => Array D ix a -> a # minimum :: Ord a => Array D ix a -> a # | |
Index ix => Foldable (Array M ix) Source # | Row-major sequential folding over a Manifest array. |
Defined in Data.Massiv.Array.Manifest.Internal fold :: Monoid m => Array M ix m -> m # foldMap :: Monoid m => (a -> m) -> Array M ix a -> m # foldr :: (a -> b -> b) -> b -> Array M ix a -> b # foldr' :: (a -> b -> b) -> b -> Array M ix a -> b # foldl :: (b -> a -> b) -> b -> Array M ix a -> b # foldl' :: (b -> a -> b) -> b -> Array M ix a -> b # foldr1 :: (a -> a -> a) -> Array M ix a -> a # foldl1 :: (a -> a -> a) -> Array M ix a -> a # toList :: Array M ix a -> [a] # null :: Array M ix a -> Bool # length :: Array M ix a -> Int # elem :: Eq a => a -> Array M ix a -> Bool # maximum :: Ord a => Array M ix a -> a # minimum :: Ord a => Array M ix a -> a # | |
Index ix => Foldable (Array B ix) Source # | Row-major sequential folding over a Boxed array. |
Defined in Data.Massiv.Array.Manifest.Boxed fold :: Monoid m => Array B ix m -> m # foldMap :: Monoid m => (a -> m) -> Array B ix a -> m # foldr :: (a -> b -> b) -> b -> Array B ix a -> b # foldr' :: (a -> b -> b) -> b -> Array B ix a -> b # foldl :: (b -> a -> b) -> b -> Array B ix a -> b # foldl' :: (b -> a -> b) -> b -> Array B ix a -> b # foldr1 :: (a -> a -> a) -> Array B ix a -> a # foldl1 :: (a -> a -> a) -> Array B ix a -> a # toList :: Array B ix a -> [a] # null :: Array B ix a -> Bool # length :: Array B ix a -> Int # elem :: Eq a => a -> Array B ix a -> Bool # maximum :: Ord a => Array B ix a -> a # minimum :: Ord a => Array B ix a -> a # | |
Nested LN ix e => IsList (Array L ix e) Source # | |
Nested LN ix e => IsList (Array LN ix e) Source # | |
(Unbox e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array U ix e) Source # | |
(Storable e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array S ix e) Source # | |
(Prim e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array P ix e) Source # | |
(NFData e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array N ix e) Source # | |
(IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array B ix e) Source # | |
(Eq e, Index ix) => Eq (Array D ix e) Source # | |
(Eq e, Index ix) => Eq (Array M ix e) Source # | |
(Unbox e, Eq e, Index ix) => Eq (Array U ix e) Source # | |
(Storable e, Eq e, Index ix) => Eq (Array S ix e) Source # | |
(Prim e, Eq e, Index ix) => Eq (Array P ix e) Source # | |
(Index ix, NFData e, Eq e) => Eq (Array N ix e) Source # | |
(Index ix, Eq e) => Eq (Array B ix e) Source # | |
(Index ix, Floating e) => Floating (Array D ix e) Source # | |
Defined in Data.Massiv.Array.Delayed.Internal exp :: Array D ix e -> Array D ix e # log :: Array D ix e -> Array D ix e # sqrt :: Array D ix e -> Array D ix e # (**) :: Array D ix e -> Array D ix e -> Array D ix e # logBase :: Array D ix e -> Array D ix e -> Array D ix e # sin :: Array D ix e -> Array D ix e # cos :: Array D ix e -> Array D ix e # tan :: Array D ix e -> Array D ix e # asin :: Array D ix e -> Array D ix e # acos :: Array D ix e -> Array D ix e # atan :: Array D ix e -> Array D ix e # sinh :: Array D ix e -> Array D ix e # cosh :: Array D ix e -> Array D ix e # tanh :: Array D ix e -> Array D ix e # asinh :: Array D ix e -> Array D ix e # acosh :: Array D ix e -> Array D ix e # atanh :: Array D ix e -> Array D ix e # log1p :: Array D ix e -> Array D ix e # expm1 :: Array D ix e -> Array D ix e # | |
(Index ix, Fractional e) => Fractional (Array D ix e) Source # | |
(Index ix, Num e) => Num (Array D ix e) Source # | |
Defined in Data.Massiv.Array.Delayed.Internal (+) :: Array D ix e -> Array D ix e -> Array D ix e # (-) :: Array D ix e -> Array D ix e -> Array D ix e # (*) :: Array D ix e -> Array D ix e -> Array D ix e # negate :: Array D ix e -> Array D ix e # abs :: Array D ix e -> Array D ix e # signum :: Array D ix e -> Array D ix e # fromInteger :: Integer -> Array D ix e # | |
(Ord e, Index ix) => Ord (Array D ix e) Source # | |
Defined in Data.Massiv.Array.Delayed.Internal | |
(Ord e, Index ix) => Ord (Array M ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Internal | |
(Unbox e, Ord e, Index ix) => Ord (Array U ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
(Storable e, Ord e, Index ix) => Ord (Array S ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
(Prim e, Ord e, Index ix) => Ord (Array P ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
(Index ix, NFData e, Ord e) => Ord (Array N ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
(Index ix, Ord e) => Ord (Array B ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
(Ragged L ix e, Source r ix e, Show e) => Show (Array r ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array L ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array LN ix e) Source # | |
(Show e, Ragged L ix e, Load DW ix e) => Show (Array DW ix e) Source # | |
(Index ix, NFData e) => NFData (Array U ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
Index ix => NFData (Array S ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
Index ix => NFData (Array P ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
(Index ix, NFData e) => NFData (Array N ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
(Index ix, NFData e) => NFData (Array B ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
data Array L ix e Source # | |
newtype Array LN ix e Source # | |
data Array D ix e Source # | |
data Array M ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Internal | |
data Array U ix e Source # | |
data Array S ix e Source # | |
data Array P ix e Source # | |
newtype Array N ix e Source # | |
data Array B ix e Source # | |
data Array DW ix e Source # | |
newtype Array DI ix e Source # | |
type Item (Array L ix e) Source # | |
Defined in Data.Massiv.Core.List | |
type Item (Array LN ix e) Source # | |
Defined in Data.Massiv.Core.List | |
type Item (Array U ix e) Source # | |
type Item (Array S ix e) Source # | |
type Item (Array P ix e) Source # | |
type Item (Array N ix e) Source # | |
type Item (Array B ix e) Source # | |
type family EltRepr r ix :: * Source #
Instances
type EltRepr L ix Source # | |
Defined in Data.Massiv.Core.List | |
type EltRepr LN ix Source # | |
Defined in Data.Massiv.Core.List | |
type EltRepr D ix Source # | |
Defined in Data.Massiv.Array.Delayed.Internal | |
type EltRepr M ix Source # | |
Defined in Data.Massiv.Array.Manifest.Internal | |
type EltRepr U ix Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
type EltRepr S ix Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
type EltRepr P ix Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
type EltRepr N ix Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
type EltRepr B ix Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
type EltRepr DW ix Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed | |
type EltRepr DI ix Source # | |
Defined in Data.Massiv.Array.Delayed.Interleaved |
class (Typeable r, Index ix) => Construct r ix e Source #
Array types that can be constructed.
Instances
(Index ix, Ragged L ix e, Ragged L (Lower ix) e, Elt L ix e ~ Array L (Lower ix) e) => Construct L ix e Source # | |
Construct L Ix1 e Source # | |
Index ix => Construct D ix e Source # | |
Index ix => Construct M ix e Source # | |
(Unbox e, Index ix) => Construct U ix e Source # | |
(Storable e, Index ix) => Construct S ix e Source # | |
(Prim e, Index ix) => Construct P ix e Source # | |
(Index ix, NFData e) => Construct N ix e Source # | |
Index ix => Construct B ix e Source # | |
Index ix => Construct DW ix e Source # | |
Index ix => Construct DI ix e Source # | |
class Size r ix e => Source r ix e Source #
Arrays that can be used as source to practically any manipulation function.
Instances
Index ix => Source D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Internal | |
Index ix => Source M ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Internal | |
(Unbox e, Index ix) => Source U ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
(Storable e, Index ix) => Source S ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
(Prim e, Index ix) => Source P ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
(Index ix, NFData e) => Source N ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
Index ix => Source B ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed |
class Size r ix e => Load r ix e where Source #
Any array that can be computed
Nothing
:: Monad m | |
=> Array r ix e | Array that is being loaded |
-> (Int -> m e) | Function that reads an element from target array |
-> (Int -> e -> m ()) | Function that writes an element into target array |
-> m () |
Load an array into memory sequentially
:: [Int] | List of capabilities to run workers on, as described in
|
-> Array r ix e | Array that is being loaded |
-> (Int -> IO e) | Function that reads an element from target array |
-> (Int -> e -> IO ()) | Function that writes an element into target array |
-> IO () |
Load an array into memory in parallel
:: Monad m | |
=> Int | Total number of workers (for |
-> (m () -> m ()) | A monadic action that will schedule work for the workers (for |
-> Stride ix | Stride to use |
-> Sz ix | Size of the target array affected by the stride. |
-> Array r ix e | Array that is being loaded |
-> (Int -> m e) | Function that reads an element from target array |
-> (Int -> e -> m ()) | Function that writes an element into target array |
-> m () |
Load an array into memory with stride. Default implementation can only handle the sequential
case and only if there is an instance of Source
.
:: (Source r ix e, Monad m) | |
=> Int | Total number of workers (for |
-> (m () -> m ()) | A monadic action that will schedule work for the workers (for |
-> Stride ix | Stride to use |
-> Sz ix | Size of the target array affected by the stride. |
-> Array r ix e | Array that is being loaded |
-> (Int -> m e) | Function that reads an element from target array |
-> (Int -> e -> m ()) | Function that writes an element into target array |
-> m () |
Load an array into memory with stride. Default implementation can only handle the sequential
case and only if there is an instance of Source
.
:: Monad m | |
=> Int | Total number of workers (for |
-> (m () -> m ()) | A monadic action that will schedule work for the workers (for |
-> Array r ix e | Array that is being loaded |
-> (Int -> m e) | Function that reads an element from target array |
-> (Int -> e -> m ()) | Function that writes an element into target array |
-> m () |
Load an array into memory. Default implementation will respect the scheduler and use Source
instance to do loading in row-major fashion in parallel as well as sequentially.
:: (Source r ix e, Monad m) | |
=> Int | Total number of workers (for |
-> (m () -> m ()) | A monadic action that will schedule work for the workers (for |
-> Array r ix e | Array that is being loaded |
-> (Int -> m e) | Function that reads an element from target array |
-> (Int -> e -> m ()) | Function that writes an element into target array |
-> m () |
Load an array into memory. Default implementation will respect the scheduler and use Source
instance to do loading in row-major fashion in parallel as well as sequentially.
Instances
Index ix => Load D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Internal loadS :: Monad m => Array D ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array D ix e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride ix -> Sz ix -> Array D ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array D ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Index ix => Load M ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Internal loadS :: Monad m => Array M ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array M ix e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride ix -> Sz ix -> Array M ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array M ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Load DW Ix5T e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW Ix5T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW Ix5T e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride Ix5T -> Sz Ix5T -> Array DW Ix5T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW Ix5T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Load DW Ix4T e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW Ix4T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW Ix4T e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride Ix4T -> Sz Ix4T -> Array DW Ix4T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW Ix4T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Load DW Ix3T e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW Ix3T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW Ix3T e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride Ix3T -> Sz Ix3T -> Array DW Ix3T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW Ix3T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Load DW Ix2T e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW Ix2T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW Ix2T e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride Ix2T -> Sz Ix2T -> Array DW Ix2T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW Ix2T e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Load DW Ix2 e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW Ix2 e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW Ix2 e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride Ix2 -> Sz Ix2 -> Array DW Ix2 e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW Ix2 e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Load DW Ix1 e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW Ix1 e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW Ix1 e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride Ix1 -> Sz Ix1 -> Array DW Ix1 e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW Ix1 e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
Index ix => Load DI ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Interleaved loadS :: Monad m => Array DI ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DI ix e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride ix -> Sz ix -> Array DI ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DI ix e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # | |
(Index (IxN n), Load DW (Ix (n - 1)) e) => Load DW (IxN n) e Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed loadS :: Monad m => Array DW (IxN n) e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadP :: [Int] -> Array DW (IxN n) e -> (Int -> IO e) -> (Int -> e -> IO ()) -> IO () Source # loadArrayWithStride :: Monad m => Int -> (m () -> m ()) -> Stride (IxN n) -> Sz (IxN n) -> Array DW (IxN n) e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # loadArray :: Monad m => Int -> (m () -> m ()) -> Array DW (IxN n) e -> (Int -> m e) -> (Int -> e -> m ()) -> m () Source # |
class Construct r ix e => Size r ix e Source #
An array that contains size information. They can be resized and new arrays extracted from it in constant time.
Instances
Index ix => Size D ix e Source # | |
Index ix => Size M ix e Source # | |
(Unbox e, Index ix) => Size U ix e Source # | |
(Storable e, Index ix) => Size S ix e Source # | |
(Prim e, Index ix) => Size P ix e Source # | |
(Index ix, NFData e) => Size N ix e Source # | |
Index ix => Size B ix e Source # | |
Index ix => Size DW ix e Source # | Any resize or extract on Windowed Array will loose the interior window and all other optimizations, thus hurting the performance a lot. |
Index ix => Size DI ix e Source # | |
class Size r ix e => Slice r ix e Source #
Instances
(Index ix, Index (Lower ix), Elt D ix e ~ Array D (Lower ix) e) => Slice D ix e Source # | |
(Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e) => Slice M ix e Source # | |
Slice M Ix1 e Source # | |
(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => Slice U ix e Source # | |
Unbox e => Slice U Ix1 e Source # | |
(Prim e, Index ix, Index (Lower ix), Elt P ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => Slice P ix e Source # | |
Prim e => Slice P Ix1 e Source # | |
class OuterSlice r ix e where Source #
outerLength :: Array r ix e -> Int Source #
Instances
class Size r ix e => InnerSlice r ix e Source #
Instances
(Elt D ix e ~ Array D (Lower ix) e, Index ix) => InnerSlice D ix e Source # | |
(Elt M ix e ~ Array M (Lower ix) e, Index ix, Index (Lower ix)) => InnerSlice M ix e Source # | |
InnerSlice M Ix1 e Source # | |
(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => InnerSlice U ix e Source # | |
Unbox e => InnerSlice U Ix1 e Source # | |
(Storable e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt S ix e ~ Array M (Lower ix) e) => InnerSlice S ix e Source # | |
(Prim e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt P ix e ~ Array M (Lower ix) e) => InnerSlice P ix e Source # | |
Prim e => InnerSlice P Ix1 e Source # | |
(NFData e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt N ix e ~ Array M (Lower ix) e) => InnerSlice N ix e Source # | |
(NFData e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt B ix e ~ Array M (Lower ix) e) => InnerSlice B ix e Source # | |
class Source r ix e => Manifest r ix e Source #
Manifest arrays are backed by actual memory and values are looked up versus
computed as it is with delayed arrays. Because of this fact indexing functions
(
, !
)(
, etc. are constrained to manifest arrays only.!?
)
Instances
Index ix => Manifest M ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Internal | |
(Unbox e, Index ix) => Manifest U ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
(Index ix, Storable e) => Manifest S ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
(Index ix, Prim e) => Manifest P ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
(Index ix, NFData e) => Manifest N ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
Index ix => Manifest B ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed |
class Manifest r ix e => Mutable r ix e Source #
Instances
class Construct r ix e => Ragged r ix e where Source #
empty :: Comp -> Array r ix e Source #
isNull :: Array r ix e -> Bool Source #
cons :: Elt r ix e -> Array r ix e -> Array r ix e Source #
uncons :: Array r ix e -> Maybe (Elt r ix e, Array r ix e) Source #
edgeSize :: Array r ix e -> Sz ix Source #
flatten :: Array r ix e -> Array r Ix1 e Source #
loadRagged :: (IO () -> IO ()) -> (Int -> e -> IO a) -> Int -> Int -> ix -> Array r ix e -> IO () Source #
raggedFormat :: (e -> String) -> String -> Array r ix e -> String Source #
Instances
class Nested r ix e where Source #
fromNested :: NestedStruct r ix e -> Array r ix e Source #
toNested :: Array r ix e -> NestedStruct r ix e Source #
Instances
Nested L ix e Source # | |
Defined in Data.Massiv.Core.List fromNested :: NestedStruct L ix e -> Array L ix e Source # | |
(Elt LN ix e ~ Array LN (Lower ix) e, ListItem ix e ~ [ListItem (Lower ix) e], Coercible (Elt LN ix e) (ListItem ix e)) => Nested LN ix e Source # | |
Defined in Data.Massiv.Core.List fromNested :: NestedStruct LN ix e -> Array LN ix e Source # | |
Nested LN Ix1 e Source # | |
Defined in Data.Massiv.Core.List |
type family NestedStruct r ix e :: * Source #
Instances
type NestedStruct L ix e Source # | |
Defined in Data.Massiv.Core.List | |
type NestedStruct LN ix e Source # | |
Defined in Data.Massiv.Core.List |
Instances
Instances
(Elt LN ix e ~ Array LN (Lower ix) e, ListItem ix e ~ [ListItem (Lower ix) e], Coercible (Elt LN ix e) (ListItem ix e)) => Nested LN ix e Source # | |
Defined in Data.Massiv.Core.List fromNested :: NestedStruct LN ix e -> Array LN ix e Source # | |
Nested LN Ix1 e Source # | |
Defined in Data.Massiv.Core.List | |
Nested LN ix e => IsList (Array LN ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array LN ix e) Source # | |
newtype Array LN ix e Source # | |
type EltRepr LN ix Source # | |
Defined in Data.Massiv.Core.List | |
type NestedStruct LN ix e Source # | |
Defined in Data.Massiv.Core.List | |
type Item (Array LN ix e) Source # | |
Defined in Data.Massiv.Core.List |
Computation type to use.
Seq | Sequential computation |
ParOn [Int] | Use Parallel computation with a list of capabilities to run computation
on. Specifying an empty list ( |
module Data.Massiv.Core.Index