Safe Haskell | None |
---|
- data SE r
- fromSlices :: (Regular r l sh e, Vector v e, Dim v ~ S n0) => VecList (Dim v) (UArray r l sh e) -> UArray (SE r) l sh (v e)
- unsafeMapSlices :: (USource r l sh a, Vector v a, USource r2 l2 sh2 b, Vector v b, Dim v ~ S n0) => (UArray r l sh a -> UArray r2 l2 sh2 b) -> UArray (SE r) l sh (v a) -> UArray (SE r2) l2 sh2 (v b)
- convert :: (Regular r l sh e, Vector v e, Vector v2 e, Dim v ~ Dim v2) => UArray (SE r) l sh (v e) -> UArray (SE r) l sh (v2 e)
- dmapElems :: (VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh, Vector v2 b, Dim v ~ Dim v2) => VecList (Dim v) (a -> b) -> UArray r l sh (v a) -> UArray (SE fslr) l sh (v2 b)
- dmapElemsM :: (VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh, Vector v2 b, Dim v ~ Dim v2) => VecList (Dim v) (a -> IO b) -> UArray r l sh (v a) -> UArray (SE fslr) l sh (v2 b)
- dzipElems2 :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, USource fslr l sh c, DefaultFusion slr fslr l sh, Vector v c) => VecList (Dim v) (a -> b -> c) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray (SE fslr) l sh (v c)
- dzipElems2M :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, USource fslr l sh c, DefaultFusion slr fslr l sh, Vector v c) => VecList (Dim v) (a -> b -> IO c) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray (SE fslr) l sh (v c)
- dzipElems3 :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, DefaultFusion slr fslr l sh, Vector v d) => VecList (Dim v) (a -> b -> c -> d) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray r l sh (v c) -> UArray (SE fslr) l sh (v d)
- dzipElems3M :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, DefaultFusion slr fslr l sh, Vector v d) => VecList (Dim v) (a -> b -> c -> IO d) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray r l sh (v c) -> UArray (SE fslr) l sh (v d)
- dzipElems :: (Vector v2 b, Arity m, m ~ S m0, VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh) => VecList (Dim v2) (Fun m a b) -> VecList m (UArray r l sh (v a)) -> UArray (SE fslr) l sh (v2 b)
- dzipElemsM :: (Vector v2 b, Arity m, m ~ S m0, VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh) => VecList (Dim v2) (Fun m a (IO b)) -> VecList m (UArray r l sh (v a)) -> UArray (SE fslr) l sh (v2 b)
- fmapElems :: (VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, Fusion slr fslr l sh, Vector v2 b, Dim v ~ Dim v2) => VecList (Dim v) (a -> b) -> UArray r l sh (v a) -> UArray (SE fslr) l sh (v2 b)
- fmapElemsM :: (VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, Fusion slr fslr l sh, Vector v2 b, Dim v ~ Dim v2) => VecList (Dim v) (a -> IO b) -> UArray r l sh (v a) -> UArray (SE fslr) l sh (v2 b)
- fzipElems2 :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, USource fslr l sh c, Fusion slr fslr l sh, Vector v c) => VecList (Dim v) (a -> b -> c) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray (SE fslr) l sh (v c)
- fzipElems2M :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, USource fslr l sh c, Fusion slr fslr l sh, Vector v c) => VecList (Dim v) (a -> b -> IO c) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray (SE fslr) l sh (v c)
- fzipElems3 :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, Fusion slr fslr l sh, Vector v d) => VecList (Dim v) (a -> b -> c -> d) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray r l sh (v c) -> UArray (SE fslr) l sh (v d)
- fzipElems3M :: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, Fusion slr fslr l sh, Vector v d) => VecList (Dim v) (a -> b -> c -> IO d) -> UArray r l sh (v a) -> UArray r l sh (v b) -> UArray r l sh (v c) -> UArray (SE fslr) l sh (v d)
- fzipElems :: (Vector v2 b, Arity m, m ~ S m0, VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, Fusion slr fslr l sh) => VecList (Dim v2) (Fun m a b) -> VecList m (UArray r l sh (v a)) -> UArray (SE fslr) l sh (v2 b)
- fzipElemsM :: (Vector v2 b, Arity m, m ~ S m0, VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, Fusion slr fslr l sh) => VecList (Dim v2) (Fun m a (IO b)) -> VecList m (UArray r l sh (v a)) -> UArray (SE fslr) l sh (v2 b)
Separate
representation
SEparate meta array representation. Internally SEparate arrays
hold vector of it's slices (so, slices
is just getter for them).
Mostly useful for:
(DefaultFusion r D l sh, Fusion (SE r) D l sh) => DefaultFusion (SE r) D l sh | |
(DefaultIFusion r l D SH sh, IFusion (SE r) l D SH sh) => DefaultIFusion (SE r) l D SH sh | |
(UTarget tr tl sh e, Vector v e) => UVecTarget (SE tr) tr tl sh v e | |
(USource r l sh e, Vector v e) => UVecSource (SE r) r l sh v e | |
(Shape sh, Vector v e, Storable e) => UVecSource (SE F) F L sh v e | |
(Shape sh, Vector v e, NFData e) => UVecSource (SE MB) MB L sh v e | |
(Shape sh, Vector v e, NFData e) => UVecSource (SE B) B L sh v e | |
(Regular r l sh e, Shape sh, Vector v e) => VecRegular (SE r) r l sh v e | |
(BlockShape sh, Vector v e, UVecTarget tr tslr tl sh v2 e, ~ * (Dim v) (Dim v2), InlinableArity (Dim v)) => RangeVecLoad (SE CV) CV CVL tr tslr tl sh v v2 e | |
(BlockShape sh, Vector v e, UVecTarget tr tslr tl sh v2 e, ~ * (Dim v) (Dim v2), InlinableArity (Dim v)) => VecLoad (SE CV) CV CVL tr tslr tl sh v v2 e | |
(UTarget tr tl sh e, Vector v e) => UTarget (SE tr) tl sh (v e) | |
(USource r l sh e, Vector v e) => USource (SE r) l sh (v e) | |
(Regular r l sh e, Vector v e) => Regular (SE r) l sh (v e) | |
(Manifest r mr l sh e, Vector v e) => Manifest (SE r) (SE mr) l sh (v e) | |
(NFData (UArray r l sh e), Shape sh, Vector v e) => NFData (UArray (SE r) l sh (v e)) |
There is also Separate
UArray
family constructor,
which isn't presented in the docs because Haddock
doesn't support associated family constructors.
See source of Data.Yarr.Repr.Separate module.
fromSlices :: (Regular r l sh e, Vector v e, Dim v ~ S n0) => VecList (Dim v) (UArray r l sh e) -> UArray (SE r) l sh (v e)Source
O(1) Glues several arrays of the same type into one separate array of vectors. All source arrays must be of the same extent.
Example:
let separateCoords = fromSlices (vl_3
xs ys zs)
:: (USource r l sh a, Vector v a, USource r2 l2 sh2 b, Vector v b, Dim v ~ S n0) | |
=> (UArray r l sh a -> UArray r2 l2 sh2 b) | Slice mapper without restrictions |
-> UArray (SE r) l sh (v a) | Source separate array |
-> UArray (SE r2) l2 sh2 (v b) | Result separate array |
O(depends on mapper function) Maps slices of separate array "entirely".
This function is useful when operation over slices is not
element-wise (in that case you should use mapElems
):
let blurredImage = unsafeMapSlices blur image
The function is unsafe because it doesn't check that slice mapper translates extents uniformly (though it is pure).
convert :: (Regular r l sh e, Vector v e, Vector v2 e, Dim v ~ Dim v2) => UArray (SE r) l sh (v e) -> UArray (SE r) l sh (v2 e)Source
Element-wise fusion for arrays of vectors
:: (VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh, Vector v2 b, Dim v ~ Dim v2) | |
=> VecList (Dim v) (a -> IO b) | Elemen-wise vector of monadic mappers |
-> UArray r l sh (v a) | Source array of vectors |
-> UArray (SE fslr) l sh (v2 b) | Result array |
O(1) Monadic vesion of dmapElems
function.
:: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, USource fslr l sh c, DefaultFusion slr fslr l sh, Vector v c) | |
=> VecList (Dim v) (a -> b -> c) | . |
-> UArray r l sh (v a) | |
-> UArray r l sh (v b) | |
-> UArray (SE fslr) l sh (v c) |
:: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, USource fslr l sh c, DefaultFusion slr fslr l sh, Vector v c) | |
=> VecList (Dim v) (a -> b -> IO c) | . |
-> UArray r l sh (v a) | |
-> UArray r l sh (v b) | |
-> UArray (SE fslr) l sh (v c) |
:: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, DefaultFusion slr fslr l sh, Vector v d) | |
=> VecList (Dim v) (a -> b -> c -> d) | . |
-> UArray r l sh (v a) | |
-> UArray r l sh (v b) | |
-> UArray r l sh (v c) | |
-> UArray (SE fslr) l sh (v d) |
:: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, DefaultFusion slr fslr l sh, Vector v d) | |
=> VecList (Dim v) (a -> b -> c -> IO d) | . |
-> UArray r l sh (v a) | |
-> UArray r l sh (v b) | |
-> UArray r l sh (v c) | |
-> UArray (SE fslr) l sh (v d) |
:: (Vector v2 b, Arity m, m ~ S m0, VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh) | |
=> VecList (Dim v2) (Fun m a b) | Vector of wrapped |
-> VecList m (UArray r l sh (v a)) | Vector of source arrays of vectors |
-> UArray (SE fslr) l sh (v2 b) | Fused result array |
O(1) Generalized element-wise zipping of several arrays of vectors.
:: (Vector v2 b, Arity m, m ~ S m0, VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, DefaultFusion slr fslr l sh) | |
=> VecList (Dim v2) (Fun m a (IO b)) | Vector of wrapped |
-> VecList m (UArray r l sh (v a)) | Vector of source arrays of vectors |
-> UArray (SE fslr) l sh (v2 b) | Result array |
O(1) Generalized monadic element-wise zipping of several arrays of vectors
Non-injective element-wise fusion
:: (VecRegular r slr l sh v a, USource slr l sh a, USource fslr l sh b, Fusion slr fslr l sh, Vector v2 b, Dim v ~ Dim v2) | |
=> VecList (Dim v) (a -> b) | . |
-> UArray r l sh (v a) | |
-> UArray (SE fslr) l sh (v2 b) |
Group of f-...-Elems-
functions is used internally to define
d-...-Elems-
functions.
:: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, Fusion slr fslr l sh, Vector v d) | |
=> VecList (Dim v) (a -> b -> c -> d) | . |
-> UArray r l sh (v a) | |
-> UArray r l sh (v b) | |
-> UArray r l sh (v c) | |
-> UArray (SE fslr) l sh (v d) |
:: (VecRegular r slr l sh v a, USource slr l sh a, VecRegular r slr l sh v b, USource slr l sh b, VecRegular r slr l sh v c, USource slr l sh c, USource fslr l sh d, Fusion slr fslr l sh, Vector v d) | |
=> VecList (Dim v) (a -> b -> c -> IO d) | . |
-> UArray r l sh (v a) | |
-> UArray r l sh (v b) | |
-> UArray r l sh (v c) | |
-> UArray (SE fslr) l sh (v d) |