24 #ifndef ARM_COMPUTE_TRACEPOINT_H 25 #define ARM_COMPUTE_TRACEPOINT_H 28 #include <type_traits> 33 #ifdef ARM_COMPUTE_TRACING_ENABLED 34 #define ARM_COMPUTE_CREATE_TRACEPOINT(...) TracePoint __tp(__VA_ARGS__) 37 class TracePoint final
49 std::vector<std::string>
args{};
59 TracePoint(Layer
source,
const std::string &class_name,
void *
object, Args &&
args);
76 TracePoint::Args &&operator<<(typename std::enable_if < !std::is_pointer<T>::value, TracePoint::Args >
::type &&tp,
const T &arg);
78 TracePoint::Args &&
operator<<(TracePoint::Args &&tp,
const T *arg);
80 #define ARM_COMPUTE_CONST_REF_CLASS(type) \ 82 TracePoint::Args &&operator<<(TracePoint::Args &&tp, const type &arg) \ 84 ARM_COMPUTE_UNUSED(tp); \ 85 tp.args.push_back(#type "(" + to_string(arg) + ")"); \ 86 return std::move(tp); \ 89 #define ARM_COMPUTE_CONST_PTR_ADDRESS(type) \ 91 TracePoint::Args &&operator<<(TracePoint::Args &&tp, const type *arg) \ 93 ARM_COMPUTE_UNUSED(tp); \ 94 tp.args.push_back(#type "*(" + to_ptr_string(arg) + ")"); \ 95 return std::move(tp); \ 97 #define ARM_COMPUTE_CONST_PTR_CLASS(type) \ 99 TracePoint::Args &&operator<<(TracePoint::Args &&tp, const type *arg) \ 101 ARM_COMPUTE_UNUSED(tp); \ 103 tp.args.push_back(#type "(" + to_string(*arg) + ")"); \ 105 tp.args.push_back(#type "( nullptr )"); \ 106 return std::move(tp); \ 109 #define ARM_COMPUTE_CONST_REF_SIMPLE(type) \ 111 TracePoint::Args &&operator<<(TracePoint::Args &&tp, const type &arg) \ 113 ARM_COMPUTE_UNUSED(tp); \ 114 tp.args.push_back(#type "(" + support::cpp11::to_string(arg) + ")"); \ 115 return std::move(tp); \ 118 #define ARM_COMPUTE_TRACE_TO_STRING(type) \ 119 std::string to_string(const type &arg) \ 121 ARM_COMPUTE_UNUSED(arg); \ 125 #define ARM_COMPUTE_CREATE_TRACEPOINT(...) 126 #define ARM_COMPUTE_CONST_REF_CLASS(type) 127 #define ARM_COMPUTE_CONST_PTR_ADDRESS(type) 128 #define ARM_COMPUTE_CONST_PTR_CLASS(type) 129 #define ARM_COMPUTE_CONST_REF_SIMPLE(type) 130 #define ARM_COMPUTE_TRACE_TO_STRING(type)
decltype(strategy::transforms) typedef type
Copyright (c) 2017-2021 Arm Limited.
TracePoint::Args && operator<<(TracePoint::Args &&tp, const ICLTensor *arg)