Copyright | (c) Alexey Kuleshevich 2018-2019 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data D = D
- delay :: Source r ix e => Array r ix e -> Array D ix e
- data DL = DL
- toLoadArray :: Load r ix e => Array r ix e -> Array DL ix e
- makeLoadArrayS :: Index ix => Sz ix -> e -> (forall m. Monad m => (ix -> e -> m Bool) -> m ()) -> Array DL ix e
- makeLoadArray :: Comp -> Sz ix -> (forall m. Monad m => Scheduler m () -> Int -> (Int -> e -> m ()) -> m ()) -> Array DL ix e
- fromStrideLoad :: StrideLoad r ix e => Stride ix -> Array r ix e -> Array DL ix e
- data DI = DI
- toInterleaved :: Source r ix e => Array r ix e -> Array DI ix e
- fromInterleaved :: Array DI ix e -> Array D ix e
- data DW = DW
- data Window ix e = Window {
- windowStart :: !ix
- windowSize :: !(Sz ix)
- windowIndex :: ix -> e
- windowUnrollIx2 :: !(Maybe Int)
- insertWindow :: Source D ix e => Array D ix e -> Window ix e -> Array DW ix e
- getWindow :: Array DW ix e -> Maybe (Window ix e)
- dropWindow :: Array DW ix e -> Array D ix e
- makeWindowedArray :: Source r ix e => Array r ix e -> ix -> Sz ix -> (ix -> e) -> Array DW ix e
Delayed
Delayed Pull Array
Delayed representation.
Instances
Show D Source # | |
Index ix => Resize D ix Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
(Index ix, Index (Lower ix), Elt D ix e ~ Array D (Lower ix) e) => Slice D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Pull unsafeSlice :: MonadThrow m => Array D ix e -> ix -> Sz ix -> Dim -> m (Elt D ix e) Source # | |
(Elt D ix e ~ Array D (Lower ix) e, Index ix) => InnerSlice D ix e Source # | |
(Elt D ix e ~ Array D (Lower ix) e, Index ix) => OuterSlice D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
Index ix => StrideLoad D ix e Source # | |
Index ix => Load D ix e Source # | |
Index ix => Source D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
Index ix => Extract D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
Index ix => Construct D ix e Source # | |
Functor (Array D ix) Source # | |
Index ix => Applicative (Array D ix) Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
Index ix => Foldable (Array D ix) Source # | Row-major sequential folding over a Delayed array. |
Defined in Data.Massiv.Array.Delayed.Pull 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 # | |
(Eq e, Index ix) => Eq (Array D ix e) Source # | |
(Index ix, Floating e) => Floating (Array D ix e) Source # | |
Defined in Data.Massiv.Array.Delayed.Pull 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.Pull (+) :: 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.Pull | |
(Ragged L ix e, Show e) => Show (Array D ix e) Source # | |
data Array D ix e Source # | |
type EltRepr D ix Source # | |
Defined in Data.Massiv.Array.Delayed.Pull |
delay :: Source r ix e => Array r ix e -> Array D ix e Source #
O(1) Conversion from a source array to D
representation.
Delayed Push Array
Delayed load representation. Also known as Push array.
Instances
Show DL Source # | |
Index ix => Resize DL ix Source # | |
Defined in Data.Massiv.Array.Delayed.Push | |
Index ix => Load DL ix e Source # | |
Index ix => Construct DL ix e Source # | |
Functor (Array DL ix) Source # | |
(Ragged L ix e, Show e) => Show (Array DL ix e) Source # | |
Semigroup (Array DL Ix1 e) Source # | |
Monoid (Array DL Ix1 e) Source # | |
data Array DL ix e Source # | |
type EltRepr DL ix Source # | |
Defined in Data.Massiv.Array.Delayed.Push |
:: Index ix | |
=> Sz ix | Size of the resulting array |
-> e | Default value to use for all cells that have possibly been ommitted by the writing function |
-> (forall m. Monad m => (ix -> e -> m Bool) -> m ()) | Writing function that described which elements to write into the target array. |
-> Array DL ix e |
Describe how an array should be loaded into memory
Since: 0.3.1
makeLoadArray :: Comp -> Sz ix -> (forall m. Monad m => Scheduler m () -> Int -> (Int -> e -> m ()) -> m ()) -> Array DL ix e Source #
Deprecated: In favor of equivalent unsafeMakeLoadArray
and safe makeLoadArrayS
Specify how an array can be loaded/computed through creation of a DL
array.
Since: 0.3.0
fromStrideLoad :: StrideLoad r ix e => Stride ix -> Array r ix e -> Array DL ix e Source #
Convert an array that can be loaded with stride into DL
representation.
Since: 0.3.0
Delayed Interleaved Array
Delayed array that will be loaded in an interleaved fasion during parallel computation.
Instances
toInterleaved :: Source r ix e => Array r ix e -> Array DI ix e Source #
Convert a source array into an array that, when computed, will have its elemets evaluated out of order (interleaved amongst cores), hence making unbalanced computation better parallelizable.
fromInterleaved :: Array DI ix e -> Array D ix e Source #
O(1) - Unwrap the interleved array.
Since: 0.2.1
Delayed Windowed Array
Delayed Windowed Array representation.
Instances
StrideLoad DW Ix1 e Source # | |
StrideLoad DW Ix2 e Source # | |
StrideLoad DW Ix5T e Source # | |
StrideLoad DW Ix4T e Source # | |
StrideLoad DW Ix3T e Source # | |
StrideLoad DW Ix2T e Source # | |
Load DW Ix1 e Source # | |
Load DW Ix2 e Source # | |
Load DW Ix5T e Source # | |
Load DW Ix4T e Source # | |
Load DW Ix3T e Source # | |
Load DW Ix2T e Source # | |
Index ix => Construct DW ix e Source # | |
(Index (IxN n), StrideLoad DW (Ix (n - 1)) e) => StrideLoad DW (IxN n) e Source # | |
(Index (IxN n), Load DW (Ix (n - 1)) e) => Load DW (IxN n) e Source # | |
Functor (Array DW ix) Source # | |
(Ragged L ix e, Load DW ix e, Show e) => Show (Array DW ix e) Source # | |
data Array DW ix e Source # | |
type EltRepr DW ix Source # | |
Defined in Data.Massiv.Array.Delayed.Windowed |
Window | |
|
:: Source D ix e | |
=> Array D ix e | Source array that will have a window inserted into it |
-> Window ix e | Window to place inside the delayed array |
-> Array DW ix e |
Inserts a Window
into a delayed array while scaling the window down if it doesn't fit inside
that array.
Since: 0.3.0
getWindow :: Array DW ix e -> Maybe (Window ix e) Source #
Get the Window
from a windowed array.
Since: 0.2.1
dropWindow :: Array DW ix e -> Array D ix e Source #
Drop the Window
from a windowed array.
Since: 0.3.0
:: Source r ix e | |
=> Array r ix e | Source array that will have a window inserted into it |
-> ix | Start index for the window |
-> Sz ix | Size of the window |
-> (ix -> e) | Indexing function foto use inside window |
-> Array DW ix e |
Construct a delayed windowed array by supply a separate element producing function for the interior of an array. This is very usful for stencil mapping, where interior function does not perform boundary checks, thus significantly speeding up computation process.
Since: 0.1.3