| 1 |
package main |
| 2 |
|
| 3 |
import "text/template" |
| 4 |
|
| 5 |
var arithDocStrings = map[string]*template.Template{ |
| 6 |
"Add": template.Must(template.New("+").Parse("// Add performs {{.Left}} + {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 7 |
"Sub": template.Must(template.New("-").Parse("// Sub performs {{.Left}} - {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 8 |
"Mul": template.Must(template.New("×").Parse("// Mul performs {{.Left}} × {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 9 |
"Div": template.Must(template.New("÷").Parse("// Div performs {{.Left}} ÷ {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 10 |
"Pow": template.Must(template.New("^").Parse("// Pow performs {{.Left}} ^ {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 11 |
"Mod": template.Must(template.New("%").Parse("// Mod performs {{.Left}} % {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 12 |
|
| 13 |
"AddScalar": template.Must(template.New("+").Parse("// AddScalar performs {{.Left}} + {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 14 |
"SubScalar": template.Must(template.New("-").Parse("// SubScalar performs {{.Left}} - {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 15 |
"MulScalar": template.Must(template.New("×").Parse("// MulScalar performs {{.Left}} × {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 16 |
"DivScalar": template.Must(template.New("÷").Parse("// DivScalar performs {{.Left}} ÷ {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 17 |
"PowScalar": template.Must(template.New("^").Parse("// PowScalar performs {{.Left}} ^ {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 18 |
"ModScalar": template.Must(template.New("%").Parse("// ModScalar performs {{.Left}} % {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}.\n// Acceptable FuncOpts are: UseUnsafe(), WithReuse(T), WithIncr(T)\n")), |
| 19 |
} |
| 20 |
|
| 21 |
var cmpDocStrings = map[string]*template.Template{ |
| 22 |
"Lt": template.Must(template.New("+").Parse("// Lt performs {{.Left}} < {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n//UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 23 |
"Lte": template.Must(template.New("+").Parse("// Lte performs {{.Left}} ≤ {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n//UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 24 |
"Gt": template.Must(template.New("+").Parse("// Gt performs {{.Left}} > {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n//UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 25 |
"Gte": template.Must(template.New("+").Parse("// Gte performs {{.Left}} ≥ {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n//UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 26 |
"ElEq": template.Must(template.New("+").Parse("// ElEq performs {{.Left}} == {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n//UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 27 |
"ElNe": template.Must(template.New("+").Parse("// ElNe performs {{.Left}} ≠ {{.Right}} elementwise. Both {{.Left}} and {{.Right}} must have the same shape.\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n//UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 28 |
|
| 29 |
"LtScalar": template.Must(template.New("+").Parse("// LtScalar performs {{.Left}} < {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n// UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 30 |
"LteScalar": template.Must(template.New("+").Parse("// LteScalar performs {{.Left}} ≤ {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n// UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 31 |
"GtScalar": template.Must(template.New("+").Parse("// GtScalar performs {{.Left}} > {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n// UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 32 |
"GteScalar": template.Must(template.New("+").Parse("// GteScalar performs {{.Left}} ≥ {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n// UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 33 |
"ElEqScalar": template.Must(template.New("+").Parse("// EqScalar performs {{.Left}} == {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n// UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 34 |
"ElNeScalar": template.Must(template.New("+").Parse("// NeScalar performs {{.Left}} ≠ {{.Right}} elementwise. The leftTensor parameter indicates if the tensor is the left operand. Only scalar types are accepted in {{.Right}}\n// Acceptable FuncOpts are: UseUnsafe(), AsSameType(), WithReuse().\n// UseUnsafe() will ensure that the same type is returned.\n// Tensors used in WithReuse has to have the same Dtype as the return value's Dtype.\n")), |
| 35 |
} |