pastebin - collaborative debugging tool
kpaste.net RSS


Untitled
Posted by Anonymous on Thu 21st May 2026 02:04
raw | new post

  1. #define DECLARE_CYCED(postfix_name, f)                                                         \
  2.   __device__ __forceinline__ Cycles cyced_##postfix_name()                                     \
  3.   {                                                                                            \
  4.     const uint64_t start_cycle = clock64();                                                    \
  5.     f;                                                                                         \
  6.     const uint64_t stop_cycle = clock64();                                                     \
  7.     return { stop_cycle - start_cycle };                                                       \
  8.   }
  9.  
  10. #define DECLARE_TIMED(postfix_name, f)                                                         \
  11.   __device__ __forceinline__ NS timed_##postfix_name()                                         \
  12.   {                                                                                            \
  13.     uint64_t start_time = globaltimer();                                                       \
  14.     f;                                                                                         \
  15.     uint64_t stop_time = globaltimer();                                                        \
  16.     return { stop_time - start_time };                                                         \
  17.   }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at