lanl / ports-of-call

Performance Portability Utilities
https://lanl.github.io/ports-of-call/
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

`PORTABILITY_STRATEGY_NONE` is not set as the default #29

Open Yurlungur opened 1 year ago

Yurlungur commented 1 year ago

It should be. Until this is resolved, downstream codes must set the strategy themselves.

mauneyc-LANL commented 1 year ago

The PORTABILITY_STRATEGY_NONE falls into the #else at the end of the preprocessor if-then-else.

Now, this may be somewhat imprecise, as PORTABILITY_STRATEGY_HAMSTER or PORTABILITY_TACTICS_360NOSCOPE or whatever gibberish.

Probably the best solution here is

#if !(defined PS_KOKKOS || defined PS_CUDA)
  #define PS_NONE
#endif 

#elif defined PS_NONE
//
#else 
#error "Cannot retrieve PS, check build"
#endif
Yurlungur commented 1 year ago

That would work.