<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.1.0</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04</li>
<li>Compiler =&gt; gcc 7.3.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I ran optical flow detection in an NVIDIA OpenCL Docker container. With <code class="notranslate">FarnebackOpticalFlow</code>, the GPU version is 9 times faster than the CPU version.  With <code class="notranslate">DISOpticalFlow</code>, there is no difference.  It looks like it is due to the test for <code class="notranslate">ocl::Device::getDefault().isIntel()</code>:</p>
<p dir="auto"><a href="https://github.com/opencv/opencv/blob/master/modules/video/src/dis_flow.cpp#L1371">https://github.com/opencv/opencv/blob/master/modules/video/src/dis_flow.cpp#L1371</a></p>
<p dir="auto">Is there a reason why the OpenCL implementation of <code class="notranslate">DISOpticalFlow</code> would not work on NVIDIA?</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">If you like, I can provide a sample program. However, with the current source, <code class="notranslate">DISOpticalFlow</code> will not use OpenCL on NVIDIA.</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; :4.0:</li>
<li>Operating System / Platform =&gt; :Mac OSX 10.13.6:</li>
<li>Compiler =&gt; :Xcode 8.33 and Xcode 10:</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Here is my cmake command:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=~/Public \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
    -D BUILD_opencv_python2=OFF \
    -D BUILD_opencv_python3=OFF \
    -D INSTALL_C_EXAMPLES=OFF \
    -D BUILD_EXAMPLES=OFF .."><pre class="notranslate"><code class="notranslate">cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=~/Public \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
    -D BUILD_opencv_python2=OFF \
    -D BUILD_opencv_python3=OFF \
    -D INSTALL_C_EXAMPLES=OFF \
    -D BUILD_EXAMPLES=OFF ..
</code></pre></div>
<p dir="auto">Then I got the follow error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- Configuring incomplete, errors occurred!
See also &quot;/Users/a635219/Public/opencv/build/CMakeFiles/CMakeOutput.log&quot;.
See also &quot;/Users/a635219/Public/opencv/build/CMakeFiles/CMakeError.log&quot;."><pre class="notranslate"><code class="notranslate">-- Configuring incomplete, errors occurred!
See also "/Users/a635219/Public/opencv/build/CMakeFiles/CMakeOutput.log".
See also "/Users/a635219/Public/opencv/build/CMakeFiles/CMakeError.log".
</code></pre></div>
<p dir="auto">Here are the errors in CMakeError.log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Compilation failed:
    source file: '/Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp'
    check option: ' -msse -msse2 -msse3 -mssse3 -msse4.1'
===== BUILD LOG =====
Change Dir: /Users/a635219/Public/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:&quot;/usr/bin/make&quot; &quot;cmTC_abbd3/fast&quot;
/Applications/Xcode-10.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_abbd3.dir/build.make CMakeFiles/cmTC_abbd3.dir/build
Building CXX object CMakeFiles/cmTC_abbd3.dir/cpu_popcnt.cpp.o
/Applications/Xcode-10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -O3 -DNDEBUG -fPIE   -msse -msse2 -msse3 -mssse3 -msse4.1 -std=c++11 -o CMakeFiles/cmTC_abbd3.dir/cpu_popcnt.cpp.o -c /Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp
/Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp:14:4: error: &quot;__POPCNT__ is not defined by compiler&quot;
#  error &quot;__POPCNT__ is not defined by compiler&quot;
   ^
/Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp:22:13: error: use of undeclared identifier 'CV_POPCNT_U32'
    int j = CV_POPCNT_U32(1);
            ^
2 errors generated.
make[1]: *** [CMakeFiles/cmTC_abbd3.dir/cpu_popcnt.cpp.o] Error 1
make: *** [cmTC_abbd3/fast] Error 2

===== END ====="><pre class="notranslate"><code class="notranslate">Compilation failed:
    source file: '/Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp'
    check option: ' -msse -msse2 -msse3 -mssse3 -msse4.1'
===== BUILD LOG =====
Change Dir: /Users/a635219/Public/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_abbd3/fast"
/Applications/Xcode-10.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_abbd3.dir/build.make CMakeFiles/cmTC_abbd3.dir/build
Building CXX object CMakeFiles/cmTC_abbd3.dir/cpu_popcnt.cpp.o
/Applications/Xcode-10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -O3 -DNDEBUG -fPIE   -msse -msse2 -msse3 -mssse3 -msse4.1 -std=c++11 -o CMakeFiles/cmTC_abbd3.dir/cpu_popcnt.cpp.o -c /Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp
/Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp:14:4: error: "__POPCNT__ is not defined by compiler"
#  error "__POPCNT__ is not defined by compiler"
   ^
/Users/a635219/Public/opencv/cmake/checks/cpu_popcnt.cpp:22:13: error: use of undeclared identifier 'CV_POPCNT_U32'
    int j = CV_POPCNT_U32(1);
            ^
2 errors generated.
make[1]: *** [CMakeFiles/cmTC_abbd3.dir/cpu_popcnt.cpp.o] Error 1
make: *** [cmTC_abbd3/fast] Error 2

===== END =====
</code></pre></div>
<p dir="auto">Any suggestion? Thanks.</p>