futhark-0.21.1: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

Futhark.CodeGen.Backends.GenericC.Manifest

Description

C manifest data structure and serialisation to JSON.

A manifest contains machine-readable information about the API of the compiled Futhark program. Specifically which entry points are available, which types are exposed, and what their C names are.

Synopsis

Documentation

data Manifest Source #

A manifest for a compiled program.

Constructors

Manifest 

Fields

  • manifestEntryPoints :: Map Text EntryPoint

    A mapping from Futhark entry points to how they are represented in C.

  • manifestTypes :: Map Text Type

    A mapping from Futhark type name to how they are represented at the C level. Should not contain any of the primitive scalar types. For array types, these have empty dimensions, e.g. []i32.

  • manifestBackend :: Text

    The compiler backend used to compile the program, e.g. c.

data Input Source #

Manifest info for an entry point parameter.

Constructors

Input 

Instances

Instances details
Eq Input Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

(==) :: Input -> Input -> Bool #

(/=) :: Input -> Input -> Bool #

Ord Input Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

compare :: Input -> Input -> Ordering #

(<) :: Input -> Input -> Bool #

(<=) :: Input -> Input -> Bool #

(>) :: Input -> Input -> Bool #

(>=) :: Input -> Input -> Bool #

max :: Input -> Input -> Input #

min :: Input -> Input -> Input #

Show Input Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

showsPrec :: Int -> Input -> ShowS #

show :: Input -> String #

showList :: [Input] -> ShowS #

data Output Source #

Manifest info for an entry point return value.

Constructors

Output 

Instances

Instances details
Eq Output Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

(==) :: Output -> Output -> Bool #

(/=) :: Output -> Output -> Bool #

Ord Output Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Show Output Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

data Type Source #

Manifest info for a non-scalar type. Scalar types are not part of the manifest for a program.

Constructors

TypeArray Text Text Int ArrayOps

ctype, Futhark elemtype, rank.

TypeOpaque Text OpaqueOps 

Instances

Instances details
Eq Type Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Ord Type Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Show Type Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericC.Manifest

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

data ArrayOps Source #

The names of the C functions implementing the operations on some array type.

Constructors

ArrayOps 

data OpaqueOps Source #

The names of the C functions implementing the operations on some opaque type.

Constructors

OpaqueOps 

manifestToJSON :: Manifest -> Text Source #

Serialise a manifest in JSON format, so it can be read from other tools. The schema supposed to be at https://futhark-lang.org/manifest.schema.json.