repa-series-1.0.0.1: Series Expressionss API

Safe HaskellNone

Data.Array.Repa.Series.Fallback

Description

Fallback implementations of Series operators.

Code using these series operators is typically fused and vectorised by the Repa plugin. If this transformation is successful then the resulting GHC Core program will use primitives from the Data.Array.Repa.Series.Prim module instead. If the fusion process is not successful then the implementations in this module will be used directly.

Synopsis

Documentation

map :: forall k a b. (Unbox a, Unbox b) => (a -> b) -> Series k a -> Series k bSource

Apply a function to all elements of a series.

map2 :: forall k a b c. (Unbox a, Unbox b, Unbox c) => (a -> b -> c) -> Series k a -> Series k b -> Series k cSource

Like zipWith, but for equal-length series

fold :: forall k a b. Unbox b => (a -> b -> a) -> a -> Series k b -> aSource

Combine all elements of a series with an associative operator.

foldIndex :: forall k a b. Unbox b => (Int# -> a -> b -> a) -> a -> Series k b -> aSource

Combine all elements of a series with an associative operator. The worker function is given the current index into the series.

pack :: forall k1 k2 a. Unbox a => Sel1 k1 k2 -> Series k1 a -> Series k2 aSource

Pack elements of a series using a selector.