futhark
Safe HaskellNone
LanguageGHC2021

Language.Futhark.Interpreter.FFI.Push

Synopsis

Documentation

put :: forall (m :: Type -> Type). TypeName -> Value m -> ServerM ValueRef Source #

putArgs :: forall (m :: Type -> Type). Name -> [Value m] -> ServerM [ValueRef] Source #

Put these values on the server as the arguments of the given entry point.

get :: forall (m :: Type -> Type). ValueShape -> ValueRef -> ServerM (Value m) Source #

hasLazy :: forall (m :: Type -> Type). Value m -> Bool Source #

Does this value contain any references to values residing on a server?

getLazy :: forall (a :: Type -> Type). Value a -> ServerM (Value a) Source #

Get all the values residing on the server. The resulting Value has no ValueLazyFFI in it.

lazyGet :: forall (m :: Type -> Type). ValueShape -> ValueRef -> ServerM (Value m) Source #

As get, but arrays, including those in records, are left on the server.

data ResShape Source #

How much of the shape of a value its type determines. Array dimensions may be unknown at the type level, so they must be extracted from the actual server-side value.

Constructors

ResArray ResShape

An array of any rank; the argument describes its elements (after stripping array dimensions).

ResRecord (Map Name ResShape)

A record, whose fields are described individually.

ResSum (Map Name [ResShape])

A sum type, whose constructor payloads are described individually. Only the payload of the constructor that is actually present can be inspected, so the resulting shape describes only that constructor.

ResKnown ValueShape

Determined by the type alone.

resultShape :: ResShape -> ValueRef -> ServerM ValueShape Source #

Determine the shape of a value residing on the server, consulting the server for whatever the type did not settle.