.. _program_listing_file_include_embers_amdgpu_realtime.h: Program Listing for File realtime.h =================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/embers/amdgpu/realtime.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* Copyright © 2020 Advanced Micro Devices, Inc. All rights reserved */ #ifndef _EMBERS_AMDGPU_REALTIME_H_ #define _EMBERS_AMDGPU_REALTIME_H_ #include namespace embers { namespace amdgpu { __device__ inline void get_realtime(uint64_t *count) { #if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) asm volatile("s_sendmsg_rtn_b64 %0 0x83\n s_waitcnt lgkmcnt(0)" : "=s"(count)::); #else asm volatile("s_memrealtime %0\n s_waitcnt lgkmcnt(0)" : "=s"(count)::); #endif } } // namespace amdgpu } // namespace embers #endif // _EMBERS_AMDGPU_REALTIME_H_