packages feed

hw-json-simd 0.1.0.2 → 0.1.0.3

raw patch · 4 files changed

+36/−33 lines, 4 filesdep ~hw-primPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: hw-prim

API changes (from Hackage documentation)

Files

cbits/debug.h view
@@ -86,12 +86,12 @@ inline void hw_simd_json_print_bits_256(__m256i v) {   int i = 0; -  for (i = 0; i < 4; ++i) {-    if (i > 0) {-      printf("-");-    }--    hw_simd_json_print_bits_64(_mm256_extract_epi64(v, i));-  }+  hw_simd_json_print_bits_64(_mm256_extract_epi64(v, 0));+  printf("-");+  hw_simd_json_print_bits_64(_mm256_extract_epi64(v, 1));+  printf("-");+  hw_simd_json_print_bits_64(_mm256_extract_epi64(v, 2));+  printf("-");+  hw_simd_json_print_bits_64(_mm256_extract_epi64(v, 3)); } #endif//__AVX2__
cbits/simd-spliced.c view
@@ -50,7 +50,10 @@     exit(1);   } -  uint8_t buffer[W8_BUFFER_SIZE];+  // align stack buffer on 32 bytes +  uint8_t unaligned_buffer[W8_BUFFER_SIZE + 32];+  uint8_t * buffer = unaligned_buffer + ((uintptr_t)unaligned_buffer & (uintptr_t)0x10);+  fprintf(stderr, "Buffer is at address %p of size %zu\n", buffer, (size_t) W8_BUFFER_SIZE);    uint8_t *bits_of_d = malloc(W32_BUFFER_SIZE); memset(bits_of_d, 0, W32_BUFFER_SIZE);   uint8_t *bits_of_a = malloc(W32_BUFFER_SIZE); memset(bits_of_a, 0, W32_BUFFER_SIZE);
hw-json-simd.cabal view
@@ -1,7 +1,7 @@ cabal-version:  2.2  name:           hw-json-simd-version:        0.1.0.2+version:        0.1.0.3 synopsis:       SIMD-based JSON semi-indexer description:    Please see the README on GitHub at <https://github.com/haskell-works/hw-json-simd#readme> category:       Data@@ -9,11 +9,11 @@ bug-reports:    https://github.com/haskell-works/hw-json-simd/issues author:         John Ky maintainer:     newhoggy@gmail.com-copyright:      2018 - 2019 John Ky+copyright:      2018-2019 John Ky license:        BSD-3-Clause license-file:   LICENSE build-type:     Simple-tested-with:    GHC == 8.6.3, GHC == 8.4.4, GHC == 8.2.2, GHC == 8.0.2+tested-with:    GHC == 8.6.3, GHC == 8.4.4, GHC == 8.2.2 extra-source-files:     cbits/debug.h     cbits/simd.h@@ -47,9 +47,9 @@  common base                   { build-depends: base                 >= 4          && < 5      } common bytestring             { build-depends: bytestring           >= 0.10.6     && < 0.11   }-common hw-prim                { build-depends: hw-prim              >= 0.6.2.21   && < 0.7    }+common hw-prim                { build-depends: hw-prim              >= 0.6.2.35   && < 0.7    } common lens                   { build-depends: lens                 >= 4          && < 5      }-common optparse-applicative   { build-depends: optparse-applicative >= 0.14       && < 0.15   }+common optparse-applicative   { build-depends: optparse-applicative >= 0.14       && < 0.16   } common vector                 { build-depends: vector               >= 0.12       && < 0.13   }  common semigroups     { if (!impl(ghc >= 8.0.1))  { build-depends: { semigroups   >= 0.8.4  && < 0.19 } } }@@ -76,12 +76,12 @@           , hw-prim           , lens           , vector-  autogen-modules:  Paths_hw_json_simd-  other-modules:    Paths_hw_json_simd-  hs-source-dirs:   src-  cc-options:       -mssse3 -mlzcnt -mbmi2 -mavx2-  include-dirs:     cbits-  build-tools:      c2hs+  autogen-modules:      Paths_hw_json_simd+  other-modules:        Paths_hw_json_simd+  hs-source-dirs:       src+  cc-options:           -mssse3 -mlzcnt -mbmi2 -mavx2+  include-dirs:         cbits+  build-tool-depends:   c2hs:c2hs   exposed-modules:       HaskellWorks.Data.Json.Simd.Capabilities       HaskellWorks.Data.Json.Simd.Index.Simple@@ -106,11 +106,11 @@           , optparse-applicative           , semigroups           , vector-  main-is:          Main.hs-  autogen-modules:  Paths_hw_json_simd-  hs-source-dirs:   app-  build-depends:    hw-json-simd-  ghc-options:      -threaded -rtsopts -with-rtsopts=-N+  main-is:              Main.hs+  autogen-modules:      Paths_hw_json_simd+  hs-source-dirs:       app+  build-depends:        hw-json-simd+  ghc-options:          -threaded -rtsopts -with-rtsopts=-N   other-modules:       App.Commands       App.Commands.Capabilities@@ -127,10 +127,10 @@           , semigroups           , transformers           , vector-  type:             exitcode-stdio-1.0-  main-is:          Spec.hs-  autogen-modules:  Paths_hw_json_simd-  other-modules:    Paths_hw_json_simd-  hs-source-dirs:   test-  ghc-options:      -threaded -rtsopts -with-rtsopts=-N-  build-depends:    hw-json-simd+  type:                 exitcode-stdio-1.0+  main-is:              Spec.hs+  autogen-modules:      Paths_hw_json_simd+  other-modules:        Paths_hw_json_simd+  hs-source-dirs:       test+  ghc-options:          -threaded -rtsopts -with-rtsopts=-N+  build-depends:        hw-json-simd
src/HaskellWorks/Data/Json/Simd/Internal/Index/Standard.hs view
@@ -9,6 +9,7 @@ import qualified Foreign                                      as F import qualified Foreign.ForeignPtr.Unsafe                    as F import qualified HaskellWorks.Data.Json.Simd.Internal.Foreign as F+import qualified HaskellWorks.Foreign                         as F  {-# ANN module ("HLint: ignore Reduce duplication"  :: String) #-} {-# ANN module ("HLint: ignore Redundant do"        :: String) #-}@@ -29,8 +30,7 @@  allocWorkBuffers :: Int -> IO WorkBuffers allocWorkBuffers n = do-  fptr <- F.mallocForeignPtrBytes (3 * n)-  let ptr = F.unsafeForeignPtrToPtr fptr+  (fptr, ptr) <- F.mallocForeignPtrBytesWithAlignedCastPtr 32 (3 * n)   return WorkBuffers     { workBuffersF = fptr     , workBuffersP = ptr `F.plusPtr`  0