1#ifndef FREE_TENSOR_PROFILE_H
2#define FREE_TENSOR_PROFILE_H
10#ifdef FT_DEBUG_PROFILE
15 static std::unique_ptr<Profile> profile_;
20 void add(
const std::string &name,
const std::string &detail,
double t);
22 static Profile &getInstance();
26 std::string name_, detail_;
27 std::chrono::time_point<std::chrono::high_resolution_clock> begin_;
30 ProfileGuard(
const std::string &name,
const std::string &detail);
34#define DEBUG_PROFILE(name) \
35 ProfileGuard __profGuard(name, __FILE__ ":" + std::to_string(__LINE__))
37#define DEBUG_PROFILE_VERBOSE(name, detail) \
38 ProfileGuard __profGuard(name, __FILE__ ":" + std::to_string(__LINE__) + \
43#define DEBUG_PROFILE(name)
45#define DEBUG_PROFILE_VERBOSE(name, detail)
Definition: allocator.h:9
UpperBound add(const UpperBound &b1, const UpperBound &b2)
Definition: bounds.cc:193