yarr

Yet another array library

Latest on Hackage:1.4.0.2

See all snapshots yarr appears in

MIT licensed by Roman Leventov
Maintained by Dominic Steinitz

Module documentation for 1.3.3.3

This version can be pinned in stack with:yarr-1.3.3.3@sha256:290dde1a67c1de78074c60796f5326cf01668fb109345cd100ff1ac5a5663687,3967
  • Data
    • Data.Yarr
      • Data.Yarr.Base
      • Data.Yarr.Convolution
      • Data.Yarr.Eval
      • Data.Yarr.Flow
      • Data.Yarr.Fusion
      • Data.Yarr.IO
        • Data.Yarr.IO.List
      • Data.Yarr.Repr
        • Data.Yarr.Repr.Boxed
        • Data.Yarr.Repr.Delayed
        • Data.Yarr.Repr.Foreign
        • Data.Yarr.Repr.Separate
      • Data.Yarr.Shape
      • Data.Yarr.Utils
        • Data.Yarr.Utils.FixedVector
        • Data.Yarr.Utils.Fork
        • Data.Yarr.Utils.Parallel
        • Data.Yarr.Utils.Primitive
        • Data.Yarr.Utils.Split
      • Data.Yarr.Walk
  • Debug
    • Debug.Yarr

Yarr is a new blazing fast dataflow framework (array library), mainly intented to process Storables (including all "primitive" numeric types) and fixed-vectors of them, for example coordinates, color components, complex numbers.

Yarr framework is inspired by repa library and inherits its features, including shape-polymorphism and auto-parallelism. Additionaly, the framework is polymorphic over type and arity of fixed-size vectors and supports neat flow operations over them. For example, you can convert colored image to greyscale like this:

let greyImage = zipElems (\r g b -> 0.21 * r + 0.71 * g + 0.07 * b) image

In some cases the library is considerably faster than repa. See benchmark results: https://github.com/leventov/yarr/blob/master/tests/bench-results.md

Shortcoming by design: lack of pure indexing interface.

Changes in 1.3 (ex. 0.9.3):

  • IFusion -- mapping/zipping with index

  • Rename: Work -> Walk

Changes in version 0.9.2:

  • Safe folds -- see Data.Yarr.Walk

  • Issue with slice-wise loading with unrolled filling function solved

To start with, read documentation in the root module: Data.Yarr.

Yarr!

Changes

  • Changes in 1.3.3.1: This now compiles with ghc 7.8.3 but probably won’t compile with earlier versions of ghc. Let me know if this is a requirement and I will see what I can do. Even better submit a pull request.