Safe Haskell | None |
---|---|
Language | Haskell2010 |
Simple C runtime representation.
Synopsis
- sameRepresentation :: [Type] -> [Type] -> Bool
- tupleField :: Int -> String
- tupleFieldExp :: ToExp a => a -> Int -> Exp
- funName :: Name -> String
- defaultMemBlockType :: Type
- intTypeToCType :: IntType -> Type
- floatTypeToCType :: FloatType -> Type
- primTypeToCType :: PrimType -> Type
- signedPrimTypeToCType :: Signedness -> PrimType -> Type
- cIntOps :: [Definition]
- cFloat32Ops :: [Definition]
- cFloat32Funs :: [Definition]
- cFloat64Ops :: [Definition]
- cFloat64Funs :: [Definition]
- cFloatConvOps :: [Definition]
Documentation
sameRepresentation :: [Type] -> [Type] -> Bool Source #
True if both types map to the same runtime representation. This is the case if they are identical modulo uniqueness.
tupleField :: Int -> String Source #
tupleField i
is the name of field number i
in a tuple.
tupleFieldExp :: ToExp a => a -> Int -> Exp Source #
tupleFieldExp e i
is the expression for accesing field i
of
tuple e
. If e
is an lvalue, so will the resulting expression
be.
funName :: Name -> String Source #
funName f
is the name of the C function corresponding to
the Futhark function f
.
defaultMemBlockType :: Type Source #
The type of memory blocks in the default memory space.
intTypeToCType :: IntType -> Type Source #
The C type corresponding to a signed integer type.
floatTypeToCType :: FloatType -> Type Source #
The C type corresponding to a float type.
primTypeToCType :: PrimType -> Type Source #
The C type corresponding to a primitive type. Integers are assumed to be unsigned.
signedPrimTypeToCType :: Signedness -> PrimType -> Type Source #
The C type corresponding to a primitive type. Integers are assumed to have the specified sign.
Primitive value operations
cIntOps :: [Definition] Source #
cFloat32Ops :: [Definition] Source #
cFloat32Funs :: [Definition] Source #
cFloat64Ops :: [Definition] Source #
cFloat64Funs :: [Definition] Source #
cFloatConvOps :: [Definition] Source #