futhark-0.9.1: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Futhark.CodeGen.Backends.SimpleRepresentation

Contents

Description

Simple C runtime representation.

Synopsis

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