ArrayFire: timing.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10#pragma once

12

13#ifdef __cplusplus

14

15#if defined(_WIN32) || defined(_MSC_VER)

16 #include <windows.h>

17#elif defined(__APPLE__) && defined(__MACH__)

18

19 #include <mach/mach_time.h>

20#else

21 #ifndef AF_DOC

22 #include <sys/time.h>

23 #endif

24#endif

25

26namespace af {

27

30 #if defined(_WIN32) || defined(_MSC_VER)

31 LARGE_INTEGER val;

32 #elif defined(__APPLE__) && defined(__MACH__)

33 uint64_t val;

34 #else

35 struct timeval val;

36 #endif

37

39

42

43} timer;

44

46}

47

48#endif

AFAPI double timeit(void(*fn)())

static AFAPI timer start()

static AFAPI double stop()

static AFAPI double stop(timer start)