Download include/opencv2/core/utils/trace.hpp from dlxjj/opencv: direct link, hf CLI and curl.
- Browser
- Download file 9.32 kB
-
https://huggingface.co/datasets/dlxjj/opencv/resolve/main/include/opencv2/core/utils/trace.hpp
- Command line
-
hf download hf://datasets/dlxjj/opencv/include/opencv2/core/utils/trace.hpp
-
curl -L -o trace.hpp https://huggingface.co/datasets/dlxjj/opencv/resolve/main/include/opencv2/core/utils/trace.hpp
9.32 kB
| // This file is part of OpenCV project. | |
| // It is subject to the license terms in the LICENSE file found in the top-level directory | |
| // of this distribution and at http://opencv.org/license.html. | |
| namespace cv { | |
| namespace utils { | |
| namespace trace { | |
| //! @addtogroup core_logging | |
| //! @{ | |
| //! Macro to trace function | |
| //! Trace code scope. | |
| //! @note Dynamic names are not supported in this macro (on stack or heap). Use string literals here only, like "initialize". | |
| //! mark completed of the current opened region and create new one | |
| //! @note Dynamic names are not supported in this macro (on stack or heap). Use string literals here only, like "step1". | |
| //! Macro to trace argument value | |
| //! Macro to trace argument value (expanded version) | |
| //! @cond IGNORED | |
| namespace details { | |
| //! Thread-local instance (usually allocated on stack) | |
| class CV_EXPORTS Region | |
| { | |
| public: | |
| struct LocationExtraData; | |
| struct LocationStaticStorage | |
| { | |
| LocationExtraData** ppExtra; ///< implementation specific data | |
| const char* name; ///< region name (function name or other custom name) | |
| const char* filename; ///< source code filename | |
| int line; ///< source code line | |
| int flags; ///< flags (implementation code path: Plain, IPP, OpenCL) | |
| }; | |
| Region(const LocationStaticStorage& location); | |
| inline ~Region() | |
| { | |
| if (implFlags != 0) | |
| destroy(); | |
| CV_DbgAssert(implFlags == 0); | |
| CV_DbgAssert(pImpl == NULL); | |
| } | |
| class Impl; | |
| Impl* pImpl; // NULL if current region is not active | |
| int implFlags; // see RegionFlag, 0 if region is ignored | |
| bool isActive() const { return pImpl != NULL; } | |
| void destroy(); | |
| private: | |
| Region(const Region&); // disabled | |
| Region& operator= (const Region&); // disabled | |
| }; | |
| //! Specify region flags | |
| enum RegionLocationFlag { | |
| REGION_FLAG_FUNCTION = (1 << 0), ///< region is function (=1) / nested named region (=0) | |
| REGION_FLAG_APP_CODE = (1 << 1), ///< region is Application code (=1) / OpenCV library code (=0) | |
| REGION_FLAG_SKIP_NESTED = (1 << 2), ///< avoid processing of nested regions | |
| REGION_FLAG_IMPL_IPP = (1 << 16), ///< region is part of IPP code path | |
| REGION_FLAG_IMPL_OPENCL = (2 << 16), ///< region is part of OpenCL code path | |
| REGION_FLAG_IMPL_OPENVX = (3 << 16), ///< region is part of OpenVX code path | |
| REGION_FLAG_IMPL_MASK = (15 << 16), | |
| REGION_FLAG_REGION_FORCE = (1 << 30), | |
| REGION_FLAG_REGION_NEXT = (1 << 31), ///< close previous region (see #CV_TRACE_REGION_NEXT macro) | |
| ENUM_REGION_FLAG_FORCE_INT = INT_MAX | |
| }; | |
| struct CV_EXPORTS TraceArg { | |
| public: | |
| struct ExtraData; | |
| ExtraData** ppExtra; | |
| const char* name; | |
| int flags; | |
| }; | |
| /** @brief Add meta information to current region (function) | |
| * See CV_TRACE_ARG macro | |
| * @param arg argument information structure (global static cache) | |
| * @param value argument value (can by dynamic string literal in case of string, static allocation is not required) | |
| */ | |
| CV_EXPORTS void traceArg(const TraceArg& arg, const char* value); | |
| //! @overload | |
| CV_EXPORTS void traceArg(const TraceArg& arg, int value); | |
| //! @overload | |
| CV_EXPORTS void traceArg(const TraceArg& arg, int64 value); | |
| //! @overload | |
| CV_EXPORTS void traceArg(const TraceArg& arg, double value); | |
| } // namespace | |
| //! @endcond | |
| //! @} | |
| }}} // namespace | |