107
107
#define GDT_TERMINAL_RESET " \033 [0m"
108
108
#define GDT_TERMINAL_DEFAULT GDT_TERMINAL_RESET
109
109
#define GDT_TERMINAL_BOLD " \033 [1;1m"
110
-
110
+
111
111
112
112
113
113
@@ -118,15 +118,7 @@ namespace gdt {
118
118
#ifdef __CUDACC__
119
119
using ::min;
120
120
using ::max;
121
- // inline __both__ float abs(float f) { return fabsf(f); }
122
- // inline __both__ double abs(double f) { return fabs(f); }
123
121
using std::abs;
124
- // inline __both__ float sin(float f) { return ::sinf(f); }
125
- // inline __both__ double sin(double f) { return ::sin(f); }
126
- // inline __both__ float cos(float f) { return ::cosf(f); }
127
- // inline __both__ double cos(double f) { return ::cos(f); }
128
-
129
- using ::saturate;
130
122
#else
131
123
using std::min;
132
124
using std::max;
@@ -139,12 +131,12 @@ namespace gdt {
139
131
// inline __both__ double abs(double f) { return fabs(f); }
140
132
inline __both__ float rcp (float f) { return 1 .f /f; }
141
133
inline __both__ double rcp (double d) { return 1 ./d; }
142
-
134
+
143
135
inline __both__ int32_t divRoundUp (int32_t a, int32_t b) { return (a+b-1 )/b; }
144
136
inline __both__ uint32_t divRoundUp (uint32_t a, uint32_t b) { return (a+b-1 )/b; }
145
137
inline __both__ int64_t divRoundUp (int64_t a, int64_t b) { return (a+b-1 )/b; }
146
138
inline __both__ uint64_t divRoundUp (uint64_t a, uint64_t b) { return (a+b-1 )/b; }
147
-
139
+
148
140
#ifdef __CUDACC__
149
141
using ::sin; // this is the double version
150
142
// inline __both__ float sin(float f) { return ::sinf(f); }
@@ -174,7 +166,7 @@ namespace gdt {
174
166
#else
175
167
# define osp_snprintf snprintf
176
168
#endif
177
-
169
+
178
170
/* ! added pretty-print function for large numbers, printing 10000000 as "10M" instead */
179
171
inline std::string prettyDouble (const double val) {
180
172
const double absVal = abs (val);
@@ -195,7 +187,7 @@ namespace gdt {
195
187
196
188
return result;
197
189
}
198
-
190
+
199
191
200
192
201
193
inline std::string prettyNumber (const size_t s)
@@ -214,7 +206,7 @@ namespace gdt {
214
206
}
215
207
return buf;
216
208
}
217
-
209
+
218
210
inline double getCurrentTime ()
219
211
{
220
212
#ifdef _WIN32
0 commit comments