Skip to content

Commit

Permalink
Fix warnings in CUDA builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sayerhs committed Apr 1, 2020
1 parent 39fc6d4 commit fe3387b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/FieldUtils.H
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ inline amrex::IndexType index_type(const FieldLoc floc)
case FieldLoc::ZFACE:
return amrex::IndexType(amrex::IntVect::TheDimensionVector(2));
}

#ifdef AMREX_USE_GPU
// Suppress warnings when compiling with CUDA
return amrex::IndexType::TheCellType();
#endif
}

inline std::string
Expand All @@ -46,6 +51,11 @@ field_name_with_state(const std::string& fname, const FieldState fstate)
case FieldState::NMH:
return fname + "__FS_NMH";
}

#ifdef AMREX_USE_GPU
// Suppress warnings when compiling with CUDA
return fname;
#endif
}

inline bool is_valid_field_name(const std::string& name)
Expand Down

0 comments on commit fe3387b

Please sign in to comment.