Fehlerbehebung bei SEHException und AVX-Unterstützung in IronOCR
Nicht behandelte Ausnahme: System.Runtime.InteropServices.SEHException

Dieses Problem tritt häufig auf Maschinen mit älteren Xeon-, Celeron-, Pentium- oder Atom-Prozessoren auf, denen AVX-Unterstützung fehlt.
Unterstützung für Nicht-AVX-Prozessoren wurde in IronOCR-Version 2022.8.7804 hinzugefügt, daher aktualisieren Sie bitte auf eine spätere Version.
// Example: Checking AVX support programmatically in C#
using System;
class ProcessorFeatures
{
// Main method to check AVX support
static void Main()
{
// Check if the machine's processor supports AVX
if (IsAvxSupported())
{
Console.WriteLine("AVX is supported.");
}
else
{
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.");
}
}
// Function to determine if AVX is supported
static bool IsAvxSupported()
{
return System.Runtime.Intrinsics.X86.Avx.IsSupported;
}
}
// Example: Checking AVX support programmatically in C#
using System;
class ProcessorFeatures
{
// Main method to check AVX support
static void Main()
{
// Check if the machine's processor supports AVX
if (IsAvxSupported())
{
Console.WriteLine("AVX is supported.");
}
else
{
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.");
}
}
// Function to determine if AVX is supported
static bool IsAvxSupported()
{
return System.Runtime.Intrinsics.X86.Avx.IsSupported;
}
}
' Example: Checking AVX support programmatically in C#
Imports System
Friend Class ProcessorFeatures
' Main method to check AVX support
Shared Sub Main()
' Check if the machine's processor supports AVX
If IsAvxSupported() Then
Console.WriteLine("AVX is supported.")
Else
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.")
End If
End Sub
' Function to determine if AVX is supported
Private Shared Function IsAvxSupported() As Boolean
Return System.Runtime.Intrinsics.X86.Avx.IsSupported
End Function
End Class
In diesem Beispielcode verwenden wir die System.Runtime.Intrinsics.X86.Avx.IsSupported-Eigenschaft, um festzustellen, ob der Prozessor AVX-Anweisungen unterstützt. Wenn AVX nicht unterstützt wird, wird empfohlen zu gewährleisten, dass Sie eine Version von IronOCR verwenden, die Unterstützung für Nicht-AVX-Prozessoren enthält.

