Coverage Report

Created: 2026-06-30 06:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/opencv/modules/dnn/src/dnn_params.cpp
Line
Count
Source
1
// This file is part of OpenCV project.
2
// It is subject to the license terms in the LICENSE file found in the top-level directory
3
// of this distribution and at http://opencv.org/license.html.
4
5
#include "precomp.hpp"
6
7
#include "dnn_common.hpp"
8
#include <opencv2/core/utils/configuration.private.hpp>
9
10
namespace cv {
11
namespace dnn {
12
CV__DNN_INLINE_NS_BEGIN
13
14
15
size_t getParam_DNN_NETWORK_DUMP()
16
15.1k
{
17
15.1k
    static size_t DNN_NETWORK_DUMP = utils::getConfigurationParameterSizeT("OPENCV_DNN_NETWORK_DUMP", 0);
18
15.1k
    return DNN_NETWORK_DUMP;
19
15.1k
}
20
21
// this option is useful to run with valgrind memory errors detection
22
bool getParam_DNN_DISABLE_MEMORY_OPTIMIZATIONS()
23
0
{
24
0
    static bool DNN_DISABLE_MEMORY_OPTIMIZATIONS = utils::getConfigurationParameterBool("OPENCV_DNN_DISABLE_MEMORY_OPTIMIZATIONS", false);
25
0
    return DNN_DISABLE_MEMORY_OPTIMIZATIONS;
26
0
}
27
28
#ifdef HAVE_OPENCL
29
bool getParam_DNN_OPENCL_ALLOW_ALL_DEVICES()
30
0
{
31
0
    static bool DNN_OPENCL_ALLOW_ALL_DEVICES = utils::getConfigurationParameterBool("OPENCV_DNN_OPENCL_ALLOW_ALL_DEVICES", false);
32
0
    return DNN_OPENCL_ALLOW_ALL_DEVICES;
33
0
}
34
#endif
35
36
int getParam_DNN_BACKEND_DEFAULT()
37
30.2k
{
38
30.2k
    static int PARAM_DNN_BACKEND_DEFAULT = (int)utils::getConfigurationParameterSizeT("OPENCV_DNN_BACKEND_DEFAULT",
39
#ifdef OPENCV_DNN_BACKEND_DEFAULT
40
            (size_t)OPENCV_DNN_BACKEND_DEFAULT
41
#else
42
30.2k
            (size_t)DNN_BACKEND_OPENCV
43
30.2k
#endif
44
30.2k
    );
45
30.2k
    return PARAM_DNN_BACKEND_DEFAULT;
46
30.2k
}
47
48
// Additional checks (slowdowns execution!)
49
bool getParam_DNN_CHECK_NAN_INF()
50
0
{
51
0
    static bool DNN_CHECK_NAN_INF = utils::getConfigurationParameterBool("OPENCV_DNN_CHECK_NAN_INF", false);
52
0
    return DNN_CHECK_NAN_INF;
53
0
}
54
bool getParam_DNN_CHECK_NAN_INF_DUMP()
55
0
{
56
0
    static bool DNN_CHECK_NAN_INF_DUMP = utils::getConfigurationParameterBool("OPENCV_DNN_CHECK_NAN_INF_DUMP", false);
57
0
    return DNN_CHECK_NAN_INF_DUMP;
58
0
}
59
bool getParam_DNN_CHECK_NAN_INF_RAISE_ERROR()
60
0
{
61
0
    static bool DNN_CHECK_NAN_INF_RAISE_ERROR = utils::getConfigurationParameterBool("OPENCV_DNN_CHECK_NAN_INF_RAISE_ERROR", false);
62
0
    return DNN_CHECK_NAN_INF_RAISE_ERROR;
63
0
}
64
65
66
CV__DNN_INLINE_NS_END
67
}}  // namespace cv::dnn