tesseract  5.0.0
tesstypes.h
Go to the documentation of this file.
1 // File: tesstypes.h
3 // Description: Simple data types used by Tesseract code.
4 // Author: Stefan Weil
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
16 
17 #ifndef TESSERACT_TESSTYPES_H
18 #define TESSERACT_TESSTYPES_H
19 
20 #ifdef HAVE_CONFIG_H
21 # include "config_auto.h" // FAST_FLOAT
22 #endif
23 
24 #include <cstdint> // for int16_t, int32_t
25 
26 namespace tesseract {
27 
28 // Image dimensions (width and height, coordinates).
29 #if defined(LARGE_IMAGES)
30 using TDimension = int32_t;
31 #else
32 using TDimension = int16_t;
33 #endif
34 
35 // Floating point data type used for LSTM calculations.
36 #if defined(FAST_FLOAT)
37 using TFloat = float;
38 #else
39 using TFloat = double;
40 #endif
41 
42 }
43 
44 #endif // TESSERACT_TESSTYPES_H
double TFloat
Definition: tesstypes.h:39
int16_t TDimension
Definition: tesstypes.h:32