module Language.Paraiso.Generator.Native (
Setup(..), defaultSetup,
Language(..)
) where
import Data.Tensor.TypeLevel
import qualified Language.Paraiso.Optimization as Opt
import qualified Language.Paraiso.Annotation.Boundary as B
data Setup (vector :: * -> *) (gauge :: *)
= Setup
{ language :: Language,
directory :: FilePath,
optLevel :: Opt.Level,
localSize :: vector gauge,
boundary :: vector B.Condition,
cudaGridSize :: (Int, Int)
}
deriving instance (Show (v B.Condition), Show (v g))
=> Show (Setup v g)
defaultSetup :: (Opt.Ready v g) => v g -> Setup v g
defaultSetup sz
= Setup
{ language = CPlusPlus,
directory = "./",
optLevel = Opt.O3,
localSize = sz,
boundary = compose $ const B.Open,
cudaGridSize = (32, 32)
}
data Language
= CPlusPlus
| CUDA
deriving (Eq, Show)