Skip to content

Commit

Permalink
Remove unused locals in System.Numerics.Tensors (dotnet#39578)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKotsenas committed Jul 25, 2020
1 parent b77b242 commit 7b1b7b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 0 additions & 24 deletions src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,6 @@ public void Decrement(DenseTensor<byte> tensor, DenseTensor<byte> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -1426,7 +1425,6 @@ public void Increment(DenseTensor<byte> tensor, DenseTensor<byte> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -2610,7 +2608,6 @@ public void Decrement(DenseTensor<char> tensor, DenseTensor<char> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -2805,7 +2802,6 @@ public void Increment(DenseTensor<char> tensor, DenseTensor<char> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -3870,7 +3866,6 @@ public void Decrement(DenseTensor<decimal> tensor, DenseTensor<decimal> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -4065,7 +4060,6 @@ public void Increment(DenseTensor<decimal> tensor, DenseTensor<decimal> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -4946,7 +4940,6 @@ public void Decrement(DenseTensor<double> tensor, DenseTensor<double> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -5141,7 +5134,6 @@ public void Increment(DenseTensor<double> tensor, DenseTensor<double> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -6022,7 +6014,6 @@ public void Decrement(DenseTensor<float> tensor, DenseTensor<float> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -6217,7 +6208,6 @@ public void Increment(DenseTensor<float> tensor, DenseTensor<float> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -7217,7 +7207,6 @@ public void Decrement(DenseTensor<int> tensor, DenseTensor<int> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -7412,7 +7401,6 @@ public void Increment(DenseTensor<int> tensor, DenseTensor<int> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -8596,7 +8584,6 @@ public void Decrement(DenseTensor<long> tensor, DenseTensor<long> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -8791,7 +8778,6 @@ public void Increment(DenseTensor<long> tensor, DenseTensor<long> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -9975,7 +9961,6 @@ public void Decrement(DenseTensor<sbyte> tensor, DenseTensor<sbyte> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -10170,7 +10155,6 @@ public void Increment(DenseTensor<sbyte> tensor, DenseTensor<sbyte> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -11354,7 +11338,6 @@ public void Decrement(DenseTensor<short> tensor, DenseTensor<short> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -11549,7 +11532,6 @@ public void Increment(DenseTensor<short> tensor, DenseTensor<short> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -12726,7 +12708,6 @@ public void Decrement(DenseTensor<uint> tensor, DenseTensor<uint> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -12921,7 +12902,6 @@ public void Increment(DenseTensor<uint> tensor, DenseTensor<uint> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -14069,7 +14049,6 @@ public void Decrement(DenseTensor<ulong> tensor, DenseTensor<ulong> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -14264,7 +14243,6 @@ public void Increment(DenseTensor<ulong> tensor, DenseTensor<ulong> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down Expand Up @@ -15412,7 +15390,6 @@ public void Decrement(DenseTensor<ushort> tensor, DenseTensor<ushort> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]--;
Expand Down Expand Up @@ -15607,7 +15584,6 @@ public void Increment(DenseTensor<ushort> tensor, DenseTensor<ushort> result)
{

var resultSpan = result.Buffer.Span;
var tensorSpan = tensor.Buffer.Span;
for (int i = 0; i < resultSpan.Length; i++)
{
resultSpan[i]++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ internal static Tensor<T> And<T>(Tensor<T> tensor, T scalar)

internal static void Contract<T>(Tensor<T> left, Tensor<T> right, int[] leftAxes, int[] rightAxes, Tensor<T> result)
{
var resultDimensions = ValidateContractArgs(left, right, leftAxes, rightAxes, result);
ValidateContractArgs(left, right, leftAxes, rightAxes, result);

TensorArithmetic<T>.Instance.Contract(left, right, leftAxes, rightAxes, result);
}
Expand Down

0 comments on commit 7b1b7b2

Please sign in to comment.