Permalink
Browse files

Merge branch 'master' of github.com:zhensydow/opencl

  • Loading branch information...
2 parents 0009159 + 09a089c commit c5e43732ccdec722d5f54250eb347bcdbdfe729c @zhensydow zhensydow committed Feb 20, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 OpenCL.cabal
  2. +2 −2 src/Control/Parallel/OpenCL/Types.chs
View
@@ -34,7 +34,7 @@ Library
Build-tools: c2hs
hs-Source-Dirs: src
ghc-options: -Wall
- Build-Depends: base >=4.0 && < 5, bytestring -any, mtl==2.0.*
+ Build-Depends: base >=4.0 && < 5, bytestring -any, mtl>=2
Exposed-Modules:
Control.Parallel.OpenCL
Control.Parallel.OpenCL.Query
@@ -711,10 +711,10 @@ binaryFlags m = map toEnum . takeWhile (<= (fromEnum m)) $ [1 `shiftL` n | n <-
testMask :: Bits b => b -> b -> Bool
testMask mask v = (v .&. mask) == v
-bitmaskFromFlags :: (Enum a, Bits b) => [a] -> b
+bitmaskFromFlags :: (Enum a, Bits b, Num b) => [a] -> b
bitmaskFromFlags = foldl' (.|.) 0 . map (fromIntegral . fromEnum)
-bitmaskToFlags :: (Enum a, Bits b) => [a] -> b -> [a]
+bitmaskToFlags :: (Enum a, Bits b, Num b) => [a] -> b -> [a]
bitmaskToFlags xs mask = filter (testMask mask . fromIntegral . fromEnum) xs
bitmaskToDeviceTypes :: CLDeviceType_ -> [CLDeviceType]

0 comments on commit c5e4373

Please sign in to comment.