----------------------------------------------------------------------------
-- |
-- Module      :  Data.Vector.Algorithms.Quicksort.Predefined.BitonicIntST
-- Copyright   :  (c) Sergey Vinokurov 2023
-- License     :  Apache-2.0 (see LICENSE)
-- Maintainer  :  serg.foo@gmail.com
----------------------------------------------------------------------------

module Data.Vector.Algorithms.Quicksort.Predefined.BitonicIntST (bitonicSortIntST) where

import Control.Monad.ST
import Data.Int
import Data.Vector.Primitive qualified as P
import Data.Vector.Primitive.Mutable qualified as PM

import Data.Vector.Algorithms.FixedSort

{-# NOINLINE bitonicSortIntST #-}
bitonicSortIntST :: P.MVector s Int64 -> ST s ()
bitonicSortIntST :: forall s. MVector s Int64 -> ST s ()
bitonicSortIntST MVector s Int64
xs = forall (m :: * -> *) (v :: * -> * -> *) a.
(PrimMonad m, Ord a, MVector v a) =>
Int -> v (PrimState m) a -> m ()
bitonicSort (forall a s. Prim a => MVector s a -> Int
PM.length MVector s Int64
xs) MVector s Int64
xs