All Versions
10
Latest Version
Avg Release Cycle
268 days
Latest Release
5 days ago

Changelog History

  • v0.8.0.0 Changes

    June 11, 2026

    [πŸ”₯] 0.8.0.0

    πŸ”– Version 0.8 significantly expands the API with new BLAS, LAPACK, and Algorithm functions including gemm, eigSH, pinverse, and nine segmented by-key reductions, along with ergonomic indexing via the (!) and (.~) infix operators. Scalar-returning functions (meanAll, varAll, stdevAll, corrCoef, det, etc.) now return a precise Scalar a type via the new AFResult typeclass rather than an untyped (Double, Double) pair, and several other return types have been corrected throughout (CBool for boolean ops, Word32 for index arrays, Complex a for complex construction). A number of long-standing bugs are fixed: signum for unsigned types and IEEE 754 negative zero, a double-free in getDefaultRandomEngine, uninitialized FFI output slots (replaced by zero-init calloca), and incorrect Eq behaviour for arrays with mismatched shapes. Test coverage has been substantially expanded with property-based tests for BLAS/LAPACK algebraic laws, Moore–Penrose conditions, eigendecomposition correctness, semiring/ring laws via QuickCheck.Classes, exception FFI propagation, and a complete IndexSpec. On the build side, the Nix flake gains CUDA and darwin (x86_64 via Rosetta 2) support, and CI now uses ners/simply-nix with automatic Haddock deployment to GitHub Pages.

    BLAS

    • gemm β€” general matrix multiply (Ξ±Β·op(A)Β·op(B) + Ξ²Β·C) with scalar scaling and in-place accumulation

    LAPACK

    • eigSH β€” symmetric/Hermitian eigendecomposition (cuSOLVER on CUDA, Jacobi fallback on CPU/OpenCL)
    • pinverse β€” Moore–Penrose pseudoinverse

    Algorithm

    • sumByKey, sumByKeyNaN, productByKey, productByKeyNaN, minByKey, maxByKey, allTrueByKey, anyTrueByKey, countByKey β€” segmented (key-value) reductions

    Statistics

    • meanVar, meanVarWeighted β€” mean and variance in a single pass
    • varAll / varAllWeighted now take VarianceType instead of Bool

    Data / Array

    • fromVector β€” zero-copy Storable Vector β†’ Array ingestion
    • bitNot β€” bitwise complement
    • eval β€” explicitly flush the ArrayFire JIT queue
    • deviceGC β€” trigger device-side garbage collection (af_device_gc)
    • inverseDeconv β€” inverse deconvolution (Image module)

    Index

    • assignSeq β€” write a source array into a sequential slice of a destination
    • indexGen β€” generalised indexing by a list of Index values
    • assignGen β€” generalised slice assignment
    • (!) β€” infix indexing operator (arr ! at 0, arr ! range 1 3, arr ! (range 0 2, at 1)); infixl 9
    • πŸ’… (.~) β€” infix lens-style slice assignment (arr & range 1 3 .~ src); infixr 4
    • span renamed to afSpan (avoids shadowing Prelude.span)

    πŸ’₯ Breaking / type changes

    • meanAll, meanAllWeighted, varAll, varAllWeighted, stdevAll, medianAll, corrCoef, det β€” return Scalar a (via new AFResult typeclass) instead of (Double, Double)
    • sort, sortIndex, sortByKey β€” take Order (Asc | Desc) instead of Bool
    • imin, imax, sortIndex, topk β€” index output corrected to Array Word32 (was Array a)
    • isZero, isInf, isNaN, allTrue, anyTrue β€” return Array CBool (was Array a)
    • where' β€” returns Array Word32 (was Array a)
    • cplx, cplx2, cplx2Batched β€” return Array (Complex a) (was Array a)
    • real, imag β€” signature tightened to Array (Complex a) -> Array a
    • bitAnd, bitOr, bitXor, bitShiftL, bitShiftR β€” return Array a (was Array CBool)
    • 🚚 gemm β€” beta parameter removed (was silently a no-op; zero-filled internally)
    • countByKey / allTrueByKey / anyTrueByKey β€” output value type corrected to Word32 / CBool
    • 🚚 Index type β€” phantom type parameter removed; simpler unparameterised sum type

    πŸ› Bug fixes

    • πŸ›  signum β€” fixed for unsigned types (was wrapping via negate) and IEEE 754 negative zero; now uses cast(gt x 0) - cast(lt x 0)
    • afBackendCpu β€” was incorrectly bound to AF_BACKEND_DEFAULT
    • toConnectivity β€” AFConnectivity 8 was mapped to Conn4 instead of Conn8
    • 🚚 histogram β€” removed spurious double-cast around af_histogram
    • getDefaultRandomEngine β€” fixed double-free (missing af_retain_random_engine before finalizer)
    • Eq (Array a) β€” checks dimensions first before allTrueAll (broadcast was producing wrong results for mismatched shapes)
    • FFI output slots β€” all alloca output pointers zero-initialised via calloca (was reading uninitialised stack for real-valued arrays)
    • pi β€” uses realToFrac (Prelude.pi :: Double) instead of a truncated literal

    FFI / internals

    • AFResult typeclass with associated Scalar a type family: real/integral instances yield Double, complex instances yield Complex Double; used to give scalar-returning functions (meanAll, varAll, stdevAll, medianAll, corrCoef, det, etc.) precise return types instead of the untyped (Double, Double) pair
    • 🚚 calloca added β€” zero-initialised stack allocation replacing the old zeroOutArray C helper (which is removed)
    • All op* helpers in FFI.hs now wrap unsafePerformIO with mask_ to prevent segfaults from async exceptions during FFI calls
    • op1 generalised to Array a -> … -> Array b (removing the redundant op1d)
    • op2p generalised to (Array a, Array b) (was (Array a, Array a))
    • πŸ†• New op2p2kv helper for key-value two-output FFI calling convention
    • 0️⃣ VarBias type introduced (VarianceDefault | VarianceSample | VariancePopulation) backed by AFVarBias in Internal/Defines.hsc

    βœ… Tests

    • Comprehensive IndexSpec covering index, afSpan, lookup, assignSeq, indexGen, assignGen, (!), (.~), rangeStep, and indexing round-trip properties
    • AlgorithmSpec: all *ByKey segmented reduction functions
    • BLASSpec: gemm (identity, alpha-scaling, transpose); matmul/transpose/dot algebraic properties
    • LAPACKSpec: QR/SVD/Cholesky reconstruction; eigSH eigenvalue ordering, eigenvector orthonormality, matrix reconstruction; pinverse Moore–Penrose conditions
    • StatisticsSpec: meanVar (population and sample); meanVarWeighted
    • NumericalSpec: power-iteration eigenvalue convergence
    • ArithSpec/ArraySpec: bitNot, cplx/real/imag round-trips, signum for unsigned and float-zero edge cases
    • ExceptionSpec: AFException FFI boundary propagation; toAFExceptionType for all documented AFErr codes
    • πŸ‘€ Random: fixed-seed reproducibility, distinct-seed divergence, distribution shape/range
    • βœ… Semiring/Ring laws via QuickCheck.Classes for scalar and array instances; test suite fails if lawsCheck fails

    πŸ— CI / build

    • πŸ‘ Nix flake: CUDA backend support (cudatoolkit, nvidia_x11, allowUnfree)
    • πŸ— Nix flake: darwin (x86_64 via Rosetta 2) build and devShell support
    • CI: switched from cachix/install-nix-action to ners/simply-nix@main with reclaim_space: true
    • πŸ“„ CI: Haddock docs published to GitHub Pages on push to master
    • Switched from hspec to hspec-discover

    What's Changed

    • βž• Add nix build to CI by @dmjio in #67
    • βž• Add darwin build and dev support. by @dmjio in #69
    • πŸ›  Expand API: BLAS, reductions, statistics, index ops, bitwise; type & FFI fixes by @dmjio in #68

    Full Changelog : 0.7.1.0...0.8.0.0

  • v0.7.1.0 Changes

    May 27, 2026

    What's Changed

    • πŸ›  Fix tests for ArrayFire 3.8.3 by @twesterhout in #51
    • βœ… Switch to Nix flakes; make the tests pass with newest ArrayFire by @twesterhout in #55
    • πŸ›  Fix joinMany by @twesterhout in #56
    • Fix (**) and use property tests for Floating by @twesterhout in #57
    • βœ… Relax some tests that are satisfied only up to some floating point error. by @leftaroundabout in #59
    • Export the special span value for not-indexing an array dimension. by @leftaroundabout in #61
    • Correct signum function according to the Haskell report. by @leftaroundabout in #60
    • Adjust lookup function to use Int indices by @dmjio in #63
    • βž• Add CI. Generalize op2 type parameter. by @dmjio in #64

    πŸ†• New Contributors

    Full Changelog : 0.7.0.0...0.7.1.0

  • v0.7.0.0 Changes

    October 02, 2022
    • βœ… Use latest GHC (9.2.2 / 9.4.2)
    • βœ… Use latest arrayfire (3.8.2)
    • πŸ›  Fix tests for product and variance functions
    • ⚑️ Update various scripts (nix, .ghci, etc.)

    πŸ“¦ Hackage Link

  • v0.6.0.0 Changes

    November 15, 2019
    • πŸ“š Documentation fix for negate
    • πŸ”„ Change public interface on BLAS functions to constrain on AFType
    • Adjust cabal file, account for different environments correctly
  • v0.5.1.0 Changes

    November 12, 2019
    • πŸ“š Updated documentation for column-major order
    • πŸ›  Bugfix of double free
    • βž• Add hackage docs upload scripts
  • v0.5.0.0 Changes

    November 09, 2019
    • βž• Add strong types for logical operators (CBool)
    • Adjust smart constructors to work column-major oriented.
    • πŸ›  Light doc fixes.
  • v0.4.0.0 Changes

    November 06, 2019
    • βœ‚ Removed Ord instance since compare was ambiguous.
    • 0️⃣ Show Array transposed by default.
  • v0.3.0.0 Changes

    November 06, 2019
    • ⚑️ Update Eq / Ord to operate element-wise along Array.
  • v0.2.0.0 Changes

    November 06, 2019
    • ⚑️ Updated external interface for real and imag
    • βœ‚ Removed functions that are not present in the 3.6.4 API (af_pinverse, etc.)
    • Adjust cabal flags
  • v0.1.0.0 Changes

    November 06, 2019

    πŸš€ πŸŽ‰ Initial Alpha Release πŸŽ‰

    • Based on 3.6.4 version of the API.