Merge pull request #5811 from mshabunin:fix-java-moments
[platform/upstream/opencv.git] / modules / hal / include / opencv2 / hal / interface.hpp
1 #ifndef _HAL_INTERFACE_HPP_INCLUDED_
2 #define _HAL_INTERFACE_HPP_INCLUDED_
3
4 #define CV_HAL_ERROR_OK 0
5 #define CV_HAL_ERROR_NI 1
6 #define CV_HAL_ERROR_UNKNOWN -1
7
8 #define CV_HAL_CMP_EQ 0
9 #define CV_HAL_CMP_GT 1
10 #define CV_HAL_CMP_GE 2
11 #define CV_HAL_CMP_LT 3
12 #define CV_HAL_CMP_LE 4
13 #define CV_HAL_CMP_NE 5
14
15 #ifdef __cplusplus
16 namespace cv { namespace hal {
17
18 namespace Error {
19
20 enum
21 {
22     Ok = 0,
23     NotImplemented = 1,
24     Unknown = -1
25 };
26
27 }
28
29 enum
30 {
31     CMP_EQ = 0,
32     CMP_GT = 1,
33     CMP_GE = 2,
34     CMP_LT = 3,
35     CMP_LE = 4,
36     CMP_NE = 5
37 };
38
39 }}
40 #endif
41
42 #ifdef __cplusplus
43 #include <cstddef>
44 #else
45 #include <stddef.h>
46 #endif
47
48 /* primitive types */
49 /*
50   schar  - signed 1 byte integer
51   uchar  - unsigned 1 byte integer
52   short  - signed 2 byte integer
53   ushort - unsigned 2 byte integer
54   int    - signed 4 byte integer
55   uint   - unsigned 4 byte integer
56   int64  - signed 8 byte integer
57   uint64 - unsigned 8 byte integer
58 */
59
60 #if !defined _MSC_VER && !defined __BORLANDC__
61 #  if defined __cplusplus && __cplusplus >= 201103L && !defined __APPLE__
62 #    include <cstdint>
63      typedef std::uint32_t uint;
64 #  else
65 #    include <stdint.h>
66      typedef uint32_t uint;
67 #  endif
68 #else
69    typedef unsigned uint;
70 #endif
71
72 typedef signed char schar;
73
74 #ifndef __IPL_H__
75    typedef unsigned char uchar;
76    typedef unsigned short ushort;
77 #endif
78
79 #if defined _MSC_VER || defined __BORLANDC__
80    typedef __int64 int64;
81    typedef unsigned __int64 uint64;
82 #  define CV_BIG_INT(n)   n##I64
83 #  define CV_BIG_UINT(n)  n##UI64
84 #else
85    typedef int64_t int64;
86    typedef uint64_t uint64;
87 #  define CV_BIG_INT(n)   n##LL
88 #  define CV_BIG_UINT(n)  n##ULL
89 #endif
90
91 #endif