Skip to content

Commit

Permalink
Merge branch 'release/1.1.0.1-native' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcdonell committed Oct 4, 2017
2 parents fcfc867 + de6c5d0 commit fd1a554
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions accelerate-llvm-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and the
project adheres to the [Haskell Package Versioning
Policy (PVP)](https://pvp.haskell.org)

## [1.1.0.1] - 2017-10-04
### Fixed
* fix for `runQ*` generating multiple declarations with the same name

## [1.1.0.0] - 2017-09-21
### Added
* support for GHC-8.2
Expand All @@ -24,6 +28,7 @@ Policy (PVP)](https://pvp.haskell.org)
* initial release


[1.1.0.1]: https://github.com/AccelerateHS/accelerate-llvm/compare/1.1.0.0...1.1.0.1-native
[1.1.0.0]: https://github.com/AccelerateHS/accelerate-llvm/compare/1.0.0.0...1.1.0.0
[1.0.0.0]: https://github.com/AccelerateHS/accelerate-llvm/compare/be7f91295f77434b2103c70aa1cabb6a4f2b09a8...1.0.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ import Data.Array.Accelerate.LLVM.Native.Plugin.Annotation
import Data.Array.Accelerate.LLVM.Native.State
import Data.Array.Accelerate.LLVM.Native.Target

import Control.Concurrent.Unique
import Control.Monad
import Data.Hashable
import Foreign.Ptr
import GHC.Ptr ( Ptr(..) )
import Language.Haskell.TH ( Q, TExp )
import Numeric
import System.IO.Unsafe
import qualified Language.Haskell.TH as TH
import qualified Language.Haskell.TH.Syntax as TH
Expand Down Expand Up @@ -70,7 +73,8 @@ embed target (ObjectR uid nms !_) = do

makeFFI :: ShortByteString -> FilePath -> Q (TExp (FunPtr ()))
makeFFI (S8.unpack -> fn) objFile = do
fn' <- TH.newName ("__accelerate_llvm_native_" ++ fn)
i <- TH.runIO newUnique
fn' <- TH.newName ("__accelerate_llvm_native_" ++ showHex (hash i) [])
dec <- TH.forImpD TH.CCall TH.Unsafe ('&':fn) fn' [t| FunPtr () |]
ann <- TH.pragAnnD (TH.ValueAnnotation fn') [| (Object objFile) |]
TH.addTopDecls [dec, ann]
Expand Down
6 changes: 4 additions & 2 deletions accelerate-llvm-native/accelerate-llvm-native.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: accelerate-llvm-native
version: 1.1.0.0
version: 1.1.0.1
cabal-version: >= 1.10
tested-with: GHC >= 7.10
build-type: Simple
Expand Down Expand Up @@ -162,12 +162,14 @@ Library
, fclabels >= 2.0
, filepath >= 1.0
, ghc
, hashable >= 1.0
, libffi >= 0.1
, llvm-hs >= 4.1 && < 5.1
, llvm-hs-pure >= 4.1 && < 5.1
, mtl >= 2.2.1
, template-haskell
, time >= 1.4
, unique

default-language:
Haskell2010
Expand Down Expand Up @@ -231,7 +233,7 @@ source-repository head

source-repository this
type: git
tag: 1.1.0.0
tag: 1.1.0.1-native
location: https://github.com/AccelerateHS/accelerate-llvm.git

-- vim: nospell

0 comments on commit fd1a554

Please sign in to comment.