Back to Mnn

MNN: include/AutoTime.hpp 源文件

doc/API/html/_auto_time_8hpp_source.html

3.5.02.0 KB
Original Source

| MNN 1.0 |

AutoTime.hpp

浏览该文件的文档.

1 //

2 // AutoTime.hpp

3 // MNN

4 //

5 // Created by MNN on 2018/07/27.

6 // Copyright © 2018, Alibaba Group Holding Limited

7 //

8

9 #ifndef AutoTime_hpp

10 #define AutoTime_hpp

11

12 #include <stdint.h>

13 #include <stdio.h>

14 #include "MNNDefine.h"

15

16 namespace MNN {

17

19 class MNN_PUBLIC AutoTime {

20 public:

21AutoTime(int line, const char* func);

22 ~AutoTime();

23AutoTime(const AutoTime&) = delete;

24AutoTime(const AutoTime&&) = delete;

25AutoTime& operator=(const AutoTime&) = delete;

26AutoTime& operator=(const AutoTime&&) = delete;

27

28 private:

29int mLine;

30char* mName;

31 uint64_t mCurrentTime;

32 };

33 } // namespace MNN

34

35 #ifdef MNN_OPEN_TIME_TRACE

36 #define AUTOTIME MNN::AutoTime ___t(__LINE__, __func__)

37 #else

38 #define AUTOTIME

39 #endif

40

41 #endif /* AutoTime_hpp */

MNN_PUBLIC

#define MNN_PUBLIC

Definition: MNNDefine.h:53

MNN::AutoTime

Definition: AutoTime.hpp:19

MNN

Definition: AutoTime.hpp:16

MNNDefine.h


制作者 1.8.15