easytensor 2.1.1.0 → 2.1.1.1
raw patch · 2 files changed
+10/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
easytensor.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3c6d02c6fd2233f54c11cad29fb86ebe9dd802a64c7a3d880ee6d3bd047673ca+-- hash: 2d4e2e7679d96cbfb12d0d6ea1fb7ba9016d3f0ccf97cdb07569122f5bd91c70 name: easytensor-version: 2.1.1.0+version: 2.1.1.1 synopsis: Pure, type-indexed haskell vector, matrix, and tensor library. description: Pure, type-indexed haskell vector, matrix, and tensor library. Features dimensionality type-checking for all operations. Generic n-dimensional versions are implemented using low-level prim ops. Allows ad-hoc replacement with fixed low-dimensionality vectors and matrices without changing user interface. Please see the README on GitHub at <https://github.com/achirkin/easytensor#readme> category: math, geometry
src-base/Numeric/DataFrame/Internal/Backend/Family/ArrayBase.hs view
@@ -75,10 +75,7 @@ getBytes = withArrayContent' (\t -> let tbs = byteSize t in go tbs (tbs *# totalDim# @ds) t)- -- very weird trick with touch# allows to workaround GHC bug- -- "internal error: ARR_WORDS object entered!"- -- TODO: report this- (\_ _ arr -> case runRW# (\s -> (# touch# arr s, arr #)) of (# _, ba #) -> ba)+ (\_ _ arr -> arr) where go :: Int# -> Int# -> t -> ByteArray# go tbs bsize t = case runRW#@@ -94,7 +91,7 @@ g :: Int# -> ByteArray# -> State# RealWorld -> (# State# RealWorld, ByteArray# #) g off arr s0 | isTrue# (isByteArrayPinned# arr)- = (# touch# arr s0, arr #)+ = (# s0, arr #) | tba <- byteAlign @t undefined , bsize <- sizeofByteArray# arr , (# s1, mba #) <- newAlignedPinnedByteArray# bsize tba s0@@ -525,8 +522,13 @@ -> (CumulDims -> Int# -> ByteArray# -> r) -> ArrayBase t ds -> r withArrayContent' f _ (ArrayBase (# e | #)) = f e-withArrayContent' _ g (ArrayBase (# | (# steps, off, ba, _ #) #)) = g steps off ba+withArrayContent' _ g (ArrayBase (# | (# steps, off, ba, _ #) #)) = g steps off (workaroundUSum ba) {-# INLINE withArrayContent' #-}++{- A workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/19645 -}+workaroundUSum :: ByteArray# -> ByteArray#+workaroundUSum x = x+{-# NOINLINE workaroundUSum #-} fromElems' :: forall (t :: Type) (ds :: [Nat]) . PrimBytes t => CumulDims -> Int# -> ByteArray# -> ArrayBase t ds