Openholo
v4.2
Open Source Digital Holographic Library
define.h
Go to the documentation of this file.
1
/*M///////////////////////////////////////////////////////////////////////////////////////
2
//
3
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4
//
5
// By downloading, copying, installing or using the software you agree to this license.
6
// If you do not agree to this license, do not download, install, copy or use the software.
7
//
8
//
9
// License Agreement
10
// For Open Source Digital Holographic Library
11
//
12
// Openholo library is free software;
13
// you can redistribute it and/or modify it under the terms of the BSD 2-Clause license.
14
//
15
// Copyright (C) 2017-2024, Korea Electronics Technology Institute. All rights reserved.
16
// E-mail : contact.openholo@gmail.com
17
// Web : http://www.openholo.org
18
//
19
// Redistribution and use in source and binary forms, with or without modification,
20
// are permitted provided that the following conditions are met:
21
//
22
// 1. Redistribution's of source code must retain the above copyright notice,
23
// this list of conditions and the following disclaimer.
24
//
25
// 2. Redistribution's in binary form must reproduce the above copyright notice,
26
// this list of conditions and the following disclaimer in the documentation
27
// and/or other materials provided with the distribution.
28
//
29
// This software is provided by the copyright holders and contributors "as is" and
30
// any express or implied warranties, including, but not limited to, the implied
31
// warranties of merchantability and fitness for a particular purpose are disclaimed.
32
// In no event shall the copyright holder or contributors be liable for any direct,
33
// indirect, incidental, special, exemplary, or consequential damages
34
// (including, but not limited to, procurement of substitute goods or services;
35
// loss of use, data, or profits; or business interruption) however caused
36
// and on any theory of liability, whether in contract, strict liability,
37
// or tort (including negligence or otherwise) arising in any way out of
38
// the use of this software, even if advised of the possibility of such damage.
39
//
40
// This software contains opensource software released under GNU Generic Public License,
41
// NVDIA Software License Agreement, or CUDA supplement to Software License Agreement.
42
// Check whether software you use contains licensed software.
43
//
44
//M*/
45
46
#ifndef __define_h
47
#define __define_h
48
49
namespace
oph
50
{
51
#ifndef M_PI
52
#define M_PI 3.141592653589793238462643383279502884197169399375105820974944592308
53
#endif
54
55
#ifndef M_PI_F
56
#define M_PI_F 3.14159265358979323846f
57
#endif
58
59
//Convert Angle double
60
#define RADIAN(theta) (theta*M_PI)/180.0
61
#define DEGREE(theta) (theta*180.0)/M_PI
62
//- float
63
#define RADIAN_F(theta) (theta*M_PI_F)/180.f
64
#define DEGREE_F(theta) (theta*180.f)/M_PI_F
65
66
#define OPH_FORWARD (-1)
67
#define OPH_BACKWARD (1)
68
69
#define OPH_MEASURE (0U)
70
#define OPH_DESTROY_INPUT (1U << 0)
71
#define OPH_UNALIGNED (1U << 1)
72
#define OPH_CONSERVE_MEMORY (1U << 2)
73
#define OPH_EXHAUSTIVE (1U << 3)
74
#define OPH_PRESERVE_INPUT (1U << 4)
75
#define OPH_PATIENT (1U << 5)
76
#define OPH_ESTIMATE (1U << 6)
77
#define OPH_WISDOM_ONLY (1U << 21)
78
79
#ifndef _FIRST
80
#define _FIRST 0
81
#endif
82
83
#ifndef _SECOND
84
#define _SECOND 1
85
#endif
86
87
#ifndef _THIRD
88
#define _THIRD 2
89
#endif
90
91
#ifndef _X
92
#define _X 0
93
#endif
94
95
#ifndef _Y
96
#define _Y 1
97
#endif
98
99
#ifndef _Z
100
#define _Z 2
101
#endif
102
103
#ifndef _W
104
#define _W 3
105
#endif
106
107
#ifndef _R
108
#define _R 0
109
#endif
110
111
#ifndef _G
112
#define _G 1
113
#endif
114
115
#ifndef _B
116
#define _B 2
117
#endif
118
119
#ifndef _D
120
#define _D 3
121
#endif
122
123
#ifndef _COL
124
#define _COL 0
125
#endif
126
127
#ifndef _ROW
128
#define _ROW 1
129
#endif
130
131
#ifndef _MAT
132
#define _MAT 2
133
#endif
134
135
#ifndef MAX_FLOAT
136
#define MAX_FLOAT ((float)3.40282347e+38)
137
#endif
138
139
#ifndef MAX_DOUBLE
140
#define MAX_DOUBLE ((double)1.7976931348623158e+308)
141
#endif
142
143
#ifndef MIN_FLOAT
144
#define MIN_FLOAT ((float)1.17549435e-38)
145
#endif
146
147
#ifndef MIN_DOUBLE
148
#define MIN_DOUBLE ((double)2.2250738585072014e-308)
149
#endif
150
151
#define MIN_REAL MIN_DOUBLE;
152
#define MAX_REAL MAX_DOUBLE;
153
154
//Mode Flag
155
#define MODE_CPU 0
156
#define MODE_GPU 1
157
#define MODE_DOUBLE 0 // default
158
#define MODE_FLOAT 2
159
#define MODE_FASTMATH 4
160
161
#define WIDTHBYTES(bits) (((bits)+31)/32*4)
162
163
#define OPH_PLANES 1
164
#define OPH_COMPRESSION 0
165
#define X_PIXEL_PER_METER 0x130B //2835 , 72 DPI X (4875)
166
#define Y_PIXEL_PER_METER 0x130B //2835 , 72 DPI X (4875)
167
}
168
169
#endif // !__define_h
oph
Definition:
Bitmap.h:49
D:
Sources
Openholo
Openholo
source
Openholo
src
define.h
Generated by
1.8.14