Skip to content

Commit 6531acf

Browse files
authored
Fix documentation for LoadAndPack* methods in TeddyHelper (#118178)
1 parent 6afa19d commit 6531acf

File tree

1 file changed

+18
-6
lines changed
  • src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers

1 file changed

+18
-6
lines changed

src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/TeddyHelper.cs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,12 @@ public static (Vector512<byte> Result, Vector512<byte> Prev0, Vector512<byte> Pr
207207
return (result, match0, match1);
208208
}
209209

210-
// Read two Vector512<ushort> and concatenate their lower bytes together into a single Vector512<byte>.
211-
// On X86, characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
210+
/// <summary>
211+
/// Read two <see cref="Vector128&lt;UInt16&gt;" /> and concatenate their lower bytes together into a single <see cref="Vector128&lt;Byte&gt;" />.
212+
/// </summary>
213+
/// <remarks>
214+
/// On X86, characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
215+
/// </remarks>
212216
[MethodImpl(MethodImplOptions.AggressiveInlining)]
213217
[CompExactlyDependsOn(typeof(Sse2))]
214218
[CompExactlyDependsOn(typeof(AdvSimd.Arm64))]
@@ -233,8 +237,12 @@ public static Vector128<byte> LoadAndPack16AsciiChars(ref char source)
233237
}
234238
}
235239

236-
// Read two Vector512<ushort> and concatenate their lower bytes together into a single Vector512<byte>.
237-
// Characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
240+
/// <summary>
241+
/// Read two <see cref="Vector256&lt;UInt16&gt;" /> and concatenate their lower bytes together into a single <see cref="Vector256&lt;Byte&gt;" />.
242+
/// </summary>
243+
/// <remarks>
244+
/// On X86, characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
245+
/// </remarks>
238246
[MethodImpl(MethodImplOptions.AggressiveInlining)]
239247
[CompExactlyDependsOn(typeof(Avx2))]
240248
public static Vector256<byte> LoadAndPack32AsciiChars(ref char source)
@@ -247,8 +255,12 @@ public static Vector256<byte> LoadAndPack32AsciiChars(ref char source)
247255
return PackedSpanHelpers.FixUpPackedVector256Result(packed);
248256
}
249257

250-
// Read two Vector512<ushort> and concatenate their lower bytes together into a single Vector512<byte>.
251-
// Characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
258+
/// <summary>
259+
/// Read two <see cref="Vector512&lt;UInt16&gt;" /> and concatenate their lower bytes together into a single <see cref="Vector512&lt;Byte&gt;" />.
260+
/// </summary>
261+
/// <remarks>
262+
/// On X86, characters above 32767 are turned into 0, but we account for that by not using Teddy if any of the string values contain a 0.
263+
/// </remarks>
252264
[MethodImpl(MethodImplOptions.AggressiveInlining)]
253265
[CompExactlyDependsOn(typeof(Avx512BW))]
254266
public static Vector512<byte> LoadAndPack64AsciiChars(ref char source)

0 commit comments

Comments
 (0)