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)
151if (!TensorHelpers.IsBroadcastableTo(input.Lengths, shape)) 159nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, shape.Length); 194if (!TensorHelpers.IsBroadcastableTo(input.Lengths, shape)) 202nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, shape.Length); 237if (!TensorHelpers.IsBroadcastableTo(input.Lengths, lengths)) 245nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, lengths.Length); 388if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, lengths)) 457if (TensorHelpers.AreLengthsTheSame(x, y)) 484if (TensorHelpers.AreLengthsTheSame(x, y)) 486if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 494if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 553if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 825if (TensorHelpers.AreLengthsTheSame(x, y)) 855if (TensorHelpers.AreLengthsTheSame(x, y)) 857if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 865if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 928if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 988if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1034if (TensorHelpers.AreLengthsTheSame(x, y)) 1064if (TensorHelpers.AreLengthsTheSame(x, y)) 1066if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1074if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 1137if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1197if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1737if (TensorHelpers.AreLengthsTheSame(x, y)) 1767if (TensorHelpers.AreLengthsTheSame(x, y)) 1769if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1777if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 1840if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1900if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1946if (TensorHelpers.AreLengthsTheSame(x, y)) 1976if (TensorHelpers.AreLengthsTheSame(x, y)) 1978if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1986if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 2049if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 2109if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 2706TensorHelpers.PermuteIndices(indexes, permutedIndices, permutation); 2735if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2803if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2874if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 3165if (!TensorHelpers.IsBroadcastableTo(values.Lengths, tensor.Lengths)) 3172if (!TensorHelpers.IsContiguousAndDense<T>(srcSpan)) 3175if (!TensorHelpers.IsBroadcastableTo(values.Lengths, srcSpan.Lengths)) 3454if (!TensorHelpers.AreLengthsTheSame<T>(tensors[0], tensors[i])) 3492if (!TensorHelpers.AreLengthsTheSame<T>(tensors[0], tensors[i])) 3650if (!TensorHelpers.IsBroadcastableTo(tensor.Lengths, destination.Lengths)) 3654if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 6840if (!TensorHelpers.IsBroadcastableTo(shape1, shape2)) 6843nint[] intermediateShape = TensorHelpers.GetIntermediateShape(shape1, shape2.Length); 6871if (TensorHelpers.IsContiguousAndDense(input)) 6891if (TensorHelpers.IsContiguousAndDense(left) && TensorHelpers.IsContiguousAndDense(right) && TensorHelpers.AreLengthsTheSame(left, right)) 6933if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<TOut>(slicedDestination)) 6985if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination)) 7037if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination)) 7085if (TensorHelpers.AreLengthsTheSame(left, right) && TensorHelpers.IsUnderlyingStorageSameSize(left, right) && TensorHelpers.IsContiguousAndDense(left) 7086&& 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;