Safe Haskell | None |
---|
- data D
- data DT
- data L
- data SH
- fromFunction :: Shape sh => sh -> (sh -> IO a) -> UArray D SH sh a
- fromLinearFunction :: Shape sh => sh -> (Int -> IO a) -> UArray D L sh a
- delay :: (USource r l sh a, USource D l sh a, Fusion r D l sh) => UArray r l sh a -> UArray D l sh a
- delayShaped :: USource r l sh a => UArray r l sh a -> UArray D SH sh a
- delayLinear :: USource r l sh a => UArray r l sh a -> UArray D L sh a
- linearConst :: Shape sh => sh -> a -> UArray D L sh a
- shapedConst :: Shape sh => sh -> a -> UArray D SH sh a
Delayed source
Delayed representation is a wrapper for arbitrary indexing function.
instance holds linear getter (UArray
D L
sh a(Int -> IO a)
),
and
- shaped, "true" UArray
D SH
sh a(sh -> IO a)
index, respectively.
D
elayed arrays are most common recipients for fusion operations.
Delayed target
In opposite to D
elayed (source) Delayed Target holds abstract writing
function: (sh -> a -> IO ())
. It may be used to perform arbitrarily tricky
things, because no one obliges you to indeed write
an element inside wrapped function.
There are also LinearDelayed
, ShapeDelayed
and ShapeDelayedTarget
UArray
family constructors,
which aren't presented in the docs because Haddock
doesn't support associated family constructors.
See source of Data.Yarr.Repr.Delayed module.
Misc
Linear load type index. UArray
s with L
load type index
define linearIndex
and linearWrite
and leave index
and write
functions defined by default.
WorkIndex sh Int => PreferredWorkIndex L sh Int | |
(Shape sh, Storable e) => UTarget FS L sh e | |
(Shape sh, Storable a) => UTarget F L sh a | |
(Shape sh, NFData a) => UTarget MB L sh a | |
Shape sh => USource D L sh a | |
(Shape sh, Storable e) => USource FS L sh e | |
(Shape sh, Storable a) => USource F L sh a | |
(Shape sh, NFData a) => USource MB L sh a | |
(Shape sh, NFData a) => USource B L sh a | |
Shape sh => Regular D L sh a | |
Shape sh => Regular FS L sh e | |
Shape sh => Regular F L sh a | |
(Shape sh, NFData a) => Regular MB L sh a | |
(Shape sh, NFData a) => Regular B L sh a | |
DefaultFusion D D L sh | |
DefaultFusion FS D L sh | |
DefaultFusion F D L sh | |
DefaultFusion MB D L sh | |
DefaultFusion B D L sh | |
Fusion r D L sh | |
(Shape sh, Storable a) => Manifest F F L sh a | |
(Shape sh, NFData a) => Manifest B MB L sh a | |
Shape sh => DefaultIFusion D L D SH sh | |
Shape sh => DefaultIFusion FS L D SH sh | |
Shape sh => DefaultIFusion F L D SH sh | |
Shape sh => DefaultIFusion MB L D SH sh | |
Shape sh => DefaultIFusion B L D SH sh | |
(Shape sh, Vector v e, Storable e) => UVecTarget F FS L sh v e | |
(Shape sh, Vector v e) => UVecSource D D L sh v e | |
(Shape sh, Vector v e, Storable e) => UVecSource F FS L sh v e | |
(Shape sh, Vector v e) => VecRegular D D L sh v e | |
(Shape sh, Vector v e, Storable e) => VecRegular F FS L sh v e | |
Load r L tr SH sh a => RangeLoad r L tr SH sh a | |
Load r SH tr L sh a => RangeLoad r SH tr L sh a | |
Load r L tr L sh a => RangeLoad r L tr L sh a | |
(USource r L sh a, UTarget tr SH sh a) => Load r L tr SH sh a | |
(USource r SH sh a, UTarget tr L sh a) => Load r SH tr L sh a | |
(USource r L sh a, UTarget tr L sh a, WorkIndex sh Int) => Load r L tr L sh a | |
(VecLoad r slr L tr tslr SH sh v v2 e, RangeLoad slr L tslr SH sh e) => RangeVecLoad r slr L tr tslr SH sh v v2 e | |
(VecLoad r slr SH tr tslr L sh v v2 e, RangeLoad slr SH tslr L sh e) => RangeVecLoad r slr SH tr tslr L sh v v2 e | |
(VecLoad r slr L tr tslr L sh v v2 e, RangeLoad slr L tslr L sh e) => RangeVecLoad r slr L tr tslr L sh v v2 e | |
(UVecSource r slr L sh v e, UVecTarget tr tslr SH sh v2 e, Load slr L tslr SH sh e, ~ * (Dim v) (Dim v2)) => VecLoad r slr L tr tslr SH sh v v2 e | |
(UVecSource r slr SH sh v e, UVecTarget tr tslr L sh v2 e, Load slr SH tslr L sh e, ~ * (Dim v) (Dim v2)) => VecLoad r slr SH tr tslr L sh v v2 e | |
(UVecSource r slr L sh v e, UVecTarget tr tslr L sh v2 e, Load slr L tslr L sh e, ~ * (Dim v) (Dim v2)) => VecLoad r slr L tr tslr L sh v v2 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 | |
Shape sh => NFData (UArray D L sh a) | |
Shape sh => NFData (UArray FS L sh e) | |
Shape sh => NFData (UArray F L sh a) | |
(Shape sh, NFData a) => NFData (UArray MB L sh a) | |
(Shape sh, NFData a) => NFData (UArray B L sh a) |
General shape load type index. UArray
s with SH
load type index
specialize index
and write
and leave linearIndex
and linearWrite
functions defined by default.
Type-level distinction between L
inear and SH
aped arrays
is aimed to avoid integral division operations while looping
through composite (Dim2
, Dim3
) indices.
Integral division is very expensive operation even on modern CPUs.
Shape sh => PreferredWorkIndex SH sh sh | |
Shape sh => UTarget DT SH sh a | |
Shape sh => USource D SH sh a | |
Shape sh => Regular DT SH sh a | |
Shape sh => Regular D SH sh a | |
Shape sh => DefaultFusion D D SH sh | |
Shape sh => DefaultIFusion D SH D SH sh | |
Shape sh => DefaultIFusion D L D SH sh | |
Shape sh => DefaultIFusion FS L D SH sh | |
Shape sh => DefaultIFusion F L D SH sh | |
Shape sh => DefaultIFusion MB L D SH sh | |
Shape sh => DefaultIFusion B L D SH sh | |
Shape sh => IFusion r l D SH sh | |
(Shape sh, Vector v e) => UVecSource D D SH sh v e | |
(Shape sh, Vector v e) => VecRegular D D SH sh v e | |
Load r SH tr SH sh a => RangeLoad r SH tr SH sh a | |
Load r L tr SH sh a => RangeLoad r L tr SH sh a | |
Load r SH tr L sh a => RangeLoad r SH tr L sh a | |
(USource r SH sh a, UTarget tr SH sh a) => Load r SH tr SH sh a | |
(USource r L sh a, UTarget tr SH sh a) => Load r L tr SH sh a | |
(USource r SH sh a, UTarget tr L sh a) => Load r SH tr L sh a | |
(VecLoad r slr SH tr tslr SH sh v v2 e, RangeLoad slr SH tslr SH sh e) => RangeVecLoad r slr SH tr tslr SH sh v v2 e | |
(VecLoad r slr L tr tslr SH sh v v2 e, RangeLoad slr L tslr SH sh e) => RangeVecLoad r slr L tr tslr SH sh v v2 e | |
(VecLoad r slr SH tr tslr L sh v v2 e, RangeLoad slr SH tslr L sh e) => RangeVecLoad r slr SH tr tslr L sh v v2 e | |
(UVecSource r slr SH sh v e, UVecTarget tr tslr SH sh v2 e, Load slr SH tslr SH sh e, ~ * (Dim v) (Dim v2)) => VecLoad r slr SH tr tslr SH sh v v2 e | |
(UVecSource r slr L sh v e, UVecTarget tr tslr SH sh v2 e, Load slr L tslr SH sh e, ~ * (Dim v) (Dim v2)) => VecLoad r slr L tr tslr SH sh v v2 e | |
(UVecSource r slr SH sh v e, UVecTarget tr tslr L sh v2 e, Load slr SH tslr L sh e, ~ * (Dim v) (Dim v2)) => VecLoad r slr SH tr tslr L sh v v2 e | |
(DefaultIFusion r l D SH sh, IFusion (SE r) l D SH sh) => DefaultIFusion (SE r) l D SH sh | |
Shape sh => NFData (UArray DT SH sh a) | |
Shape sh => NFData (UArray D SH sh a) |
Wrap indexing function into delayed representation.
Use this function carefully, don't implement through it something that has specialized implementation in the library (mapping, zipping, etc).
Suitable to obtain arrays of constant element,
of indices (fromFunction sh
), and so on.
return
delay :: (USource r l sh a, USource D l sh a, Fusion r D l sh) => UArray r l sh a -> UArray D l sh aSource
Load type preserving wrapping arbirtary array into D
elayed representation.