Skip to content

Commit e4f6b75

Browse files
committed
Use alloc proposal in parallel mergesort
1 parent 1ceb862 commit e4f6b75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DpsMergeSort4Par.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ msort' :: (Show a, HasPrimOrd a) =>
8787
a -> A.Array a -. A.Array a
8888
msort' anyVal src =
8989
let !(Ur len, src') = A.size2 src
90-
!(src'', _tmp) = msortInplace src' (A.make len anyVal) in
91-
case A.free _tmp of !() -> src''
90+
!src'' = A.allocScratch len anyVal msortInplace src' in
91+
src''
9292

9393
-- finally, the top-level merge sort function
9494
{-@ msort :: { xs:(A.Array a) | left xs == 0 && right xs == size xs }

0 commit comments

Comments
 (0)