| 28 | ProfileScope(std::string(name)) {} |
| 29 | |
| 30 | ProfileScope::~ProfileScope() { |
| 31 | double end = omp_get_wtime(); |
| 32 | double duration = end - _start; |
| 33 | if (_profile_enabled) { |
| 34 | std::string key = ""; |
| 35 | for (const auto& scope : _profile_scopes) { |
| 36 | key += scope + "."; |
| 37 | } |
| 38 | _profile_times[key] += duration; |
| 39 | } |
| 40 | _profile_scopes.pop_back(); |
| 41 | } |
| 42 | #else |
| 43 | ProfileScope::ProfileScope(std::string name) {} |
| 44 | ProfileScope::ProfileScope(const char* name) {} |
nothing calls this directly
no outgoing calls
no test coverage detected