1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #25832 from chachoi-world:4.x

Add support for QNX #25832

Build and test instruction for QNX:
https://github.com/chachoi-world/qnx-ports/blob/main/opencv/README.md

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
James Choi
2024-08-06 13:25:39 -04:00
committed by GitHub
parent d8bcc2c85d
commit 582a7f32d5
9 changed files with 68 additions and 12 deletions
+7 -1
View File
@@ -72,6 +72,10 @@
#endif
#endif
#if defined (__QNX__)
#include <sys/syspage.h>
#endif
#ifndef OPENCV_DISABLE_THREAD_SUPPORT
#include <thread>
#endif
@@ -1011,7 +1015,9 @@ int getNumberOfCPUs_()
static unsigned cpu_count_sysconf = (unsigned)sysconf( _SC_NPROCESSORS_ONLN );
ncpus = minNonZero(ncpus, cpu_count_sysconf);
#elif defined (__QNX__)
static unsigned cpu_count_sysconf = _syspage_ptr->num_cpu;
ncpus = minNonZero(ncpus, cpu_count_sysconf);
#endif
return ncpus != 0 ? ncpus : 1;