Add new configure option --enable-float32 for faster LSTM with float

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-07-29 06:48:46 +02:00
parent 553ab64d8d
commit 0d0f203509
2 changed files with 12 additions and 0 deletions

View File

@ -207,6 +207,14 @@ AC_ARG_WITH([extra-libraries],
AC_MSG_ERROR([Cannot stat directory $withval])
fi])
AC_MSG_CHECKING([--enable-float32 argument])
AC_ARG_ENABLE([float32],
AS_HELP_STRING([--enable-float32], [enable float for LSTM [default=no]]))
AC_MSG_RESULT([$enable_float32])
if test "$enable_float32" = "yes"; then
AC_DEFINE([FAST_FLOAT], [1], [Enable float for LSTM])
fi
AC_MSG_CHECKING([--enable-graphics argument])
AC_ARG_ENABLE([graphics],
AS_HELP_STRING([--disable-graphics], [disable graphics (ScrollView)]))

View File

@ -17,6 +17,10 @@
#ifndef TESSERACT_TESSTYPES_H
#define TESSERACT_TESSTYPES_H
#ifdef HAVE_CONFIG_H
# include "config_auto.h" // FAST_FLOAT
#endif
#include <cstdint> // for int16_t
namespace tesseract {