Skip to content

Commit 4f85d11

Browse files
committed
NoErrorIncompleteThenASCIISse fix
1 parent 6ff99ee commit 4f85d11

File tree

3 files changed

+314
-87
lines changed

3 files changed

+314
-87
lines changed

benchmark/Benchmark.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,19 @@ public unsafe void SIMDUtf8ValidationRealDataAvx2()
257257
[BenchmarkCategory("sse")]
258258
public unsafe void SIMDUtf8ValidationRealDataSse()
259259
{
260-
if (allLinesUtf8 != null)
260+
// if (allLinesUtf8 != null)
261+
// {
262+
// RunUtf8ValidationBenchmark(allLinesUtf8, SimdUnicode.UTF8.GetPointerToFirstInvalidByteSse);
263+
// }
264+
if (allLinesUtf8 != null)
261265
{
262-
RunUtf8ValidationBenchmark(allLinesUtf8, SimdUnicode.UTF8.GetPointerToFirstInvalidByteSse);
266+
RunUtf8ValidationBenchmark(allLinesUtf8, (byte* pInputBuffer, int inputLength) =>
267+
{
268+
int dummyUtf16CodeUnitCountAdjustment, dummyScalarCountAdjustment;
269+
// Call the method with additional out parameters within the lambda.
270+
// You must handle these additional out parameters inside the lambda, as they cannot be passed back through the delegate.
271+
return SimdUnicode.UTF8.GetPointerToFirstInvalidByteSse(pInputBuffer, inputLength, out dummyUtf16CodeUnitCountAdjustment, out dummyScalarCountAdjustment);
272+
});
263273
}
264274
}
265275

0 commit comments

Comments
 (0)