Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Simple C runtime representation.
Synopsis
- tupleField :: Int -> String
- funName :: Name -> String
- defaultMemBlockType :: Type
- intTypeToCType :: IntType -> Type
- primTypeToCType :: PrimType -> Type
- signedPrimTypeToCType :: Signedness -> PrimType -> Type
- arrayName :: PrimType -> Signedness -> Int -> String
- opaqueName :: String -> [ValueDesc] -> String
- externalValueType :: ExternalValue -> Type
- cproduct :: [Exp] -> Exp
- csum :: [Exp] -> Exp
- cIntOps :: [Definition]
- cFloat32Ops :: [Definition]
- cFloat32Funs :: [Definition]
- cFloat64Ops :: [Definition]
- cFloat64Funs :: [Definition]
- cFloatConvOps :: [Definition]
- storageSize :: PrimType -> Int -> Exp -> Exp
- storeValueHeader :: Signedness -> PrimType -> Int -> Exp -> Exp -> [Stm]
- loadValueHeader :: Signedness -> PrimType -> Int -> Exp -> Exp -> [Stm]
Documentation
tupleField :: Int -> String Source #
tupleField i
is the name of field number i
in a tuple.
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.
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.
arrayName :: PrimType -> Signedness -> Int -> String Source #
The name of exposed array type structs.
externalValueType :: ExternalValue -> Type Source #
The type used to expose a Futhark value in the C API. A pointer in the case of arrays and opaques.
cproduct :: [Exp] -> Exp Source #
Return an expression multiplying together the given expressions.
If an empty list is given, the expression 1
is returned.
Return an expression summing the given expressions.
If an empty list is given, the expression 0
is returned.
Primitive value operations
cIntOps :: [Definition] Source #
cFloat32Ops :: [Definition] Source #
cFloat32Funs :: [Definition] Source #
cFloat64Ops :: [Definition] Source #
cFloat64Funs :: [Definition] Source #
cFloatConvOps :: [Definition] Source #
Storing/restoring values in byte sequences
storeValueHeader :: Signedness -> PrimType -> Int -> Exp -> Exp -> [Stm] Source #
loadValueHeader :: Signedness -> PrimType -> Int -> Exp -> Exp -> [Stm] Source #