cabal-version: 3.0 name: vector-quicksort version: 0.2 synopsis: Fast and flexible quicksort implementation for mutable vectors description: Quicksort implementation developed with performance in mind. Has good default single-threaded sort and provides parallelised versions that are actually faster than the single-threaded version. Users can define new parallelisation methods. Good starting point: > import Data.Vector.Algorithms.Quicksort qualified as Quick Then call as > Quick.sort xs copyright: (c) Sergey Vinokurov 2022 license: Apache-2.0 license-file: LICENSE author: Sergey Vinokurov maintainer: Sergey Vinokurov category: Algorithms build-type: Simple extra-source-files: Readme.md Changelog.md cbits/sort.cpp cbits/sort.h homepage: https://github.com/sergv/vector-quicksort source-repository head type: git location: https://github.com/sergv/vector-quicksort.git common ghc-options default-language: GHC2021 default-extensions: LambdaCase ghc-options: -O2 -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-missed-specialisations -Wno-missing-import-lists -Wno-missing-local-signatures -Wno-missing-safe-haskell-mode -Wno-safe -Wno-unsafe -Wno-unused-packages if impl(ghc >= 8.8) ghc-options: -Wno-missing-deriving-strategies if impl(ghc >= 9.2) ghc-options: -Wno-missing-kind-signatures if impl(ghc >= 9.8) ghc-options: -Wno-missing-role-annotations -Wno-missing-poly-kind-signatures library import: ghc-options exposed-modules: Data.Vector.Algorithms.FixedSort Data.Vector.Algorithms.Heapsort Data.Vector.Algorithms.Quicksort Data.Vector.Algorithms.Quicksort.Fork2 Data.Vector.Algorithms.Quicksort.Median Data.Vector.Algorithms.Quicksort.Parameterised hs-source-dirs: src build-depends: , base >= 4.15 && < 5 , primitive , stm , vector library test-predefined-sorts import: ghc-options visibility: private if impl(ghc >= 9.6) ghc-options: -fpolymorphic-specialisation exposed-modules: Data.Vector.Algorithms.Quicksort.Predefined.Pair Data.Vector.Algorithms.Quicksort.Predefined.SortTriple Data.Vector.Algorithms.Quicksort.Predefined.BitonicIntST Data.Vector.Algorithms.Quicksort.Predefined.PIntParallelMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.PIntParallelMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.PIntSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.PIntSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.PIntParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.PIntParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.PIntSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.PIntSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.PIntParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.PIntParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.VIntSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.VIntSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.VPairSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.VPairSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.VIntParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.VIntParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.VPairParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.VPairParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.VIntSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.VIntSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.VPairSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.VPairSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.VIntParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.VIntParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.VPairParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.VPairParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.UIntSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UIntSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.UPairSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UPairSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.UIntParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UIntParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.UPairParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UPairParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.UIntSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UIntSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.UPairSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UPairSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.UIntParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UIntParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.UPairParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UPairParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.VTupleSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.VTupleSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.VTupleParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.VTupleParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.VTupleSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.VTupleSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.VTupleParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.VTupleParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.UTupleSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UTupleSequentialMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.UTupleParallelStrategiesMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UTupleParallelStrategiesMedian3IO Data.Vector.Algorithms.Quicksort.Predefined.UTupleSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UTupleSequentialMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.UTupleParallelStrategiesMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UTupleParallelStrategiesMedian3or5IO Data.Vector.Algorithms.Quicksort.Predefined.PTripleSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.PTripleSequentialMedian3or5ST Data.Vector.Algorithms.Quicksort.Predefined.UTripleSequentialMedian3ST Data.Vector.Algorithms.Quicksort.Predefined.UTripleSequentialMedian3or5ST hs-source-dirs: src-predefined build-depends: , base >= 4.15 , primitive , vector >= 0.13 , vector-quicksort test-suite test import: ghc-options type: exitcode-stdio-1.0 main-is: test/TestMain.hs other-modules: Data.Vector.Algorithms.Quicksort.Tests hs-source-dirs: . test build-depends: , QuickCheck , base >= 4.15 , containers , tasty , tasty-quickcheck , vector , test-predefined-sorts ghc-options: -rtsopts -threaded "-with-rtsopts=-N -A16m -n1m -qg -qb" -main-is TestMain library test-foreign-sort default-language: GHC2021 visibility: private include-dirs: cbits cxx-sources: cbits/sort.cpp cxx-options: -std=c++17 -- Just like in the ‘text’ package, less critical for us since this -- is a library for testing and benchmarking only. if impl(ghc >= 9.4) build-depends: system-cxx-std-lib == 1.0 elif os(darwin) || os(freebsd) extra-libraries: c++ elif os(openbsd) extra-libraries: c++ c++abi pthread elif os(windows) -- GHC's Windows toolchain is based on clang/libc++ in GHC 9.4 and later if impl(ghc < 9.3) extra-libraries: stdc++ else extra-libraries: c++ c++abi elif os(linux) extra-libraries: stdc++ else cxx-options: -fno-exceptions extra-libraries: c++ c++abi benchmark bench import: ghc-options type: exitcode-stdio-1.0 main-is: BenchMain.hs other-modules: ForeignSorting hs-source-dirs: bench build-tool-depends: , hsc2hs:hsc2hs build-depends: , base >= 4.15 , bytestring , deepseq , random , stm , tasty >= 1.5 , tasty-bench >= 0.3.2 , tasty-hunit , text , text-builder-linear , vector , vector-algorithms , vector-quicksort , vector-quicksort:test-foreign-sort , vector-quicksort:test-predefined-sorts ghc-options: -fno-spec-constr -rtsopts -threaded "-with-rtsopts=-N -A16m -n1m -qg -qb" -main-is BenchMain