167 references to TensorPrimitives
Microsoft.ML.CpuMath (12)
CpuMathUtils.cs (11)
24
TensorPrimitives
.Add(destination, value, destination);
36
TensorPrimitives
.Multiply(destination, value, destination);
56
TensorPrimitives
.Multiply(source.Slice(0, count), value, destination);
75
TensorPrimitives
.MultiplyAdd(source.Slice(0, count), scale, destination.Slice(0, count), destination);
97
TensorPrimitives
.MultiplyAdd(source.Slice(0, count), scale, destination.Slice(0, count), result.Slice(0, count));
115
TensorPrimitives
.Add(source.Slice(0, count), destination.Slice(0, count), destination.Slice(0, count));
136
TensorPrimitives
.Multiply(left.Slice(0, count), right.Slice(0, count), destination.Slice(0, count));
149
return
TensorPrimitives
.Sum(source);
162
return
TensorPrimitives
.SumOfSquares(source);
175
return
TensorPrimitives
.SumOfMagnitudes(source);
194
return
TensorPrimitives
.Dot(left.Slice(0, count), right.Slice(0, count));
CpuMathUtils.netcoreapp.cs (1)
443
var value =
TensorPrimitives
.Distance(left.Slice(0, count), right.Slice(0, count));
System.Numerics.Tensors (155)
System\Numerics\Tensors\netcore\TensorExtensions.cs (128)
3520
TensorPrimitives
.Subtract(span, mean, output);
3521
TensorPrimitives
.Abs(output, output);
3522
TensorPrimitives
.Pow((ReadOnlySpan<T>)output, T.CreateChecked(2), output);
3523
T sum =
TensorPrimitives
.Sum((ReadOnlySpan<T>)output);
3808
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Abs);
3833
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Acos);
3858
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Acosh);
3883
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.AcosPi);
3932
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Add);
3944
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Add);
3969
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Asin);
3994
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Asinh);
4019
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.AsinPi);
4044
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Atan);
4080
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Atan2);
4106
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Atan2);
4132
return ref TensorPrimitivesHelperTInSpanInSpanOut(x, y, destination,
TensorPrimitives
.Atan2);
4168
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Atan2Pi);
4194
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Atan2Pi);
4220
return ref TensorPrimitivesHelperTInSpanInSpanOut(x, y, destination,
TensorPrimitives
.Atan2Pi);
4246
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Atanh);
4271
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.AtanPi);
4307
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.BitwiseAnd);
4333
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.BitwiseAnd);
4369
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.BitwiseOr);
4395
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.BitwiseOr);
4420
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Cbrt);
4445
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Ceiling);
4475
return ref TensorPrimitivesHelperSpanInSpanOut(source, destination,
TensorPrimitives
.ConvertChecked);
4505
return ref TensorPrimitivesHelperSpanInSpanOut(source, destination,
TensorPrimitives
.ConvertSaturating);
4535
return ref TensorPrimitivesHelperSpanInSpanOut(source, destination,
TensorPrimitives
.ConvertTruncating);
4585
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, sign, destination,
TensorPrimitives
.CopySign);
4597
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, sign, destination,
TensorPrimitives
.CopySign);
4622
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Cos);
4647
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Cosh);
4721
values[outputOffset++] =
TensorPrimitives
.CosineSimilarity(lspan, rspan);
4774
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.CosPi);
4799
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.DegreesToRadians);
4812
return TensorPrimitivesHelperTwoSpanInTOut(x, y,
TensorPrimitives
.Distance);
4875
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Divide);
4887
return ref TensorPrimitivesHelperTInSpanInSpanOut(x, y, destination,
TensorPrimitives
.Divide);
4900
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Divide);
4913
return TensorPrimitivesHelperTwoSpanInTOut(x, y,
TensorPrimitives
.Dot);
4938
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Exp);
4963
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Exp10);
4984
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Exp10M1);
5005
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Exp2);
5026
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Exp2M1);
5047
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.ExpM1);
5068
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Floor);
5106
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Hypot);
5140
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Ieee754Remainder);
5162
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Ieee754Remainder);
5184
return ref TensorPrimitivesHelperTInSpanInSpanOut(x, y, destination,
TensorPrimitives
.Ieee754Remainder);
5205
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.ILogB);
5216
return
TensorPrimitives
.IndexOfMax(span);
5227
return
TensorPrimitives
.IndexOfMaxMagnitude(span);
5238
return
TensorPrimitives
.IndexOfMin(span);
5251
return
TensorPrimitives
.IndexOfMinMagnitude(span);
5276
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.LeadingZeroCount);
5301
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Log);
5331
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Log);
5353
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Log);
5378
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Log10);
5403
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Log10P1);
5428
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Log2);
5453
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Log2P1);
5478
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.LogP1);
5488
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.Max);
5518
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Max);
5539
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Max);
5549
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.MaxMagnitude);
5579
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.MaxMagnitude);
5600
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.MaxMagnitude);
5610
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.MaxMagnitudeNumber);
5640
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.MaxMagnitudeNumber);
5661
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.MaxMagnitudeNumber);
5671
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.MaxNumber);
5701
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.MaxNumber);
5722
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.MaxNumber);
5732
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.Min);
5762
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Min);
5783
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Min);
5793
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.MinMagnitude);
5823
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.MinMagnitude);
5844
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.MinMagnitude);
5854
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.MinMagnitudeNumber);
5884
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.MinMagnitudeNumber);
5905
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.MinMagnitudeNumber);
5915
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.MinNumber);
5945
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.MinNumber);
5966
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.MinNumber);
6018
TensorPrimitives
.Multiply(span, y, ospan);
6032
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Multiply);
6053
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Negate);
6065
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.Norm);
6086
return ref TensorPrimitivesHelperSpanInSpanOut(y, destination,
TensorPrimitives
.OnesComplement);
6107
return ref TensorPrimitivesHelperSpanInSpanOut(y, destination,
TensorPrimitives
.PopCount);
6139
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Pow);
6161
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Pow);
6183
return ref TensorPrimitivesHelperTInSpanInSpanOut(x, y, destination,
TensorPrimitives
.Pow);
6193
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.Product);
6214
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.RadiansToDegrees);
6235
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Reciprocal);
6263
TensorPrimitives
.RootN(span, n, ospan);
6294
TensorPrimitives
.RotateLeft(span, rotateAmount, ospan);
6325
TensorPrimitives
.RotateRight(span, rotateAmount, ospan);
6347
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Round);
6375
TensorPrimitives
.Round(span, digits, mode, ospan);
6402
TensorPrimitives
.Round(span, digits, ospan);
6429
TensorPrimitives
.Round(span, mode, ospan);
6451
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Sigmoid);
6476
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Sin);
6497
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Sinh);
6518
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.SinPi);
6539
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.SoftMax);
6564
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Sqrt);
6626
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Subtract);
6638
return ref TensorPrimitivesHelperTInSpanInSpanOut(x, y, destination,
TensorPrimitives
.Subtract);
6650
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Subtract);
6663
return TensorPrimitivesHelperSpanInTOut(x,
TensorPrimitives
.Sum);
6684
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Tan);
6705
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Tanh);
6726
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.TanPi);
6747
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.TrailingZeroCount);
6768
return ref TensorPrimitivesHelperSpanInSpanOut(x, destination,
TensorPrimitives
.Truncate);
6800
return ref TensorPrimitivesHelperTwoSpanInSpanOut(x, y, destination,
TensorPrimitives
.Xor);
6825
return ref TensorPrimitivesHelperSpanInTInSpanOut(x, y, destination,
TensorPrimitives
.Xor);
System\Numerics\Tensors\netcore\TensorHelpers.cs (1)
110
if (tensor._shape.Strides[i] !=
TensorPrimitives
.Product(tensor.Lengths.Slice(i + 1, tensor.Lengths.Length - i - 1)))
System\Numerics\Tensors\netcore\TensorPrimitives.Single.netcore.cs (26)
9
global using AbsoluteOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.AbsoluteOperator<float>;
10
global using AddOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.AddOperator<float>;
11
global using AddMultiplyOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.AddMultiplyOperator<float>;
12
global using CoshOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.CoshOperator<float>;
13
global using SubtractSquaredOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.SubtractSquaredOperator<float>;
14
global using DivideOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.DivideOperator<float>;
15
global using MultiplyOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.MultiplyOperator<float>;
16
global using ExpOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.ExpOperator<float>;
17
global using IndexOfMaxOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.IndexOfMaxOperator<float>;
18
global using IndexOfMaxMagnitudeOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.IndexOfMaxMagnitudeOperator<float>;
19
global using IndexOfMinOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.IndexOfMinOperator<float>;
20
global using IndexOfMinMagnitudeOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.IndexOfMinMagnitudeOperator<float>;
21
global using LogOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.LogOperator<float>;
22
global using Log2Operator_Single = System.Numerics.Tensors.
TensorPrimitives
.Log2Operator<float>;
23
global using MaxOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.MaxOperator<float>;
24
global using MaxMagnitudeOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.MaxMagnitudeOperator<float>;
25
global using MinOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.MinOperator<float>;
26
global using MinMagnitudeOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.MinMagnitudeOperator<float>;
27
global using MultiplyAddOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.MultiplyAddOperator<float>;
28
global using NegateOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.NegateOperator<float>;
29
global using IdentityOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.IdentityOperator<float>;
30
global using SubtractOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.SubtractOperator<float>;
31
global using SigmoidOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.SigmoidOperator<float>;
32
global using SinhOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.SinhOperator<float>;
33
global using SquaredOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.SquaredOperator<float>;
34
global using TanhOperator_Single = System.Numerics.Tensors.
TensorPrimitives
.TanhOperator<float>;