Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-29 02:41:19

0001 #ifndef HeterogeneousCore_AlpakaInterface_interface_debug_h
0002 #define HeterogeneousCore_AlpakaInterface_interface_debug_h
0003 
0004 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0005 
0006 namespace ALPAKA_ACCELERATOR_NAMESPACE::debug {
0007 
0008   [[nodiscard]] ALPAKA_FN_ACC inline bool always_true() {
0009     volatile const bool flag = true;
0010     return flag;
0011   }
0012 
0013   [[nodiscard]] ALPAKA_FN_ACC inline bool always_false() {
0014     volatile const bool flag = false;
0015     return flag;
0016   }
0017 
0018   ALPAKA_FN_ACC inline void do_not_optimise(const auto& arg) {
0019     volatile const auto* ptr = &arg;
0020     (void)*ptr;
0021   }
0022 
0023 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE::debug
0024 
0025 #endif  // HeterogeneousCore_AlpakaInterface_interface_debug_h