Does CV_DISABLE_OPTIMIZATION disable all optimizations?

asked 2019-12-28 19:52:18 -0600

2Smoker gravatar image

OS: Ubuntu 64 Compiler: g++ 7.4

I used CMake (gui) tool to configure and generate a build setup for OpenCV 3.4 and set "CV_DISABLE_OPTIMIZATION" with the expectation that this would disable all optimizations.

Yet when I step through code, gdb jumps back and forth between adjacent lines when stepping over lines.

As an example, in imgproc module's loadsave.cpp file, stepping over these lines in the imread function (around line 645):

/// create the basic container
Mat img;

/// load the data
imread_( filename, flags, LOAD_MAT, &img );

results in jumping to imgfrom imread_ and then back to imread_ again.

Can someone help clear the confusion? I figure this is happening because of optimizations being done anyway. Any way to disable this kind of optimization?

PS: My overarching goal is to use this to improve the docs/write a primer for contributors. Constructive input will be credited.

edit retag flag offensive close merge delete

Comments

Yet when I step through code, gdb jumps back and forth

that's unrelated (but admittedly confusing !)

berak gravatar imageberak ( 2019-12-29 03:31:13 -0600 )edit