#include <simddetect.h>
Definition at line 32 of file simddetect.h.
◆ IsAVX2Available()
static bool tesseract::SIMDDetect::IsAVX2Available |
( |
| ) |
|
|
inlinestatic |
Definition at line 39 of file simddetect.h.
40 return detector.avx2_available_;
◆ IsAVX512BWAvailable()
static bool tesseract::SIMDDetect::IsAVX512BWAvailable |
( |
| ) |
|
|
inlinestatic |
Definition at line 47 of file simddetect.h.
48 return detector.avx512BW_available_;
◆ IsAVX512FAvailable()
static bool tesseract::SIMDDetect::IsAVX512FAvailable |
( |
| ) |
|
|
inlinestatic |
Definition at line 43 of file simddetect.h.
44 return detector.avx512F_available_;
◆ IsAVXAvailable()
static bool tesseract::SIMDDetect::IsAVXAvailable |
( |
| ) |
|
|
inlinestatic |
Definition at line 35 of file simddetect.h.
36 return detector.avx_available_;
◆ IsFMAAvailable()
static bool tesseract::SIMDDetect::IsFMAAvailable |
( |
| ) |
|
|
inlinestatic |
Definition at line 51 of file simddetect.h.
52 return detector.fma_available_;
◆ IsNEONAvailable()
static bool tesseract::SIMDDetect::IsNEONAvailable |
( |
| ) |
|
|
inlinestatic |
Definition at line 59 of file simddetect.h.
60 return detector.neon_available_;
◆ IsSSEAvailable()
static bool tesseract::SIMDDetect::IsSSEAvailable |
( |
| ) |
|
|
inlinestatic |
Definition at line 55 of file simddetect.h.
56 return detector.sse_available_;
◆ Update()
void tesseract::SIMDDetect::Update |
( |
| ) |
|
|
static |
Definition at line 264 of file simddetect.cpp.
267 const char *dotproduct_method =
"generic";
268 if (dotproduct ==
"auto") {
270 }
else if (dotproduct ==
"generic") {
272 SetDotProduct(DotProductGeneric);
273 dotproduct_method =
"generic";
274 }
else if (dotproduct ==
"native") {
277 dotproduct_method =
"native";
278 #if defined(HAVE_AVX2)
279 }
else if (dotproduct ==
"avx2") {
282 dotproduct_method =
"avx2";
284 #if defined(HAVE_AVX)
285 }
else if (dotproduct ==
"avx") {
288 dotproduct_method =
"avx";
290 #if defined(HAVE_FMA)
291 }
else if (dotproduct ==
"fma") {
294 dotproduct_method =
"fma";
296 #if defined(HAVE_SSE4_1)
297 }
else if (dotproduct ==
"sse") {
300 dotproduct_method =
"sse";
302 #if defined(HAVE_FRAMEWORK_ACCELERATE)
303 }
else if (dotproduct ==
"accelerate") {
306 #if defined(HAVE_NEON) || defined(__aarch64__)
307 }
else if (dotproduct ==
"neon" && neon_available_) {
310 dotproduct_method =
"neon";
312 }
else if (dotproduct ==
"std::inner_product") {
315 dotproduct_method =
"std::inner_product";
318 tprintf(
"Warning, ignoring unsupported config variable value: dotproduct=%s\n",
321 "Supported values for dotproduct: auto generic native"
322 #
if defined(HAVE_AVX2)
325 #
if defined(HAVE_AVX)
328 #
if defined(HAVE_FMA)
331 #
if defined(HAVE_SSE4_1)
334 #
if defined(HAVE_FRAMEWORK_ACCELERATE)
337 " std::inner_product.\n");
340 dotproduct.set_value(dotproduct_method);
void tprintf(const char *format,...)
TFloat DotProductNEON(const TFloat *u, const TFloat *v, int n)
TFloat DotProductFMA(const TFloat *u, const TFloat *v, int n)
TFloat DotProductNative(const TFloat *u, const TFloat *v, int n)
TFloat DotProductAVX(const TFloat *u, const TFloat *v, int n)
TFloat DotProductSSE(const TFloat *u, const TFloat *v, int n)
static const IntSimdMatrix intSimdMatrixAVX2
static const IntSimdMatrix * intSimdMatrix
static const IntSimdMatrix intSimdMatrixSSE
static const IntSimdMatrix intSimdMatrixNEON
The documentation for this class was generated from the following files: