Math operators are now using consistent precision throughout the project
This commit is contained in:
@@ -25,12 +25,16 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
//#include <cmath>
|
||||
// using namespace std; // Potentially bad practice to declare namespace std here
|
||||
#include <math.h> // isnan, isinf // Overloads incorrect/bugged with GCC <= 6.0
|
||||
//#include <tgmath.h> // Even this does not work
|
||||
#include <math.h> // isnan, isinf
|
||||
#include <stdlib.h> // rand
|
||||
|
||||
#if AC_DOUBLE_PRECISION != 1
|
||||
#define exp(x) expf(x)
|
||||
#define sin(x) sinf(x)
|
||||
#define cos(x) cosf(x)
|
||||
#define sqrt(x) sqrtf(x)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
static inline const T
|
||||
max(const T& a, const T& b)
|
||||
|
@@ -68,10 +68,6 @@ typedef cuDoubleComplex acComplex;
|
||||
#else
|
||||
typedef cuFloatComplex acComplex;
|
||||
#define acComplex(x, y) make_cuFloatComplex(x, y)
|
||||
#define exp(x) expf(x)
|
||||
#define sin(x) sinf(x)
|
||||
#define cos(x) cosf(x)
|
||||
#define sqrt(x) sqrtf(x)
|
||||
#endif
|
||||
|
||||
static __device__ inline acComplex
|
||||
|
Reference in New Issue
Block a user