Port System.Runtime.Intrinsics new docs
@dotnet/area-system-runtime-intrinsics @directhex @gewarren PTAL
Learn Build status updates of commit db6e686:
:white_check_mark: Validation status: passed
For more details, please refer to the build report.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
Learn Build status updates of commit 91fc144:
:white_check_mark: Validation status: passed
For more details, please refer to the build report.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
@tannergooding @gewarren bad news: The compiler generated xmls do not preserve the type in generic types. For example:
https://github.com/dotnet/runtime/blob/50d6cad649aad2bfa4069268eddd16fd51ec5cf3/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs#L348-L353C44
/// <summary>Converts a <see cref="Vector64{Single}" /> to a <see cref="Vector64{Int32}" /> using platform specific behavior on overflow.</summary>
/// <param name="vector">The vector to convert.</param>
/// <returns>The converted vector.</returns>
[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe Vector64<int> ConvertToInt32Native(Vector64<float> vector)
When built, shows the following output under D:\runtime\artifacts\bin\coreclr\windows.x64.Release\IL\System.Private.CoreLib.xml:
<member name="M:System.Runtime.Intrinsics.Vector128.ConvertToInt32Native(System.Runtime.Intrinsics.Vector128{System.Single})">
<summary>Converts a <see cref="T:System.Runtime.Intrinsics.Vector128`1" /> to a <see cref="T:System.Runtime.Intrinsics.Vector128`1" /> platform specific behavior on overflow.</summary>
<param name="vector">The vector to convert.</param>
<returns>The converted vector.</returns>
</member>
So our options are:
- Live with it.
- Fix them manually here (very labor intensive).
- Find a way to indicate the
<see crefs>in triple slash comments that will preserve the typed generic argument. I suspect it might be possible, because as you can see, the DocId preserved the typed generic argument, but the comments did not.
Find a way to indicate the
in triple slash comments that will preserve the typed generic argument. I suspect it might be possible, because as you can see, the DocId preserved the typed generic argument, but the comments did not.
If there's a preferred way to state it instead of <see cref="Vector64{Single}" /> then it should be possible to do a find/replace here to fix it up on the XML doc comment side.
Perhaps <see cref="Vector64{T}" /> of <see cref="Single" /> or similar would be sufficient?
Would appreciate weigh-in from @gewarren on the preferred way for this to be "displayed" or otherwise surfaced for the docs page side of things, and then I can automate the replacement
For returns and similar, we do: Vector128<Int32>
Where the first links to the Vector128<T>
So if there were maybe something like <see cref="Vector64{T}" /><<see cref="Single" />>, but with something to have the first part show as just Vector64 and not as Vector64<T>
Would appreciate weigh-in from @gewarren on the preferred way for this to be "displayed" or otherwise surfaced for the docs page side of things, and then I can automate the replacement
My preference would just be use code tags or langword instead of see cref. E.g.:
Converts a <see langword="Vector64<Single>" /> to ...
and then I can automate the replacement
Thank you so much, @tannergooding. It's really frustrating that the intellisense xmls do not respect it when they're generated.
Closing in favor of #10275.