Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

BREAKING CHANGE: OperationCarrier interface have changes to fix Issue 48 #115

Merged
merged 10 commits into from
Aug 27, 2019
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ type Backend interface {
[embedmd]:# (backend.go /type OperationCarrier/ /}/)
```go
type OperationCarrier interface {
ApplyOperation(Operation, graph.Node) error
// ApplyOperation on the graph nodes
// graph.Node is an array because it allows to handle multiple output
// for example a split operation returns n nodes...
ApplyOperation(Operation, ...graph.Node) error
}
```

Expand Down
5 changes: 4 additions & 1 deletion backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ type Operation struct {
// because the operation needs the topology of the graph
// to check the arity of the node for example
type OperationCarrier interface {
ApplyOperation(Operation, graph.Node) error
// ApplyOperation on the graph nodes
// graph.Node is an array because it allows to handle multiple output
// for example a split operation returns n nodes...
ApplyOperation(Operation, ...graph.Node) error
}
2 changes: 1 addition & 1 deletion backend/simple/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,6 @@ func (g *Graph) To(id int64) graph.Nodes {
return g.g.To(id)
}

func (g *Graph) ApplyOperation(o onnx.Operation, n graph.Node) error {
func (g *Graph) ApplyOperation(_ onnx.Operation, _ ...graph.Node) error {
return nil
}
Loading