-
Notifications
You must be signed in to change notification settings - Fork 2
/
vector-quicksort.cabal
289 lines (251 loc) · 9.04 KB
/
vector-quicksort.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
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 <serg.foo@gmail.com>
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