diff options
author | 2019-09-27 08:47:27 -0700 | |
---|---|---|
committer | 2019-09-27 08:47:27 -0700 | |
commit | 4ebc46d8005bf261451420f83fa25f8c3a83c8f1 (patch) | |
tree | 60199c41991263f599f9ff6d52ac70033ee0c5fa /Source/Parser/wp_parser_c.h | |
parent | a05b7f6d6190b6b2e399ab6657d1a74e7544c708 (diff) | |
parent | a74e4e131102efd07c561a7e2a9f6aea9018b05b (diff) | |
download | WarpX-4ebc46d8005bf261451420f83fa25f8c3a83c8f1.tar.gz WarpX-4ebc46d8005bf261451420f83fa25f8c3a83c8f1.tar.zst WarpX-4ebc46d8005bf261451420f83fa25f8c3a83c8f1.zip |
Merge pull request #412 from WeiqunZhang/fix-float
fix types, amrex::Real and amrex::ParticleReal
Diffstat (limited to 'Source/Parser/wp_parser_c.h')
-rw-r--r-- | Source/Parser/wp_parser_c.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Parser/wp_parser_c.h b/Source/Parser/wp_parser_c.h index 3aafdec65..970d6b355 100644 --- a/Source/Parser/wp_parser_c.h +++ b/Source/Parser/wp_parser_c.h @@ -4,6 +4,7 @@ #include "wp_parser_y.h" #include <AMReX_GpuQualifiers.H> #include <AMReX_Extension.H> +#include <AMReX_REAL.H> #ifdef __cplusplus extern "C" { @@ -21,15 +22,15 @@ extern "C" { #include <string> AMREX_GPU_HOST_DEVICE -inline double +inline amrex_real wp_ast_eval (struct wp_node* node) { - double result; + amrex_real result; #ifdef AMREX_DEVICE_COMPILE - extern __shared__ double extern_xyz[]; + extern __shared__ amrex_real extern_xyz[]; int tid = threadIdx.x + threadIdx.y*blockDim.x + threadIdx.z*(blockDim.x*blockDim.y); - double* x = extern_xyz + tid*3; + amrex_real* x = extern_xyz + tid*3; #endif switch (node->type) |