Skip to content

Commit

Permalink
Tensor Operation fixes when input is sliced (non-contiguous) (dotnet#…
Browse files Browse the repository at this point in the history
…106985)

* slicing fixes

* rebased on main
  • Loading branch information
michaelgsharp authored and jtschuster committed Sep 17, 2024
1 parent 8c336de commit 31bc0c3
Show file tree
Hide file tree
Showing 7 changed files with 749 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public static void BroadcastTo<T>(this System.Numerics.Tensors.Tensor<T> source,
public static bool GreaterThanAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanAny<T>(T x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanOrEqualAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanOrEqualAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> s, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanOrEqualAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanOrEqualAll<T>(T x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanOrEqualAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool GreaterThanOrEqualAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
Expand Down Expand Up @@ -333,16 +333,16 @@ public static void BroadcastTo<T>(this System.Numerics.Tensors.Tensor<T> source,
public static System.Numerics.Tensors.Tensor<T> LeadingZeroCount<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x) where T : System.Numerics.IBinaryInteger<T> { throw null; }
public static ref readonly System.Numerics.Tensors.TensorSpan<T> LeadingZeroCount<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.TensorSpan<T> destination) where T : System.Numerics.IBinaryInteger<T> { throw null; }
public static bool LessThanAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> f, T x) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAll<T>(T x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> f, T x) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanAny<T>(T x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> f, T x) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAll<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAll<T>(T x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> f, T x) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAny<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, T y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static bool LessThanOrEqualAny<T>(T x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static System.Numerics.Tensors.Tensor<bool> LessThanOrEqual<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
public static ref readonly System.Numerics.Tensors.TensorSpan<bool> LessThanOrEqual<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> y, in System.Numerics.Tensors.TensorSpan<bool> destination) where T : System.Numerics.IComparisonOperators<T, T, bool> { throw null; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("System.Numerics.Tensors.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="Properties\InternalVisibleTo.cs" />
<Compile Include="System\Numerics\Tensors\TensorPrimitives.Single.cs" />
<Compile Include="System\Numerics\Tensors\TensorPrimitives.Helpers.cs" />
<Compile Include="System\ThrowHelper.cs" />
Expand Down
Loading

0 comments on commit 31bc0c3

Please sign in to comment.