session

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mi = 1 << 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

Session contains the immutable topology and strategies for a given period of logical duration

func New

func New(strategy kb.Strategy, self plan.PeerID, pl plan.PeerList, client *client.Client, collectiveHandler *handler.CollectiveEndpoint, p2pHandler *handler.PeerToPeerEndpoint) (*Session, bool)

func (*Session) AllReduce

func (sess *Session) AllReduce(w Workspace) error

func (*Session) Barrier

func (sess *Session) Barrier() error

func (*Session) Broadcast

func (sess *Session) Broadcast(w Workspace) error

func (*Session) BytesConsensus

func (sess *Session) BytesConsensus(bs []byte, name string) (bool, error)

func (*Session) ClusterSize

func (sess *Session) ClusterSize() int

func (*Session) Consensus

func (sess *Session) Consensus(w Workspace) error

func (*Session) Gather

func (sess *Session) Gather(w Workspace) error

func (*Session) GetPeerLatencies

func (sess *Session) GetPeerLatencies() []time.Duration

func (*Session) LocalRank

func (sess *Session) LocalRank() int

func (*Session) Rank

func (sess *Session) Rank() int

func (*Session) Reduce

func (sess *Session) Reduce(w Workspace) error

func (*Session) Request

func (sess *Session) Request(rank int, version, name string, buf *kb.Vector) (bool, error)

type Workspace

type Workspace struct {
	SendBuf *kb.Vector
	RecvBuf *kb.Vector // TODO: if nil, will use SendBuf as in-place result
	OP      kb.OP
	Name    string
}

Workspace contains the data that a Kungfu operation will be performed on.

Jump to

Keyboard shortcuts

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