8 #ifndef WARPX_PROFILERWRAPPER_H_ 9 #define WARPX_PROFILERWRAPPER_H_ 11 #include <AMReX_BLProfiler.H> 12 #include <AMReX_GpuDevice.H> 17 if ( do_device_synchronize )
18 amrex::Gpu::synchronize();
21 #define WARPX_PROFILE(fname) doDeviceSynchronize(WarpX::do_device_synchronize_before_profile); BL_PROFILE(fname) 22 #define WARPX_PROFILE_VAR(fname, vname) doDeviceSynchronize(WarpX::do_device_synchronize_before_profile); BL_PROFILE_VAR(fname, vname) 23 #define WARPX_PROFILE_VAR_NS(fname, vname) doDeviceSynchronize(WarpX::do_device_synchronize_before_profile); BL_PROFILE_VAR_NS(fname, vname) 24 #define WARPX_PROFILE_VAR_START(vname) doDeviceSynchronize(WarpX::do_device_synchronize_before_profile); BL_PROFILE_VAR_START(vname) 25 #define WARPX_PROFILE_VAR_STOP(vname) doDeviceSynchronize(WarpX::do_device_synchronize_before_profile); BL_PROFILE_VAR_STOP(vname) 26 #define WARPX_PROFILE_REGION(rname) doDeviceSynchronize(WarpX::do_device_synchronize_before_profile); BL_PROFILE_REGION(rname) 28 #endif // WARPX_PROFILERWRAPPER_H_ AMREX_FORCE_INLINE void doDeviceSynchronize(int do_device_synchronize)
Definition: WarpXProfilerWrapper.H:15