# Missing cudaarithm.hpp in 4.5.2 build

**URL:** <https://forum.opencv.org/t/missing-cudaarithm-hpp-in-4-5-2-build/3427>\
**Category:** C++\
**Tags:** build, cuda\
**Created:** [May 19, 2021, 8:14pm UTC](https://forum.opencv.org/t/missing-cudaarithm-hpp-in-4-5-2-build/3427 "2021-05-19T20:14:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdaly](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jdaly/32/554_2.png) [@jdaly](https://forum.opencv.org/u/jdaly)\
**Post date:** [May 19, 2021, 8:14pm UTC](https://forum.opencv.org/t/missing-cudaarithm-hpp-in-4-5-2-build/3427/1 "2021-05-19T20:14:41Z")

</div>

Checked out tag 4.5.2 from github and built bot the release and debug libraries with CUDA support enabled successfully.

Attempting to use function call ’ cv::cuda::gem’ in my C++ app; OpenCV 4.5.2 documents ([OpenCV: Arithm Operations on Matrices](https://docs.opencv.org/4.5.2/d9/d88/group __cudaarithm__ arithm.html#ga42efe211d7a43bbc922da044c4f17130)) state this api is found in ’ #include \<opencv2/cudaarithm.hpp\>.

The \<opencv2/cudaarithm.hpp\> is missing from the CUDA built release and debug for Windows 10 libraries.

Help?

---

<div class="post-metadata">

**Author:** ![kbarni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/kbarni/32/26_2.png) [@kbarni](https://forum.opencv.org/u/kbarni)\
**Post date:** [May 20, 2021, 7:00am UTC](https://forum.opencv.org/t/missing-cudaarithm-hpp-in-4-5-2-build/3427/2 "2021-05-20T07:00:31Z")

</div>

Cudaarithm (and most other CUDA modules) are part of the opencv\_contrib repo. Enabling CUDA support while building OpenCV won’t enable this automatically.

You need to clone the [GitHub - opencv/opencv\_contrib: Repository for OpenCV's extra modules](https://github.com/opencv/opencv_contrib) repo and enable it in `OPENCV_EXTRA_MODULES_PATH` option.

---

<div class="post-metadata">

**Author:** ![jdaly](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jdaly/32/554_2.png) [@jdaly](https://forum.opencv.org/u/jdaly)\
**Post date:** [May 20, 2021, 9:03pm UTC](https://forum.opencv.org/t/missing-cudaarithm-hpp-in-4-5-2-build/3427/3 "2021-05-20T21:03:40Z")

</div>

Actually, it turned out that after building from sources (and including the contrib modules), I discovered the need to run the ‘INSTALL’ target to collect up all the pieces-n-parts into a usable entity.

I may have missed something in the documentation regarding the installation of the library, which on windows, simply constructs a directory with all the necessary binaries, includes, etc.

Once I got those details ironed out, it all works as expected.

Thanks!

Thanks for the quick response.
