api

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Overview

Package api defines the interface between a backend and a GX package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device created by a runtime.

func (*Device) PlatformDevice

func (dev *Device) PlatformDevice() platform.Device

PlatformDevice returns the device used on the platform.

func (*Device) Runtime

func (dev *Device) Runtime() *Runtime

Runtime returns the device's parent runtime.

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime encapsulates a GX builder and a backend. A backend is a platform managing one or more devices and a graph builder.

func NewRuntime

func NewRuntime(bck backend.Backend, bld *builder.Builder) *Runtime

NewRuntime returns a new GX runtime.

func (*Runtime) Backend

func (rtm *Runtime) Backend() backend.Backend

Backend used by the runtime.

func (*Runtime) Builder

func (rtm *Runtime) Builder() *builder.Builder

Builder returns the builder used to build GX source code into a GX intermediate representation.

func (*Runtime) Device

func (rtm *Runtime) Device(ord int) (*Device, error)

Device returns a new device on the platform.

Directories

Path Synopsis
Package options specifies options for packages.
Package options specifies options for packages.
Package trace is the API to use the builtin `trace` in GX.
Package trace is the API to use the builtin `trace` in GX.
Package tracer implements a context and evaluator for the interpreter which builds a graph by tracing operators being executed when GX code is interpreted.
Package tracer implements a context and evaluator for the interpreter which builds a graph by tracing operators being executed when GX code is interpreted.
Package values implements all values that GX can represent.
Package values implements all values that GX can represent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL