77 references to TensorHelpers
System.Numerics.Tensors (77)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (6)
523if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 546nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 547int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1; 579if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 602nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 603int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1;
System\Numerics\Tensors\netcore\Tensor.cs (1)
355nint linearLength = TensorHelpers.CountTrueElements(filter);
System\Numerics\Tensors\netcore\TensorExtensions.cs (64)
152if (!TensorHelpers.IsBroadcastableTo(input.Lengths, shape)) 160nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, shape.Length); 195if (!TensorHelpers.IsBroadcastableTo(input.Lengths, shape)) 203nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, shape.Length); 238if (!TensorHelpers.IsBroadcastableTo(input.Lengths, lengths)) 246nint[] intermediateShape = TensorHelpers.GetIntermediateShape(input.Lengths, lengths.Length); 389if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, lengths)) 458if (TensorHelpers.AreLengthsTheSame(x, y)) 485if (TensorHelpers.AreLengthsTheSame(x, y)) 487if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 495if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 554if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 826if (TensorHelpers.AreLengthsTheSame(x, y)) 856if (TensorHelpers.AreLengthsTheSame(x, y)) 858if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 866if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 929if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 989if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1035if (TensorHelpers.AreLengthsTheSame(x, y)) 1065if (TensorHelpers.AreLengthsTheSame(x, y)) 1067if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1075if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 1138if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1198if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1738if (TensorHelpers.AreLengthsTheSame(x, y)) 1768if (TensorHelpers.AreLengthsTheSame(x, y)) 1770if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1778if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 1841if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1901if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 1947if (TensorHelpers.AreLengthsTheSame(x, y)) 1977if (TensorHelpers.AreLengthsTheSame(x, y)) 1979if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 1987if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 2050if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, x.Lengths)) 2110if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, y.Lengths)) 2701TensorHelpers.PermuteIndices(indexes, permutedIndices, permutation); 2730if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2798if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2869if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 3160if (!TensorHelpers.IsBroadcastableTo(values.Lengths, tensor.Lengths)) 3167if (!TensorHelpers.IsContiguousAndDense<T>(srcSpan)) 3170if (!TensorHelpers.IsBroadcastableTo(values.Lengths, srcSpan.Lengths)) 3449if (!TensorHelpers.AreLengthsTheSame<T>(tensors[0], tensors[i])) 3487if (!TensorHelpers.AreLengthsTheSame<T>(tensors[0], tensors[i])) 3638if (!TensorHelpers.IsBroadcastableTo(tensor.Lengths, destination.Lengths)) 3642if (!TensorHelpers.AreLengthsTheSame(destination.Lengths, newSize)) 6776if (!TensorHelpers.IsBroadcastableTo(shape1, shape2)) 6779nint[] intermediateShape = TensorHelpers.GetIntermediateShape(shape1, shape2.Length); 6807if (TensorHelpers.IsContiguousAndDense(input)) 6827if (TensorHelpers.IsContiguousAndDense(left) && TensorHelpers.IsContiguousAndDense(right) && TensorHelpers.AreLengthsTheSame(left, right)) 6869if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<TOut>(slicedDestination)) 6921if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination)) 6973if (TensorHelpers.IsContiguousAndDense(input) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination)) 7021if (TensorHelpers.AreLengthsTheSame(left, right) && TensorHelpers.IsUnderlyingStorageSameSize(left, right) && TensorHelpers.IsContiguousAndDense(left) 7022&& TensorHelpers.IsContiguousAndDense(right) && TensorHelpers.IsContiguousAndDense<T>(slicedDestination))
System\Numerics\Tensors\netcore\TensorSpan.cs (6)
555if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 577nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 578int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1; 609if (TensorHelpers.IsBroadcastableTo(Lengths, destination.Lengths)) 631nint copyLength = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Lengths[^1] : 1; 632int indexToAdjust = srcSlice.Strides[^1] == 1 && TensorHelpers.IsContiguousAndDense(srcSlice) ? srcSlice.Rank - 2 : srcSlice.Rank - 1;