nvvm 0.10.0.0 → 0.10.0.1
raw patch · 10 files changed
+41/−23 lines, 10 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Foreign/NVVM.hs +1/−1
- Foreign/NVVM/Compile.chs +17/−11
- Foreign/NVVM/Error.chs +1/−1
- Foreign/NVVM/Info.chs +1/−1
- Foreign/NVVM/Path.hs +1/−1
- LICENSE +1/−1
- Setup.hs +6/−0
- cbits/stubs.h +1/−1
- nvvm.cabal +7/−6
CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). +## [0.10.0.1] - 2023-08-15+### Fixed+ * Build fixes for GHC 9.2 .. 9.6+ ## [0.10.0.0] - 2020-08-26 ### Added * Support for Cabal-3@@ -47,6 +51,7 @@ * First version. Released on an unsuspecting world. +[0.10.0.1]: https://github.com/tmcdonell/nvvm/compare/v0.10.0.0..v0.10.0.1 [0.10.0.0]: https://github.com/tmcdonell/nvvm/compare/v0.9.0.0...v0.10.0.0 [0.9.0.0]: https://github.com/tmcdonell/nvvm/compare/v0.8.0.3...v0.9.0.0 [0.8.0.3]: https://github.com/tmcdonell/nvvm/compare/v0.8.0.2...v0.8.0.3
Foreign/NVVM.hs view
@@ -1,7 +1,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Foreign.NVVM--- Copyright : [2016] Trevor L. McDonell+-- Copyright : [2016..2023] Trevor L. McDonell -- License : BSD -- -- This module defines an interface to the /libNVVM/ library provided by NVIDIA as
Foreign/NVVM/Compile.chs view
@@ -8,7 +8,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Foreign.NVVM.Compile--- Copyright : [2016] Trevor L. McDonell+-- Copyright : [2016..2023] Trevor L. McDonell -- License : BSD -- -- Program compilation@@ -51,7 +51,7 @@ import qualified Data.ByteString.Unsafe as B import qualified Data.ByteString.Internal as B import qualified Data.ByteString.Short as BS-import qualified Data.ByteString.Short.Internal as BSI+import qualified Data.ByteString.Short.Internal as BI import GHC.Exts import GHC.Base ( IO(..) )@@ -359,15 +359,21 @@ {-# INLINE useAsCString #-} useAsCString :: ShortByteString -> (CString -> IO a) -> IO a-useAsCString (BSI.SBS ba#) action = IO $ \s0 ->- case sizeofByteArray# ba# of { n# ->- case newPinnedByteArray# (n# +# 1#) s0 of { (# s1, mba# #) ->- case byteArrayContents# (unsafeCoerce# mba#) of { addr# ->- case copyByteArrayToAddr# ba# 0# addr# n# s1 of { s2 ->- case writeWord8OffAddr# addr# n# 0## s2 of { s3 ->- case action (Ptr addr#) of { IO action' ->- case action' s3 of { (# s4, r #) ->- case touch# mba# s4 of { s5 ->+useAsCString (BI.SBS ba#) action = IO $ \s0 ->+ case sizeofByteArray# ba# of { n# ->+ case newPinnedByteArray# (n# +# 1#) s0 of { (# s1, mba# #) ->+ case byteArrayContents# (unsafeCoerce# mba#) of { addr# ->+ case copyByteArrayToAddr# ba# 0# addr# n# s1 of { s2 ->+ case writeWord8OffAddr# addr# n# (wordToWord8# 0##) s2 of { s3 ->+ case action (Ptr addr#) of { IO action' ->+ case action' s3 of { (# s4, r #) ->+ case touch# mba# s4 of { s5 -> (# s5, r #) }}}}}}}}++#if __GLASGOW_HASKELL__ < 902+{-# INLINE wordToWord8# #-}+wordToWord8# :: Word# -> Word#+wordToWord8# x = x+#endif
Foreign/NVVM/Error.chs view
@@ -2,7 +2,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Foreign.NVVM.Error--- Copyright : [2016] Trevor L. McDonell+-- Copyright : [2016..2023] Trevor L. McDonell -- License : BSD -- -- Error handling
Foreign/NVVM/Info.chs view
@@ -3,7 +3,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Foreign.NVVM.Info--- Copyright : [2016] Trevor L. McDonell+-- Copyright : [2016..2023] Trevor L. McDonell -- License : BSD -- -- General information query
Foreign/NVVM/Path.hs view
@@ -2,7 +2,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Foreign.NVVM.Path--- Copyright : [2020] Trevor L. McDonell+-- Copyright : [2020..2023] Trevor L. McDonell -- License : BSD -- --------------------------------------------------------------------------------
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2016, Trevor L. McDonell+Copyright (c) [2016..2023], Trevor L. McDonell All rights reserved.
Setup.hs view
@@ -31,6 +31,9 @@ #else import Distribution.PackageDescription.Parse #endif+#if MIN_VERSION_Cabal(3,8,0)+import Distribution.Simple.PackageDescription+#endif import Foreign.CUDA.Path import Control.Applicative@@ -419,6 +422,9 @@ pp_c2hs bi lbi = PreProcessor { platformIndependent = False+#if MIN_VERSION_Cabal(3,8,0)+ , ppOrdering = unsorted+#endif , runPreProcessor = \(inBaseDir, inRelativeFile) (outBaseDir, outRelativeFile) verbosity -> runDbProgram verbosity c2hsProgram (withPrograms lbi) . filter (not . null) $
cbits/stubs.h view
@@ -1,7 +1,7 @@ /******************************************************************************* * * Module : stubs- * Copyright : [2016] Trevor L. McDonell+ * Copyright : [2016..2023] Trevor L. McDonell * License : BSD * * Extra bits for NVVM bindings
nvvm.cabal view
@@ -1,5 +1,7 @@+cabal-version: 1.24+ name: nvvm-version: 0.10.0.0+version: 0.10.0.1 synopsis: FFI bindings to NVVM description: The NVVM library compiles NVVM IR (a subset of LLVM IR) into PTX code which@@ -25,10 +27,9 @@ homepage: https://github.com/tmcdonell/nvvm author: Trevor L. McDonell <trevor.mcdonell@gmail.com> maintainer: Trevor L. McDonell <trevor.mcdonell@gmail.com>-copyright: [2016..2018] Trevor L. McDonell+copyright: [2016..2023] Trevor L. McDonell category: Foreign build-type: Custom-cabal-version: >= 1.24 extra-source-files: CHANGELOG.md@@ -40,8 +41,8 @@ custom-setup setup-depends:- base >= 4.6- , Cabal >= 1.24+ base >= 4.6 && < 5+ , Cabal >= 1.24 && < 3.11 , cuda >= 0.8 , directory >= 1.0 , filepath >= 1.0@@ -86,7 +87,7 @@ source-repository this type: git location: https://github.com/tmcdonell/nvvm- tag: v0.10.0.0+ tag: v0.10.0.1 -- vim: nospell