Modified standalone includes to function with new astaroth headers

This commit is contained in:
jpekkila
2020-01-23 20:03:25 +02:00
parent 3adb0242a4
commit 96389e9da6
12 changed files with 22 additions and 18 deletions

View File

@@ -29,15 +29,15 @@
#include <stdio.h> #include <stdio.h>
#include "config_loader.h" #include "config_loader.h"
#include "math_utils.h"
#include "model/host_forcing.h" #include "model/host_forcing.h"
#include "model/host_memory.h" #include "model/host_memory.h"
#include "model/host_timestep.h" #include "model/host_timestep.h"
#include "model/model_boundconds.h" #include "model/model_boundconds.h"
#include "model/model_reduce.h" #include "model/model_reduce.h"
#include "model/model_rk3.h" #include "model/model_rk3.h"
#include "src/core/math_utils.h"
#include "src/core/errchk.h" #include "errchk.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -75,6 +75,10 @@ static const InitType test_cases[] = {INIT_TYPE_RANDOM, INIT_TYPE_XWAVE,
INIT_TYPE_GAUSSIAN_RADIAL_EXPL, INIT_TYPE_ABC_FLOW}; INIT_TYPE_GAUSSIAN_RADIAL_EXPL, INIT_TYPE_ABC_FLOW};
// #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) // #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#ifndef AC_DOUBLE_PRECISION
#define AC_DOUBLE_PRECISION (0)
#endif
static inline bool static inline bool
is_valid(const ModelScalar a) is_valid(const ModelScalar a)
{ {

View File

@@ -35,7 +35,7 @@
#include "model/model_rk3.h" #include "model/model_rk3.h"
#include "timer_hires.h" #include "timer_hires.h"
#include "src/core/errchk.h" #include "errchk.h"
#include <algorithm> #include <algorithm>
#include <math.h> #include <math.h>
#include <vector> #include <vector>
@@ -246,7 +246,7 @@ run_benchmark(void)
#if AUTO_OPTIMIZE #if AUTO_OPTIMIZE
const char* benchmark_path = "benchmark.out"; const char* benchmark_path = "benchmark.out";
#include "src/core/kernels/rk3_threadblock.conf" #include "kernels/rk3_threadblock.conf"
static int static int
write_result_to_file(const float& ms_per_step) write_result_to_file(const float& ms_per_step)
{ {

View File

@@ -31,8 +31,8 @@
#include <stdio.h> // print #include <stdio.h> // print
#include <string.h> // memset #include <string.h> // memset
#include "src/core/errchk.h" #include "errchk.h"
#include "src/core/math_utils.h" #include "math_utils.h"
/** /**
\brief Find the index of the keyword in names \brief Find the index of the keyword in names

View File

@@ -29,7 +29,7 @@
#include <string.h> #include <string.h>
#include "run.h" #include "run.h"
#include "src/core/errchk.h" #include "errchk.h"
// Write all errors from stderr to an <errorlog_name> in the current working // Write all errors from stderr to an <errorlog_name> in the current working
// directory // directory

View File

@@ -26,7 +26,7 @@
*/ */
#include "host_forcing.h" #include "host_forcing.h"
// #include "src/core/math_utils.h" // #include "math_utils.h"
#include <cmath> #include <cmath>
using namespace std; using namespace std;

View File

@@ -28,7 +28,7 @@
#include <math.h> #include <math.h>
#include "src/core/errchk.h" #include "errchk.h"
#define AC_GEN_STR(X) #X #define AC_GEN_STR(X) #X
const char* init_type_names[] = {AC_FOR_INIT_TYPES(AC_GEN_STR)}; const char* init_type_names[] = {AC_FOR_INIT_TYPES(AC_GEN_STR)};

View File

@@ -26,7 +26,7 @@
*/ */
#include "host_timestep.h" #include "host_timestep.h"
#include "src/core/math_utils.h" #include "math_utils.h"
static AcReal timescale = AcReal(1.0); static AcReal timescale = AcReal(1.0);

View File

@@ -26,7 +26,7 @@
*/ */
#include "model_boundconds.h" #include "model_boundconds.h"
#include "src/core/errchk.h" #include "errchk.h"
void void
boundconds(const AcMeshInfo& mesh_info, ModelMesh* mesh) boundconds(const AcMeshInfo& mesh_info, ModelMesh* mesh)

View File

@@ -25,7 +25,7 @@
* *
*/ */
#pragma once #pragma once
#include "src/core/errchk.h" #include "errchk.h"
typedef long double MODEL_REAL; typedef long double MODEL_REAL;

View File

@@ -28,7 +28,7 @@
#include <math.h> #include <math.h>
#include "src/core/errchk.h" #include "errchk.h"
// Function pointer definitions // Function pointer definitions
typedef ModelScalar (*ReduceFunc)(const ModelScalar&, const ModelScalar&); typedef ModelScalar (*ReduceFunc)(const ModelScalar&, const ModelScalar&);

View File

@@ -32,13 +32,13 @@
#include <string.h> // memcpy #include <string.h> // memcpy
#include "config_loader.h" #include "config_loader.h"
#include "errchk.h"
#include "math_utils.h"
#include "model/host_forcing.h" #include "model/host_forcing.h"
#include "model/host_memory.h" #include "model/host_memory.h"
#include "model/host_timestep.h" #include "model/host_timestep.h"
#include "model/model_reduce.h" #include "model/model_reduce.h"
#include "model/model_rk3.h" #include "model/model_rk3.h"
#include "src/core/errchk.h"
#include "src/core/math_utils.h"
#include "timer_hires.h" #include "timer_hires.h"
// NEED TO BE DEFINED HERE. IS NOT NOTICED BY compile_acc call. // NEED TO BE DEFINED HERE. IS NOT NOTICED BY compile_acc call.
@@ -453,7 +453,7 @@ run_renderer(const char* config_path)
return 0; return 0;
} }
#else // BUILD_RT_VISUALIZATION == 0 #else // BUILD_RT_VISUALIZATION == 0
#include "src/core/errchk.h" #include "errchk.h"
int int
run_renderer(const char* /*config_path*/) run_renderer(const char* /*config_path*/)
{ {

View File

@@ -32,8 +32,8 @@
#include "model/host_timestep.h" #include "model/host_timestep.h"
#include "model/model_reduce.h" #include "model/model_reduce.h"
#include "model/model_rk3.h" #include "model/model_rk3.h"
#include "src/core/errchk.h" #include "errchk.h"
#include "src/core/math_utils.h" #include "math_utils.h"
#include "timer_hires.h" #include "timer_hires.h"
#include <string.h> #include <string.h>