halide-haskell-0.0.1.0: example/Example01.hs
import Control.Monad (when)
import Language.Halide
main :: IO ()
main = do
let !host = hostTarget
putStrLn $ "[+] host target is " <> show host
when (hostSupportsTargetDevice (setFeature FeatureOpenCL host)) $ do
putStrLn "[+] OpenCL is supported! Testing ..."
testOpenCL
when (hostSupportsTargetDevice (setFeature FeatureCUDA host)) $ do
putStrLn "[+] CUDA is supported! Testing ..."
testCUDA