Merge pull request #12400 from alalek:dnn_update_inline_namespace_master

pull/12414/head
Alexander Alekhin 6 years ago
commit e0bfe44cac
  1. 4
      modules/dnn/include/opencv2/dnn/all_layers.hpp
  2. 4
      modules/dnn/include/opencv2/dnn/dict.hpp
  3. 13
      modules/dnn/include/opencv2/dnn/dnn.hpp
  4. 4
      modules/dnn/include/opencv2/dnn/dnn.inl.hpp
  5. 4
      modules/dnn/include/opencv2/dnn/layer.details.hpp
  6. 4
      modules/dnn/include/opencv2/dnn/layer.hpp
  7. 4
      modules/dnn/include/opencv2/dnn/shape_utils.hpp
  8. 21
      modules/dnn/include/opencv2/dnn/version.hpp
  9. 4
      modules/dnn/src/caffe/caffe_importer.cpp
  10. 4
      modules/dnn/src/caffe/caffe_shrinker.cpp
  11. 4
      modules/dnn/src/darknet/darknet_importer.cpp
  12. 4
      modules/dnn/src/dnn.cpp
  13. 4
      modules/dnn/src/init.cpp
  14. 9
      modules/dnn/src/nms.cpp
  15. 4
      modules/dnn/src/precomp.hpp
  16. 4
      modules/dnn/src/tensorflow/tf_graph_simplifier.cpp
  17. 4
      modules/dnn/src/tensorflow/tf_graph_simplifier.hpp
  18. 4
      modules/dnn/src/tensorflow/tf_importer.cpp
  19. 4
      modules/dnn/src/torch/torch_importer.cpp
  20. 4
      modules/dnn/test/test_precomp.hpp

@ -45,7 +45,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
//! @addtogroup dnn
//! @{
@ -617,7 +617,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
//! @}
//! @}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}
}
#endif

@ -50,7 +50,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
//! @addtogroup dnn
//! @{
@ -149,7 +149,7 @@ public:
};
//! @}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}
}

@ -45,20 +45,13 @@
#include <vector>
#include <opencv2/core.hpp>
#if !defined CV_DOXYGEN && !defined CV_DNN_DONT_ADD_EXPERIMENTAL_NS
#define CV__DNN_EXPERIMENTAL_NS_BEGIN namespace experimental_dnn_34_v7 {
#define CV__DNN_EXPERIMENTAL_NS_END }
namespace cv { namespace dnn { namespace experimental_dnn_34_v7 { } using namespace experimental_dnn_34_v7; }}
#else
#define CV__DNN_EXPERIMENTAL_NS_BEGIN
#define CV__DNN_EXPERIMENTAL_NS_END
#endif
#include "../dnn/version.hpp"
#include <opencv2/dnn/dict.hpp>
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
//! @addtogroup dnn
//! @{
@ -906,7 +899,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
const float eta = 1.f, const int top_k = 0);
//! @}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}
}

@ -46,7 +46,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
template<typename TypeIter>
DictValue DictValue::arrayInt(TypeIter begin, int size)
@ -379,7 +379,7 @@ inline std::map<String, DictValue>::const_iterator Dict::end() const
return dict.end();
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}
}

