forked from gorgonia/gorgonia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_gen.go
126 lines (94 loc) · 5.2 KB
/
api_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package gorgonia
// Code generated by genapi, which is a API generation tool for Gorgonia. DO NOT EDIT.
// Abs performs a pointwise abs.
func Abs(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(absOpType, a), a) }
// Sign performs a pointwise sign.
func Sign(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(signOpType, a), a) }
// Ceil performs a pointwise ceil.
func Ceil(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(ceilOpType, a), a) }
// Floor performs a pointwise floor.
func Floor(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(floorOpType, a), a) }
// Sin performs a pointwise sin.
func Sin(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(sinOpType, a), a) }
// Cos performs a pointwise cos.
func Cos(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(cosOpType, a), a) }
// Exp performs a pointwise exp.
func Exp(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(expOpType, a), a) }
// Log performs a pointwise log.
func Log(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(lnOpType, a), a) }
// Log2 performs a pointwise log2.
func Log2(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(log2OpType, a), a) }
// Neg performs a pointwise neg.
func Neg(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(negOpType, a), a) }
// Square performs a pointwise square.
func Square(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(squareOpType, a), a) }
// Sqrt performs a pointwise sqrt.
func Sqrt(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(sqrtOpType, a), a) }
// Inverse performs a pointwise inverse.
func Inverse(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(inverseOpType, a), a) }
// InverseSqrt performs a pointwise inversesqrt.
func InverseSqrt(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(inverseSqrtOpType, a), a) }
// Cube performs a pointwise cube.
func Cube(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(cubeOpType, a), a) }
// Tanh performs a pointwise tanh.
func Tanh(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(tanhOpType, a), a) }
// Sigmoid performs a pointwise sigmoid.
func Sigmoid(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(sigmoidOpType, a), a) }
// Log1p performs a pointwise log1p.
func Log1p(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(log1pOpType, a), a) }
// Expm1 performs a pointwise expm1.
func Expm1(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(expm1OpType, a), a) }
// Softplus performs a pointwise softplus.
func Softplus(a *Node) (*Node, error) { return unaryOpNode(newElemUnaryOp(softplusOpType, a), a) }
// Add perfors a pointwise add operation.
func Add(a, b *Node) (*Node, error) { return binOpNode(newElemBinOp(addOpType, a, b), a, b) }
// Sub perfors a pointwise sub operation.
func Sub(a, b *Node) (*Node, error) { return binOpNode(newElemBinOp(subOpType, a, b), a, b) }
// HadamardProd perfors a pointwise hadamardprod operation.
func HadamardProd(a, b *Node) (*Node, error) { return binOpNode(newElemBinOp(mulOpType, a, b), a, b) }
// HadamardDiv perfors a pointwise hadamarddiv operation.
func HadamardDiv(a, b *Node) (*Node, error) { return binOpNode(newElemBinOp(divOpType, a, b), a, b) }
// Pow perfors a pointwise pow operation.
func Pow(a, b *Node) (*Node, error) { return binOpNode(newElemBinOp(powOpType, a, b), a, b) }
// Lt perfors a pointwise lt operation.
// retSame indicates if the data type of the return value should be the same as the input data type. It defaults to Bool otherwise.
func Lt(a, b *Node, retSame bool) (*Node, error) {
op := newElemBinOp(ltOpType, a, b)
op.retSame = retSame
return binOpNode(op, a, b)
}
// Gt perfors a pointwise gt operation.
// retSame indicates if the data type of the return value should be the same as the input data type. It defaults to Bool otherwise.
func Gt(a, b *Node, retSame bool) (*Node, error) {
op := newElemBinOp(gtOpType, a, b)
op.retSame = retSame
return binOpNode(op, a, b)
}
// Lte perfors a pointwise lte operation.
// retSame indicates if the data type of the return value should be the same as the input data type. It defaults to Bool otherwise.
func Lte(a, b *Node, retSame bool) (*Node, error) {
op := newElemBinOp(lteOpType, a, b)
op.retSame = retSame
return binOpNode(op, a, b)
}
// Gte perfors a pointwise gte operation.
// retSame indicates if the data type of the return value should be the same as the input data type. It defaults to Bool otherwise.
func Gte(a, b *Node, retSame bool) (*Node, error) {
op := newElemBinOp(gteOpType, a, b)
op.retSame = retSame
return binOpNode(op, a, b)
}
// Eq perfors a pointwise eq operation.
// retSame indicates if the data type of the return value should be the same as the input data type. It defaults to Bool otherwise.
func Eq(a, b *Node, retSame bool) (*Node, error) {
op := newElemBinOp(eqOpType, a, b)
op.retSame = retSame
return binOpNode(op, a, b)
}
// Ne perfors a pointwise ne operation.
// retSame indicates if the data type of the return value should be the same as the input data type. It defaults to Bool otherwise.
func Ne(a, b *Node, retSame bool) (*Node, error) {
op := newElemBinOp(neOpType, a, b)
op.retSame = retSame
return binOpNode(op, a, b)
}