dependencygraph

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: Apache-2.0 Imports: 7 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const NullStateAddress = StateAddress(0)

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomBehaviour

type AtomBehaviour struct {
	Reads     []StateAddress // States read by an atom.
	Modifies  []StateAddress // States read and written by an atom.
	Writes    []StateAddress // States written by an atom.
	Roots     []StateAddress // States labeled as root by an atom.
	KeepAlive bool           // Force the atom to be live.
	Aborted   bool           // Mutation of this command aborts.
}

func (*AtomBehaviour) Modify

func (b *AtomBehaviour) Modify(g *DependencyGraph, state StateKey)

func (*AtomBehaviour) Read

func (b *AtomBehaviour) Read(g *DependencyGraph, state StateKey)

func (*AtomBehaviour) Write

func (b *AtomBehaviour) Write(g *DependencyGraph, state StateKey)

type BehaviourProvider

type BehaviourProvider interface {
	GetBehaviourForAtom(context.Context, *api.State, api.CmdID, api.Cmd, *DependencyGraph) AtomBehaviour
}

type DependencyGraph

type DependencyGraph struct {
	Commands   []api.Cmd             // Atom list which this graph was build for.
	Behaviours []AtomBehaviour       // State reads/writes for each atom (graph edges).
	Roots      map[StateAddress]bool // State to mark live at requested atoms.
	// contains filtered or unexported fields
}

func GetDependencyGraph

func GetDependencyGraph(ctx context.Context) (*DependencyGraph, error)

func (*DependencyGraph) GetHierarchyStateMap

func (g *DependencyGraph) GetHierarchyStateMap() map[StateAddress]StateAddress

func (*DependencyGraph) GetStateAddressOf

func (g *DependencyGraph) GetStateAddressOf(key StateKey) StateAddress

func (*DependencyGraph) Print

func (g *DependencyGraph) Print(ctx context.Context, b *AtomBehaviour)

func (*DependencyGraph) SetRoot

func (g *DependencyGraph) SetRoot(key StateKey)

type DependencyGraphBehaviourProvider

type DependencyGraphBehaviourProvider interface {
	GetDependencyGraphBehaviourProvider(ctx context.Context) BehaviourProvider
}

type StateAddress

type StateAddress uint32

type StateKey

type StateKey interface {
	// Parent returns enclosing state (and this state is strict subset of it).
	// This allows efficient implementation of operations which access a lot state.
	Parent() StateKey
}

State key uniquely represents part of the GL state. Think of it as memory range (which stores the state data).

Jump to

Keyboard shortcuts

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