A Survey of Gaussian Convolution Algorithms
Main Page
Modules
Files
File List
Globals
basic.h
Go to the documentation of this file.
1
58
#ifndef _BASIC_H_
59
#define _BASIC_H_
60
61
#include <math.h>
62
#include <stdlib.h>
63
64
/* Portable integer types */
65
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
66
67
/* Windows system: Use __intN types to define uint8_t, etc. */
68
typedef
unsigned
__int8 uint8_t;
69
typedef
unsigned
__int16 uint16_t;
70
typedef
unsigned
__int32 uint32_t;
71
typedef
__int8 int8_t;
72
typedef
__int16 int16_t;
73
typedef
__int32 int32_t;
74
75
#else
76
77
/* UNIX system: Use stdint to define uint8_t, etc. */
78
#include <stdint.h>
79
80
#endif
81
82
83
/* Math constants (Hart & Cheney) */
84
#ifndef M_2PI
85
86
#define M_2PI 6.28318530717958647692528676655900576
87
#endif
88
#ifndef M_PI
89
90
#define M_PI 3.14159265358979323846264338327950288
91
#endif
92
#ifndef M_PI_2
93
94
#define M_PI_2 1.57079632679489661923132169163975144
95
#endif
96
#ifndef M_PI_4
97
98
#define M_PI_4 0.78539816339744830961566084581987572
99
#endif
100
#ifndef M_PI_8
101
102
#define M_PI_8 0.39269908169872415480783042290993786
103
#endif
104
#ifndef M_SQRT2
105
106
#define M_SQRT2 1.41421356237309504880168872420969808
107
#endif
108
#ifndef M_1_SQRT2
109
110
#define M_1_SQRT2 0.70710678118654752440084436210484904
111
#endif
112
#ifndef M_E
113
114
#define M_E 2.71828182845904523536028747135266250
115
#endif
116
#ifndef M_LOG2E
117
118
#define M_LOG2E 1.44269504088896340735992468100189213
119
#endif
120
#ifndef M_LOG10E
121
122
#define M_LOG10E 0.43429448190325182765112891891660508
123
#endif
124
#ifndef M_LN2
125
126
#define M_LN2 0.69314718055994530941723212145817657
127
#endif
128
#ifndef M_LN10
129
130
#define M_LN10 2.30258509299404568401799145468436421
131
#endif
132
#ifndef M_EULER
133
134
#define M_EULER 0.57721566490153286060651209008240243
135
#endif
136
137
#ifndef M_SQRT2PI
138
139
#define M_SQRT2PI 2.50662827463100050241576528481104525
140
#endif
141
143
#define ROUND(X) (floor((X) + 0.5))
144
146
#define ROUNDF(X) (floor((X) + 0.5f))
147
148
149
#ifdef __GNUC__
150
#ifndef ATTRIBUTE_UNUSED
151
152
#define ATTRIBUTE_UNUSED __attribute__((unused))
153
#endif
154
#ifndef ATTRIBUTE_ALWAYSINLINE
155
156
#define ATTRIBUTE_ALWAYSINLINE __attribute__((always_inline))
157
#endif
158
#else
159
#define ATTRIBUTE_UNUSED
160
#define ATTRIBUTE_ALWAYSINLINE
161
#endif
162
179
unsigned
long
millisecond_timer
();
180
181
#endif
/* _BASIC_H_ */
Generated on Sat Dec 14 2013 21:33:17 for A Survey of Gaussian Convolution Algorithms by
1.8.3.1