Created
March 8, 2017 00:36
-
-
Save bgamari/29fdc634f18b508907528fd92d6f5335 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MagicHash #-} | |
{-# LANGUAGE UnboxedTuples #-} | |
import GHC.Prim | |
import GHC.Float | |
main :: IO () | |
main = do | |
let x = broadcastDoubleX4# 42.0## | |
y = broadcastDoubleX4# 52.0## | |
z = addIt x y | |
(# _,_,_,a #) = unpackDoubleX4# z | |
print (D# a) | |
addIt :: DoubleX4# -> DoubleX4# -> DoubleX4# | |
addIt x y = plusDoubleX4# x y | |
{-# NOINLINE addIt #-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment