Direct Graphical Models  v.1.7.0
types.h
1 #pragma once
2 
3 #define DGM_VERSION_MAJOR 1
4 #define DGM_VERSION_MINOR 7
5 #define DGM_VERSION_PATCH 0
6 
7 /* #undef DEBUG_MODE */
8 /* #undef DEBUG_PRINT_INFO */
9 #define ENABLE_PPL
10 #define ENABLE_AMP
11 #define USE_OPENGL
12 #define USE_SHERWOOD
13 
14 
15 #include <vector>
16 #include <memory>
17 #include <thread>
18 #include <math.h>
19 #ifdef ENABLE_PPL
20 #include <ppl.h>
21 #include "concrtrm.h"
22 #endif
23 #ifdef ENABLE_AMP
24 #include <amp.h>
25 #endif
26 #include "opencv2/opencv.hpp"
27 
28 using namespace cv;
29 
30 #ifdef _WIN32
31  using byte = unsigned __int8;
32  using word = unsigned __int16;
33  using dword = unsigned __int32;
34  using qword = unsigned __int64;
35 #else
36  using byte = uint8_t;
37  using word = uint16_t;
38  using dword = uint32_t;
39  using qword = uint64_t;
40 #endif
41 
42 using vec_mat_t = std::vector<Mat>;
43 using vec_bool_t = std::vector<bool>;
44 using vec_byte_t = std::vector<byte>;
45 using vec_word_t = std::vector<word>;
46 using vec_int_t = std::vector<int>;
47 using vec_float_t = std::vector<float>;
48 using vec_size_t = std::vector<size_t>;
49 using vec_string_t = std::vector<std::string>;
50 using vec_scalar_t = std::vector<Scalar>;
51 
52 using pair_mat_t = std::pair<Mat, Mat>;
53 
54 using ptr_float_t = std::unique_ptr<float[]>;
55 
56 static const double Pi = 3.1415926;
57 static const float Pif = 3.1415926f;
58 
59 template <class T> T& lvalue_cast(T&& t) { return t; }
60 #ifdef _WIN32
61  #define EmptyMat Mat()
62  #define DllExport __declspec(dllexport)
63 #else
64  #define EmptyMat lvalue_cast(Mat())
65  #define DllExport
66 #endif
67 
68 // DGM lib
69 namespace DirectGraphicalModels
70 {
71  class IEdgeModel;
72 
73  using vec_nColor_t = std::vector<std::pair<Scalar, std::string> >;
74  using ptr_edgeModel_t = std::shared_ptr<IEdgeModel>;
75  const size_t STR_LEN = 256;
76 }
std::vector< std::pair< Scalar, std::string > > vec_nColor_t
Definition: types.h:73
std::shared_ptr< IEdgeModel > ptr_edgeModel_t
Definition: types.h:74
const size_t STR_LEN
Definition: types.h:75