@@ -10,9 +10,7 @@
1010{-# LANGUAGE ScopedTypeVariables #-}
1111
1212-- CPP:
13−-- MEMORY_ARRAY
1413-- DATA_ARRAY
15−-- DATA_ARRAY_PRIM_PINNED
1614
1715module Streamly.Benchmark.Data.ArrayOps where
1816
@@ -22,18 +20,13 @@ import Prelude (Bool, Int, Maybe(..), ($), (+), (.), (==), (>), undefined)
2220import qualified Prelude as P
2321import qualified Streamly.Prelude as S
2422
25−#if !defined(DATA_ARRAY_PRIM_PINNED)
2623#ifdef DEVBUILD
2724{-
2825import qualified Data.Foldable as F
2926-}
3027#endif
31−#endif
3228
33−#if defined(DATA_ARRAY_PRIM_PINNED)
34−import qualified Streamly.Internal.Data.Array.Prim.Pinned as A
35−type Stream = A.Array
36−#elif defined(DATA_ARRAY)
29+#if defined(DATA_ARRAY)
3730import qualified Streamly.Internal.Data.Array as A
3831type Stream = A.Array
3932#endif
@@ -49,7 +42,6 @@ type Stream = A.Array
4942-------------------------------------------------------------------------------
5043-- CPP Common to:
5144-- DATA_ARRAY
52−-- DATA_ARRAY_PRIM_PINNED
5345-------------------------------------------------------------------------------
5446
5547{-# INLINE sourceUnfoldr #-}
@@ -77,7 +69,6 @@ sourceIntFromToFromList value n = P.return $ A.fromList $ [n..n + value]
7769-------------------------------------------------------------------------------
7870-- CPP Common to:
7971-- DATA_ARRAY
80−-- DATA_ARRAY_PRIM_PINNED
8172-------------------------------------------------------------------------------
8273
8374-- CPP:
@@ -92,7 +83,6 @@ sourceIntFromToFromStream value n = S.fold A.write $ S.enumerateFromTo n (n + va
9283-------------------------------------------------------------------------------
9384-- CPP Common to:
9485-- DATA_ARRAY
95−-- DATA_ARRAY_PRIM_PINNED
9686-------------------------------------------------------------------------------
9787
9888{-# INLINE composeN #-}
@@ -156,7 +146,6 @@ pureFoldl' = S.foldl' (+) 0 . S.unfold A.read
156146-------------------------------------------------------------------------------
157147
158148-- CPP:
159−#if !defined(DATA_ARRAY_PRIM_PINNED)
160149{-# INLINE readInstance #-}
161150readInstance :: P.String -> Stream Int
162151readInstance str =
@@ -176,7 +165,6 @@ foldableSum :: Stream Int -> Int
176165foldableSum = P.sum
177166-}
178167#endif
179−#endif
180168
181169-------------------------------------------------------------------------------
182170-- Elimination
@@ -185,7 +173,6 @@ foldableSum = P.sum
185173-------------------------------------------------------------------------------
186174-- CPP Common to:
187175-- DATA_ARRAY
188−-- DATA_ARRAY_PRIM_PINNED
189176-------------------------------------------------------------------------------
190177
191178{-# INLINE unfoldReadDrain #-}