diff options
Diffstat (limited to 'packages/base/src/Numeric/Vectorized.hs')
-rw-r--r-- | packages/base/src/Numeric/Vectorized.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/base/src/Numeric/Vectorized.hs b/packages/base/src/Numeric/Vectorized.hs index 5aebb14..82504a9 100644 --- a/packages/base/src/Numeric/Vectorized.hs +++ b/packages/base/src/Numeric/Vectorized.hs | |||
@@ -18,7 +18,8 @@ module Numeric.Vectorized ( | |||
18 | FunCodeSV(..), vectorMapValR, vectorMapValC, vectorMapValF, vectorMapValQ, | 18 | FunCodeSV(..), vectorMapValR, vectorMapValC, vectorMapValF, vectorMapValQ, |
19 | FunCodeVV(..), vectorZipR, vectorZipC, vectorZipF, vectorZipQ, | 19 | FunCodeVV(..), vectorZipR, vectorZipC, vectorZipF, vectorZipQ, |
20 | vectorScan, saveMatrix, | 20 | vectorScan, saveMatrix, |
21 | Seed, RandDist(..), randomVector | 21 | Seed, RandDist(..), randomVector, |
22 | sortVector | ||
22 | ) where | 23 | ) where |
23 | 24 | ||
24 | import Data.Packed.Internal.Common | 25 | import Data.Packed.Internal.Common |
@@ -344,3 +345,12 @@ randomVector seed dist n = unsafePerformIO $ do | |||
344 | 345 | ||
345 | foreign import ccall unsafe "random_vector" c_random_vector :: CInt -> CInt -> TV | 346 | foreign import ccall unsafe "random_vector" c_random_vector :: CInt -> CInt -> TV |
346 | 347 | ||
348 | -------------------------------------------------------------------------------- | ||
349 | |||
350 | sortVector v = unsafePerformIO $ do | ||
351 | r <- createVector (dim v) | ||
352 | app2 c_sort_values vec v vec r "sortVector" | ||
353 | return r | ||
354 | |||
355 | foreign import ccall unsafe "sort_values" c_sort_values :: TVV | ||
356 | |||