Skip to content

Commit

Permalink
Merge pull request #305 from lanl/dholladay00/fix_sg_pif_nowarn
Browse files Browse the repository at this point in the history
Simplify logic for defining the nowarn macro.
  • Loading branch information
jhp-lanl authored Oct 5, 2023
2 parents c186451 + b5250f4 commit 790cba7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions singularity-eos/eos/eos_eospac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ using namespace eos_base;

// Only really works in serial
// Not really supported on device
#ifndef PORTABILITY_STRATEGY_NONE

// SG_PIF_NOWARN
// this pragma disables host-device warnings when cuda enabled
#if defined(__CUDACC__)
#define SG_PIF_NOWARN #pragma nv_exec_check_disable
#endif // __CUDACC__
#else

// force this macro to be defined regardless of complexity of logic above
#ifndef SG_PIF_NOWARN
#define SG_PIF_NOWARN
#endif // PORTABILITY_STRATEGY_NONE
#endif // !defind SG_PIF_NOWARN

class EOSPAC : public EosBase<EOSPAC> {
public:
Expand Down

0 comments on commit 790cba7

Please sign in to comment.