Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Update dependencies from dotnet/roslyn #111081

Merged
merged 7 commits into from
Jan 7, 2025
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,17 +376,17 @@
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>f9f4ac2378fde175fe4da7220c8d56fddfd309ab</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.13.0-3.25052.5">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.13.0-3.25056.21">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>14944a9ee7758b7f811de9b74bc17c19ca5f214b</Sha>
<Sha>d7b0a8c4b320a592e6b81dc5a40bc724cd8b71ba</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="4.13.0-3.25052.5">
<Dependency Name="Microsoft.CodeAnalysis" Version="4.13.0-3.25056.21">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>14944a9ee7758b7f811de9b74bc17c19ca5f214b</Sha>
<Sha>d7b0a8c4b320a592e6b81dc5a40bc724cd8b71ba</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.13.0-3.25052.5">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.13.0-3.25056.21">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>14944a9ee7758b7f811de9b74bc17c19ca5f214b</Sha>
<Sha>d7b0a8c4b320a592e6b81dc5a40bc724cd8b71ba</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.12.0-beta1.24629.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
Expand All @@ -397,9 +397,9 @@
<Sha>5ed336762c6260a83ece35cd1f6749251452bad0</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.13.0-3.25052.5">
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.13.0-3.25056.21">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>14944a9ee7758b7f811de9b74bc17c19ca5f214b</Sha>
<Sha>d7b0a8c4b320a592e6b81dc5a40bc724cd8b71ba</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat.Task" Version="10.0.100-alpha.1.24622.2">
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure
they do not break the local dev experience.
-->
<MicrosoftCodeAnalysisCSharpVersion>4.13.0-3.25052.5</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.13.0-3.25052.5</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.13.0-3.25052.5</MicrosoftNetCompilersToolsetVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.13.0-3.25056.21</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.13.0-3.25056.21</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.13.0-3.25056.21</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
<!--
For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,9 @@ internal Tensor() { }
public System.Numerics.Tensors.TensorSpan<T> AsTensorSpan(params scoped System.ReadOnlySpan<System.Buffers.NRange> start) { throw null; }
public System.Numerics.Tensors.TensorSpan<T> AsTensorSpan(params scoped System.ReadOnlySpan<nint> start) { throw null; }
public void Clear() { }
public void CopyTo(System.Numerics.Tensors.TensorSpan<T> destination) { }
public void CopyTo(scoped System.Numerics.Tensors.TensorSpan<T> destination) { }
public void Fill(T value) { }
public void FlattenTo(System.Span<T> destination) { }
public void FlattenTo(scoped System.Span<T> destination) { }
public System.Collections.Generic.IEnumerator<T> GetEnumerator() { throw null; }
public override int GetHashCode() { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand All @@ -791,12 +791,12 @@ public void FlattenTo(System.Span<T> destination) { }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
ref readonly T System.Numerics.Tensors.IReadOnlyTensor<System.Numerics.Tensors.Tensor<T>, T>.GetPinnableReference() { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.Create(System.ReadOnlySpan<nint> lengths, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.Create(System.ReadOnlySpan<nint> lengths, System.ReadOnlySpan<nint> strides, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.CreateUninitialized(System.ReadOnlySpan<nint> lengths, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.CreateUninitialized(System.ReadOnlySpan<nint> lengths, System.ReadOnlySpan<nint> strides, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.Create(scoped System.ReadOnlySpan<nint> lengths, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.Create(scoped System.ReadOnlySpan<nint> lengths, scoped System.ReadOnlySpan<nint> strides, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.CreateUninitialized(scoped System.ReadOnlySpan<nint> lengths, bool pinned) { throw null; }
static System.Numerics.Tensors.Tensor<T> System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>, T>.CreateUninitialized(scoped System.ReadOnlySpan<nint> lengths, scoped System.ReadOnlySpan<nint> strides, bool pinned) { throw null; }
public string ToString(params scoped System.ReadOnlySpan<nint> maximumLengths) { throw null; }
public bool TryCopyTo(System.Numerics.Tensors.TensorSpan<T> destination) { throw null; }
public bool TryFlattenTo(System.Span<T> destination) { throw null; }
public bool TryCopyTo(scoped System.Numerics.Tensors.TensorSpan<T> destination) { throw null; }
public bool TryFlattenTo(scoped System.Span<T> destination) { throw null; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ internal Tensor(T[]? values, ReadOnlySpan<nint> lengths, ReadOnlySpan<nint> stri
/// </summary>
/// <param name="lengths">A <see cref="ReadOnlySpan{T}"/> indicating the lengths of each dimension.</param>
/// <param name="pinned">A <see cref="bool"/> whether the underlying data should be pinned or not.</param>
static Tensor<T> ITensor<Tensor<T>, T>.Create(ReadOnlySpan<nint> lengths, bool pinned)
static Tensor<T> ITensor<Tensor<T>, T>.Create(scoped ReadOnlySpan<nint> lengths, bool pinned)
{
nint linearLength = TensorSpanHelpers.CalculateTotalLength(lengths);
T[] values = pinned ? GC.AllocateArray<T>((int)linearLength, pinned) : (new T[linearLength]);
Expand All @@ -104,7 +104,7 @@ static Tensor<T> ITensor<Tensor<T>, T>.Create(ReadOnlySpan<nint> lengths, bool p
/// <param name="lengths">A <see cref="ReadOnlySpan{T}"/> indicating the lengths of each dimension.</param>
/// <param name="strides">A <see cref="ReadOnlySpan{T}"/> indicating the strides of each dimension.</param>
/// <param name="pinned">A <see cref="bool"/> whether the underlying data should be pinned or not.</param>
static Tensor<T> ITensor<Tensor<T>, T>.Create(ReadOnlySpan<nint> lengths, ReadOnlySpan<nint> strides, bool pinned)
static Tensor<T> ITensor<Tensor<T>, T>.Create(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned)
{
nint linearLength = TensorSpanHelpers.CalculateTotalLength(lengths);
T[] values = pinned ? GC.AllocateArray<T>((int)linearLength, pinned) : (new T[linearLength]);
Expand All @@ -116,7 +116,7 @@ static Tensor<T> ITensor<Tensor<T>, T>.Create(ReadOnlySpan<nint> lengths, ReadOn
/// </summary>
/// <param name="lengths">A <see cref="ReadOnlySpan{T}"/> indicating the lengths of each dimension.</param>
/// <param name="pinned">A <see cref="bool"/> whether the underlying data should be pinned or not.</param>
static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(ReadOnlySpan<nint> lengths, bool pinned)
static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(scoped ReadOnlySpan<nint> lengths, bool pinned)
{
nint linearLength = TensorSpanHelpers.CalculateTotalLength(lengths);
T[] values = GC.AllocateUninitializedArray<T>((int)linearLength, pinned);
Expand All @@ -129,7 +129,7 @@ static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(ReadOnlySpan<nint> le
/// <param name="lengths">A <see cref="ReadOnlySpan{T}"/> indicating the lengths of each dimension.</param>
/// <param name="strides">A <see cref="ReadOnlySpan{T}"/> indicating the strides of each dimension.</param>
/// <param name="pinned">A <see cref="bool"/> whether the underlying data should be pinned or not.</param>
static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(ReadOnlySpan<nint> lengths, ReadOnlySpan<nint> strides, bool pinned)
static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned)
{
nint linearLength = TensorSpanHelpers.CalculateTotalLength(lengths);
T[] values = GC.AllocateUninitializedArray<T>((int)linearLength, pinned);
Expand Down Expand Up @@ -516,7 +516,7 @@ public Tensor<T> Slice(params ReadOnlySpan<NIndex> startIndex)
/// Thrown when the destination TensorSpan is shorter than the source Tensor.
/// </exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void CopyTo(TensorSpan<T> destination) => AsTensorSpan().CopyTo(destination);
public void CopyTo(scoped TensorSpan<T> destination) => AsTensorSpan().CopyTo(destination);

/// <summary>
/// Fills the contents of this span with the given value.
Expand All @@ -532,19 +532,19 @@ public Tensor<T> Slice(params ReadOnlySpan<NIndex> startIndex)
/// <param name="destination">The span to copy items into.</param>
/// <returns>If the destination span is shorter than the source tensor, this method
/// return false and no data is written to the destination.</returns>
public bool TryCopyTo(TensorSpan<T> destination) => AsTensorSpan().TryCopyTo(destination);
public bool TryCopyTo(scoped TensorSpan<T> destination) => AsTensorSpan().TryCopyTo(destination);

/// <summary>
/// Flattens the contents of this Tensor into the provided <see cref="Span{T}"/>.
/// </summary>
/// <param name="destination">The span to copy items into.</param>
public void FlattenTo(Span<T> destination) => AsTensorSpan().FlattenTo(destination);
public void FlattenTo(scoped Span<T> destination) => AsTensorSpan().FlattenTo(destination);

/// <summary>
/// Flattens the contents of this Tensor into the provided <see cref="Span{T}"/>.
/// </summary>
/// <param name="destination">The span to copy items into.</param>
public bool TryFlattenTo(Span<T> destination) => AsTensorSpan().TryFlattenTo(destination);
public bool TryFlattenTo(scoped Span<T> destination) => AsTensorSpan().TryFlattenTo(destination);

// IEnumerable
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public void TensorExtensionsTwoSpanInSpanOut<T>(TensorPrimitivesTwoSpanInSpanOut
}

public delegate T TensorPrimitivesTwoSpanInTOut<T>(ReadOnlySpan<T> input, ReadOnlySpan<T> inputTwo);
public delegate T TensorTwoSpanInTOut<T>(scoped in ReadOnlyTensorSpan<T> input, scoped in ReadOnlyTensorSpan<T> inputTwo);
public delegate T TensorTwoSpanInTOut<T>(in ReadOnlyTensorSpan<T> input, in ReadOnlyTensorSpan<T> inputTwo);
public static IEnumerable<object[]> TwoSpanInFloatOutData()
{
yield return Create<float>(TensorPrimitives.Distance, Tensor.Distance);
Expand Down
6 changes: 3 additions & 3 deletions src/libraries/System.Numerics.Tensors/tests/TensorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private static nint CalculateTotalLength(ReadOnlySpan<nint> lengths)
return totalLength;
}

public delegate Tensor<T> PerformSpanInSpanOut<T>(scoped in ReadOnlyTensorSpan<T> input);
public delegate Tensor<T> PerformSpanInSpanOut<T>(in ReadOnlyTensorSpan<T> input);
public delegate void PerformCalculationSpanInSpanOut<T>(ReadOnlySpan<T> input, Span<T> output);

public static IEnumerable<object[]> SpanInSpanOutData()
Expand Down Expand Up @@ -153,7 +153,7 @@ public void TensorExtensionsSpanInTOut<T>(PerformCalculationSpanInTOut<T> tensor
});
}

public delegate Tensor<T> PerformTwoSpanInSpanOut<T>(scoped in ReadOnlyTensorSpan<T> input, scoped in ReadOnlyTensorSpan<T> input2);
public delegate Tensor<T> PerformTwoSpanInSpanOut<T>(in ReadOnlyTensorSpan<T> input, in ReadOnlyTensorSpan<T> input2);
public delegate void PerformCalculationTwoSpanInSpanOut<T>(ReadOnlySpan<T> input, ReadOnlySpan<T> inputTwo, Span<T> output);
public static IEnumerable<object[]> TwoSpanInSpanOutData()
{
Expand Down Expand Up @@ -201,7 +201,7 @@ public void TensorExtensionsTwoSpanInSpanOut<T>(PerformCalculationTwoSpanInSpanO
});
}

public delegate T PerformTwoSpanInFloatOut<T>(scoped in ReadOnlyTensorSpan<T> input, scoped in ReadOnlyTensorSpan<T> input2);
public delegate T PerformTwoSpanInFloatOut<T>(in ReadOnlyTensorSpan<T> input, in ReadOnlyTensorSpan<T> input2);
public delegate T PerformCalculationTwoSpanInFloatOut<T>(ReadOnlySpan<T> input, ReadOnlySpan<T> inputTwo);
public static IEnumerable<object[]> TwoSpanInFloatOutData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ protected override void Dispose(bool disposing)
public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, object?[] arg) => _out.Write(format, arg);

[MethodImpl(MethodImplOptions.Synchronized)]
public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, ReadOnlySpan<object?> arg) => _out.Write(format, arg);
public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan<object?> arg) => _out.Write(format, arg);

[MethodImpl(MethodImplOptions.Synchronized)]
public override void WriteLine() => _out.WriteLine();
Expand Down Expand Up @@ -923,7 +923,7 @@ protected override void Dispose(bool disposing)
public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, object?[] arg) => _out.WriteLine(format, arg);

[MethodImpl(MethodImplOptions.Synchronized)]
public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, ReadOnlySpan<object?> arg) => _out.WriteLine(format, arg);
public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan<object?> arg) => _out.WriteLine(format, arg);

//
// On SyncTextWriter all APIs should run synchronously, even the async ones.
Expand Down
Loading