@ -9,7 +9,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
/** @brief Registers layer constructor in runtime.
* @param type string, containing type name of the layer.
@ -72,7 +72,7 @@ public:
};
} // namespace
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace
#endif

@ -45,7 +45,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
//! @addtogroup dnn
//! @{
//!
@ -79,7 +79,7 @@ private:
//! @}
//! @}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}
}
#endif

@ -50,7 +50,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
//Slicing
@ -213,7 +213,7 @@ inline Range clamp(const Range& r, int axisSize)
return clamped;
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}
}
#endif

@ -0,0 +1,21 @@
// 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_VERSION_HPP
#define OPENCV_DNN_VERSION_HPP
/// Use with major OpenCV version only.
#define OPENCV_DNN_API_VERSION 20180903
#if !defined CV_DOXYGEN && !defined CV_DNN_DONT_ADD_INLINE_NS
#define CV__DNN_INLINE_NS __CV_CAT(dnn4_v, OPENCV_DNN_API_VERSION)
#define CV__DNN_INLINE_NS_BEGIN namespace CV__DNN_INLINE_NS {
#define CV__DNN_INLINE_NS_END }
namespace cv { namespace dnn { namespace CV__DNN_INLINE_NS { } using namespace CV__DNN_INLINE_NS; }}
#else
#define CV__DNN_INLINE_NS_BEGIN
#define CV__DNN_INLINE_NS_END
#endif
#endif // OPENCV_DNN_VERSION_HPP

@ -54,7 +54,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
#ifdef HAVE_PROTOBUF
using ::google::protobuf::RepeatedField;
@ -464,5 +464,5 @@ Net readNetFromCaffe(const std::vector<uchar>& bufferProto, const std::vector<uc
#endif //HAVE_PROTOBUF
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -13,7 +13,7 @@
#endif
namespace cv { namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
#ifdef HAVE_PROTOBUF
@ -76,5 +76,5 @@ void shrinkCaffeModel(const String& src, const String& dst, const std::vector<St
#endif // HAVE_PROTOBUF
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -54,7 +54,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
namespace
{
@ -251,5 +251,5 @@ Net readNetFromDarknet(const std::vector<uchar>& bufferCfg, const std::vector<uc
bufferModelPtr, bufferModel.size());
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -57,7 +57,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
// this option is useful to run valgrind memory errors detection
static bool DNN_DISABLE_MEMORY_OPTIMIZATIONS = utils::getConfigurationParameterBool("OPENCV_DNN_DISABLE_MEMORY_OPTIMIZATIONS", false);
@ -3465,5 +3465,5 @@ Net readNetFromModelOptimizer(const String &xml, const String &bin)
return Net::readFromModelOptimizer(xml, bin);
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -46,7 +46,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
static Mutex* __initialization_mutex = NULL;
Mutex& getInitializationMutex()
@ -132,5 +132,5 @@ void initializeLayerFactory()
CV_DNN_REGISTER_LAYER_CLASS(LSTM, LSTMLayer);
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -10,11 +10,8 @@
#include <opencv2/imgproc.hpp>
namespace cv
{
namespace dnn
{
CV__DNN_EXPERIMENTAL_NS_BEGIN
namespace cv { namespace dnn {
CV__DNN_INLINE_NS_BEGIN
static inline float rectOverlap(const Rect& a, const Rect& b)
{
@ -51,6 +48,6 @@ void NMSBoxes(const std::vector<RotatedRect>& bboxes, const std::vector<float>&
NMSFast_(bboxes, scores, score_threshold, nms_threshold, eta, top_k, indices, rotatedRectIOU);
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}// dnn
}// cv

@ -63,9 +63,9 @@
namespace cv { namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
#define IS_DNN_OPENCL_TARGET(id) (id == DNN_TARGET_OPENCL || id == DNN_TARGET_OPENCL_FP16)
Mutex& getInitializationMutex();
void initializeLayerFactory();
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -12,7 +12,7 @@
#include "tf_graph_simplifier.hpp"
namespace cv { namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
using ::google::protobuf::RepeatedField;
using ::google::protobuf::MapPair;
@ -782,7 +782,7 @@ void releaseTensor(tensorflow::TensorProto* tensor)
}
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace dnn, namespace cv
#endif // HAVE_PROTOBUF

@ -15,7 +15,7 @@
#include "tf_io.hpp"
namespace cv { namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
void RemoveIdentityOps(tensorflow::GraphDef& net);
@ -25,7 +25,7 @@ Mat getTensorContent(const tensorflow::TensorProto &tensor);
void releaseTensor(tensorflow::TensorProto* tensor);
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace dnn, namespace cv
#endif // HAVE_PROTOBUF

@ -24,7 +24,7 @@ Implementation of Tensorflow models parser
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
#if HAVE_PROTOBUF
@ -1950,5 +1950,5 @@ Net readNetFromTensorflow(const std::vector<uchar>& bufferModel, const std::vect
bufferConfigPtr, bufferConfig.size());
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -51,7 +51,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
using namespace TH;
@ -1240,5 +1240,5 @@ Net readNetFromTorch(const String &model, bool isBinary)
return net;
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace

@ -51,7 +51,7 @@
namespace cv {
namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN
CV__DNN_INLINE_NS_BEGIN
static inline void PrintTo(const cv::dnn::Backend& v, std::ostream* os)
{
@ -75,7 +75,7 @@ static inline void PrintTo(const cv::dnn::Target& v, std::ostream* os)
*os << "DNN_TARGET_UNKNOWN(" << v << ")";
}
CV__DNN_EXPERIMENTAL_NS_END
CV__DNN_INLINE_NS_END
}} // namespace
namespace opencv_test {

Loading…
Cancel
Save