Skip to content

Commit d87c3f3

Browse files
committed
Connect cilksort to benchrunner
1 parent 013ff57 commit d87c3f3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

benchrunner/Benchrunner.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import qualified Insertion as I
1919
import qualified QuickSort as Q
2020
import qualified DpsMergeSort4 as DMS
2121
import qualified DpsMergeSort4Par as DMSP
22+
import qualified CilkSort as CSP
2223
import qualified PiecewiseFallbackSort as PFS
2324
import qualified PiecewiseFallbackSortPar as PFSP
2425
import qualified Microbench as MB
@@ -41,6 +42,7 @@ getInput bench mb_size = case bench of
4142
Insertionsort -> ArrayIn <$> randArray (Proxy :: Proxy Int64) (mb 100)
4243
Quicksort -> ArrayIn <$> randArray (Proxy :: Proxy Int64) (mb 1000000)
4344
Mergesort -> ArrayIn <$> randArray (Proxy :: Proxy Int64) (mb 8000000)
45+
Cilksort -> ArrayIn <$> randArray (Proxy :: Proxy Int64) (mb 8000000)
4446
Optsort -> ArrayIn <$> randArray (Proxy :: Proxy Int64) (mb 8000000)
4547
_ -> error "getInput: Unexpected Input!"
4648
where
@@ -103,6 +105,7 @@ sortFn bench parorseq = case (bench,parorseq) of
103105
(Mergesort, Par) -> DMSP.msort
104106
(Optsort, Seq) -> PFS.pfsort
105107
(Optsort, Par) -> PFSP.pfsort
108+
(Cilksort, Par) -> CSP.cilkSort
106109
oth -> error $ "sortFn: unknown configuration: " ++ show oth
107110

108111
vectorSortFn :: SortAlgo -> ParOrSeq -> VecSort

benchrunner/Types.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ data SortAlgo
1111
= Insertionsort
1212
| Mergesort
1313
| Quicksort
14+
| Cilksort
1415
| Optsort -- piecewise fallback
1516
deriving (Eq, Show, Read)
1617

0 commit comments

Comments
 (0)