-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathPow.cs
More file actions
56 lines (53 loc) · 2.77 KB
/
Copy pathPow.cs
File metadata and controls
56 lines (53 loc) · 2.77 KB
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
using Tensornet.Common;
namespace Tensornet.Math{
public static partial class MathT{
public static Tensor<double> Pow(Tensor<double> inp, int y){
return OnElemOperation.Execute<double, double>(inp, x => System.Math.Pow(x, y));
}
public static Tensor<float> Pow(Tensor<float> inp, int y){
return OnElemOperation.Execute<float, float>(inp, x => System.MathF.Pow(x, y));
}
public static Tensor<double> Pow(Tensor<long> inp, int y){
return OnElemOperation.Execute<long, double>(inp, x => System.Math.Pow(x, y));
}
public static Tensor<double> Pow(Tensor<int> inp, int y){
return OnElemOperation.Execute<int, double>(inp, x => System.Math.Pow(x, y));
}
public static Tensor<double> Pow(Tensor<double> inp, double y){
return OnElemOperation.Execute<double, double>(inp, x => System.Math.Pow(x, y));
}
public static Tensor<float> Pow(Tensor<float> inp, double y){
return OnElemOperation.Execute<float, float>(inp, x => System.MathF.Pow(x, (float)y));
}
public static Tensor<double> Pow(Tensor<long> inp, double y){
return OnElemOperation.Execute<long, double>(inp, x => System.Math.Pow(x, y));
}
public static Tensor<double> Pow(Tensor<int> inp, double y){
return OnElemOperation.Execute<int, double>(inp, x => System.Math.Pow(x, y));
}
public static Tensor<double> Pow(int y, Tensor<double> inp){
return OnElemOperation.Execute<double, double>(inp, x => System.Math.Pow(y, x));
}
public static Tensor<float> Pow(int y, Tensor<float> inp){
return OnElemOperation.Execute<float, float>(inp, x => System.MathF.Pow(y, x));
}
public static Tensor<double> Pow(int y, Tensor<long> inp){
return OnElemOperation.Execute<long, double>(inp, x => System.Math.Pow(y, x));
}
public static Tensor<double> Pow(int y, Tensor<int> inp){
return OnElemOperation.Execute<int, double>(inp, x => System.Math.Pow(y, x));
}
public static Tensor<double> Pow(double y, Tensor<double> inp){
return OnElemOperation.Execute<double, double>(inp, x => System.Math.Pow(y, x));
}
public static Tensor<float> Pow(double y, Tensor<float> inp){
return OnElemOperation.Execute<float, float>(inp, x => System.MathF.Pow((float)y, x));
}
public static Tensor<double> Pow(double y, Tensor<long> inp){
return OnElemOperation.Execute<long, double>(inp, x => System.Math.Pow(y, x));
}
public static Tensor<double> Pow(double y, Tensor<int> inp){
return OnElemOperation.Execute<int, double>(inp, x => System.Math.Pow(y, x));
}
}
}