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