2020-05-26 20:45:55 +08:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
#ifndef __OPENCV_DNN_COMMON_HPP__
|
|
|
|
#define __OPENCV_DNN_COMMON_HPP__
|
|
|
|
|
|
|
|
#include <opencv2/dnn.hpp>
|
|
|
|
|
|
|
|
namespace cv { namespace dnn {
|
2020-05-29 07:35:11 +08:00
|
|
|
CV__DNN_INLINE_NS_BEGIN
|
2020-05-26 20:45:55 +08:00
|
|
|
#define IS_DNN_OPENCL_TARGET(id) (id == DNN_TARGET_OPENCL || id == DNN_TARGET_OPENCL_FP16)
|
|
|
|
Mutex& getInitializationMutex();
|
|
|
|
void initializeLayerFactory();
|
|
|
|
|
|
|
|
namespace detail {
|
|
|
|
|
|
|
|
struct NetImplBase
|
|
|
|
{
|
|
|
|
const int networkId; // network global identifier
|
|
|
|
int networkDumpCounter; // dump counter
|
|
|
|
int dumpLevel; // level of information dumps (initialized through OPENCV_DNN_NETWORK_DUMP parameter)
|
|
|
|
|
|
|
|
NetImplBase();
|
|
|
|
|
|
|
|
std::string getDumpFileNameBase();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace detail
|
|
|
|
|
2020-05-29 07:35:11 +08:00
|
|
|
CV__DNN_INLINE_NS_END
|
2020-05-26 20:45:55 +08:00
|
|
|
}} // namespace
|
|
|
|
|
|
|
|
#endif // __OPENCV_DNN_COMMON_HPP__
|