⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.h

📁 用于GPU通用计算的编程语言BrookGPU 0.4
💻 H
字号:
/* * main.h * *      Exports from main.cpp.  Pretty much infrastructure type functions *      (timing, logging, etc.) plus command line arguments. */#ifndef __MAIN_H_#define __MAIN_H_#ifdef WIN32typedef __int64 int64;#define printf64(a) printf("%8I64d", a)#elsetypedef long long int64;#define printf64(a) printf("%8Ld", a)#endif#ifdef WIN32static inlineint64 GetTimeTSC() {   __asm _emit 0x0f __asm _emit 0x31}#else#if defined(__ppc__)static inlinelong long GetTimeTSC() {   int64 t;   int tl, th;   __asm__ __volatile__("mftbu %0" : "=b" (th));   __asm__ __volatile__("mftb %0" : "=b" (tl));   t = th;   t <<= 32;   t += tl;   return t;}#elsestatic inlineint64 GetTimeTSC() {   int64 t;   __asm__ __volatile__("rdtsc" : "=A" (t));   return t;}#endif#endifextern int64 GetTime(void);extern unsigned int GetTimeMillis(void);extern int64 CyclesToUsecs(int64 cycles);/* * XXX brcc currently has grief with typedefs mixed with Brook code, so we * just prototype all these here.  Since brcc runs before cpp, we sidestep * the issue.  I apologize deeply.  --Jeremy. */extern int64 start, stop, t1, t2;#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -