algorithm

package
v0.0.0-...-8f60dbe Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm interface {
	Iterate(*switches.Switch) switches.Match // Iterate runs algorithm in order to create match for next time-slot
}

Algorithm represents switching fabric algorithm

type DRRM

type DRRM struct {
	RequestArbiter []int
	GrantArbiter   []int
}

DRRM represents Dual Round Robin Matching Algorithm

func NewDRRM

func NewDRRM(n int) *DRRM

NewDRRM builds new instance of drrm for n port switch

func (*DRRM) Iterate

func (d *DRRM) Iterate(sw *switches.Switch) switches.Match

Iterate runs DRRM algorithm on given switch

type ISLIP

type ISLIP struct {
	I             int
	AcceptArbiter []int
	GrantArbiter  []int
}

ISLIP represents Iterative Round-Robin with SLIP Matching Algorithm

func NewISLIP

func NewISLIP(n int, i int) *ISLIP

NewISLIP builds new instance of iSLIP for n port switch that runs i iteration in each time-slot

func (*ISLIP) Iterate

func (s *ISLIP) Iterate(sw *switches.Switch) switches.Match

Iterate runs iSLIP algorithm on given switch

type RRLQF

type RRLQF struct {
	I int
	// contains filtered or unexported fields
}

RRLQF represents Iterative Round-Robin with Longest Queue First Algorithm

func NewRRLQF

func NewRRLQF(n int, i int) *RRLQF

NewRRLQF builds new instance of RR/LQF for n port switch that runs i iteration in each time-slot

func (*RRLQF) Iterate

func (r *RRLQF) Iterate(sw *switches.Switch) switches.Match

Iterate runs RR/LQF algorithm on given switch

type Remote

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

Remote represents endpoint for remote algorithm

func NewRemote

func NewRemote(url string) *Remote

NewRemote builds new instance of remote alogrithm endpoint

func (*Remote) Iterate

func (r *Remote) Iterate(sw *switches.Switch) switches.Match

Iterate calls remote algorithm on given switch

Jump to

Keyboard shortcuts

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