77 references to TensorHelpers
System.Numerics.Tensors (77)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (6)
540if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 563nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 564int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1; 596if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 619nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 620int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1;
System\Numerics\Tensors\netcore\Tensor.cs (1)
354nint linearLength = TensorHelpers.CountTrueElements(filter);
System\Numerics\Tensors\netcore\TensorExtensions.cs (64)
137if (!TensorHelpers.IsBroadcastableTo(input.Lengths, shape)) 145nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, shape.Length); 180if (!TensorHelpers.IsBroadcastableTo(input.Lengths, shape)) 188nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, shape.Length); 223if (!TensorHelpers.IsBroadcastableTo(input.Lengths, lengths)) 231nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, lengths.Length); 374if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, lengths)) 443if (TensorHelpers.AreLengthsTheSame(x, y)) 470if (TensorHelpers.AreLengthsTheSame(x, y)) 472if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 480if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 539if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 811if (TensorHelpers.AreLengthsTheSame(x, y)) 841if (TensorHelpers.AreLengthsTheSame(x, y)) 843if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 851if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 914if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 974if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1020if (TensorHelpers.AreLengthsTheSame(x, y)) 1050if (TensorHelpers.AreLengthsTheSame(x, y)) 1052if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1060if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 1123if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1183if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1723if (TensorHelpers.AreLengthsTheSame(x, y)) 1753if (TensorHelpers.AreLengthsTheSame(x, y)) 1755if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1763if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 1826if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1886if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1932if (TensorHelpers.AreLengthsTheSame(x, y)) 1962if (TensorHelpers.AreLengthsTheSame(x, y)) 1964if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1972if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 2035if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 2095if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 2692TensorHelpers.PermuteIndices(indexes, permutedIndices, permutation); 2721if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2789if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2860if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 3151if (!TensorHelpers.IsBroadcastableTo(values.Lengths, tensor.Lengths)) 3158if (!TensorHelpers.IsContiguousAndDense<T>(srcSpan)) 3161if (!TensorHelpers.IsBroadcastableTo(values.Lengths, srcSpan.Lengths)) 3440if (!TensorHelpers.AreLengthsTheSame<T>(tensors[0], tensors[i])) 3478if (!TensorHelpers.AreLengthsTheSame<T>(tensors[0], tensors[i])) 3617if (!TensorHelpers.IsBroadcastableTo(tensor.Lengths, destination.Lengths)) 3621if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 6833if (!TensorHelpers.IsBroadcastableTo(shape1, shape2)) 6836nint[] intermediateShape = TensorHelpers.GetIntermediateShape(shape1, shape2.Length); 6864if (TensorHelpers.IsContiguousAndDense(input)) 6884if (TensorHelpers.IsContiguousAndDense(left) && TensorHelpers.IsContiguousAndDense(right) && TensorHelpers.AreLengthsTheSame(left, right)) 6926if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<TOut>(slicedDestination)) 6978if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination)) 7030if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination)) 7078if (TensorHelpers.AreLengthsTheSame(left, right) && TensorHelpers.IsUnderlyingStorageSameSize(left, right) && TensorHelpers.IsContiguousAndDense(left) 7079&& TensorHelpers.IsContiguousAndDense(right) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination))
System\Numerics\Tensors\netcore\TensorSpan.cs (6)
570if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 592nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 593int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1; 624if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 646nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 647int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1;