Skip to content

Commit cefd1a7

Browse files
Refactor the generic TensorPrimitives implementation into multiple files. (#98566)
* Refactor the generic TensorPrimitives implementation into multiple files. * Use one file per method group. * Rename Operators -> Common
1 parent 3149a75 commit cefd1a7

File tree

105 files changed

+24557
-23396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+24557
-23396
lines changed

src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj

+102-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
@@ -15,9 +15,108 @@
1515
</ItemGroup>
1616

1717
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
18+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs" />
19+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs" />
20+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfOperator.cs" />
21+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs" />
22+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs" />
23+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryInputBinaryOutput.cs" />
24+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs" />
25+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs" />
26+
<Compile Include="System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs" />
27+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs" />
28+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Acos.cs" />
29+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Acosh.cs" />
30+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.AcosPi.cs" />
31+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Add.cs" />
32+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.AddMultiply.cs" />
33+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Asin.cs" />
34+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Asinh.cs" />
35+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.AsinPi.cs" />
36+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Atan.cs" />
37+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Atan2.cs" />
38+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Atan2Pi.cs" />
39+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Atanh.cs" />
40+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.AtanPi.cs" />
41+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.BitwiseAnd.cs" />
42+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.BitwiseOr.cs" />
43+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs" />
44+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs" />
45+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ConvertChecked.cs" />
46+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs" />
47+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ConvertSaturating.cs" />
48+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs" />
49+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs" />
50+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs" />
51+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs" />
52+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs" />
53+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs" />
54+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs" />
55+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Distance.cs" />
56+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Divide.cs" />
57+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Dot.cs" />
58+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs" />
59+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs" />
60+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Exp10M1.cs" />
61+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs" />
62+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Exp2M1.cs" />
63+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ExpM1.cs" />
64+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.FloatHelpers.cs" />
65+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs" />
66+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs" />
67+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs" />
68+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs" />
69+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Ieee754Remainder.cs" />
70+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ILogB.cs" />
71+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs" />
72+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMaxMagnitude.cs" />
73+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMin.cs" />
74+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMinMagnitude.cs" />
75+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs" />
76+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs" />
77+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs" />
78+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs" />
79+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Log10P1.cs" />
80+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs" />
81+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Log2P1.cs" />
82+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.LogP1.cs" />
83+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs" />
84+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs" />
85+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs" />
86+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs" />
87+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Multiply.cs" />
88+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAdd.cs" />
89+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs" />
90+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Negate.cs" />
91+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Norm.cs" />
92+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.OnesComplement.cs" />
93+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs" />
94+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Pow.cs" />
95+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Product.cs" />
96+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs" />
97+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs" />
98+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs" />
99+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Rotate.cs" />
100+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs" />
101+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ScaleB.cs" />
102+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.ShiftLeft.cs" />
103+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs" />
104+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs" />
105+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.SinCos.cs" />
106+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.SinCosPi.cs" />
18107
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Single.netcore.cs" />
19-
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.T.cs" />
20-
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.netcore.cs" />
108+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs" />
109+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs" />
110+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.SoftMax.cs" />
111+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs" />
112+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Subtract.cs" />
113+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Sum.cs" />
114+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs" />
115+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs" />
116+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.TanPi.cs" />
117+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.TrailingZeroCount.cs" />
118+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs" />
119+
<Compile Include="System\Numerics\Tensors\netcore\TensorPrimitives.Xor.cs" />
21120
</ItemGroup>
22121

23122
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

0 commit comments

Comments
 (0)