From e89897985eb9d4d58bb392f0c92169f12763f690 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Mon, 19 Aug 2019 14:02:30 +0300 Subject: [PATCH] Battled with math.h and cmath. We probably should move from C standard libraries to C++ ones internally (in places which are not visible via the interface) --- src/core/kernels/integration.cuh | 2 +- src/core/math_utils.h | 8 ++++---- src/standalone/model/host_forcing.cc | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/kernels/integration.cuh b/src/core/kernels/integration.cuh index 58063a6..1b62d1e 100644 --- a/src/core/kernels/integration.cuh +++ b/src/core/kernels/integration.cuh @@ -26,7 +26,7 @@ */ #pragma once -#include "math_utils.h" +#include "src/core/math_utils.h" #include diff --git a/src/core/math_utils.h b/src/core/math_utils.h index 5ebd42c..4d41e4e 100644 --- a/src/core/math_utils.h +++ b/src/core/math_utils.h @@ -25,10 +25,10 @@ * */ #pragma once -#include -using namespace std; // Potentially bad practice to declare namespace std here -// #include // isnan, isinf // Overloads incorrect/bugged with GCC <= 6.0 -// #include // Even this does not work +//#include +// using namespace std; // Potentially bad practice to declare namespace std here +#include // isnan, isinf // Overloads incorrect/bugged with GCC <= 6.0 +//#include // Even this does not work #include // rand template diff --git a/src/standalone/model/host_forcing.cc b/src/standalone/model/host_forcing.cc index bdc9d9f..1f39296 100644 --- a/src/standalone/model/host_forcing.cc +++ b/src/standalone/model/host_forcing.cc @@ -27,7 +27,8 @@ #include "host_forcing.h" // #include "src/core/math_utils.h" -#include "math.h" +#include +using namespace std; // The is a wrapper for genering random numbers with a chosen system. AcReal