bug fixes for universal intrinsics of RISC-V back-end
* Align universal intrinsic comparator behaviour with other platforms
Set all bits to one for return value of int and fp comparators.
* fix v_pack_triplets, v_pack_store and v_pack_u_store
* Remove redundant CV_DECL_ALIGNED statements
Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
AArch64 semihosting
* [ts] Disable filesystem support in the TS module.
Because of this change, all the tests loading data will file, but tat
least the core module can be tested with the following line:
opencv_test_core --gtest_filter=-"*Core_InputOutput*:*Core_globbing.accuracy*"
* [aarch64] Build OpenCV for AArch64 semihosting.
This patch provide a toolchain file that allows to build the library
for semihosting applications [1]. Minimal changes have been applied to
the code to be able to compile with a baremetal toolchain.
[1] https://developer.arm.com/documentation/100863/latest
The option `CV_SEMIHOSTING` is used to guard the bits in the code that
are specific to the target.
To build the code:
cmake ../opencv/ \
-DCMAKE_TOOLCHAIN_FILE=../opencv/platforms/semihosting/aarch64-semihosting.toolchain.cmake \
-DSEMIHOSTING_TOOLCHAIN_PATH=/path/to/baremetal-toolchain/bin/ \
-DBUILD_EXAMPLES=ON -GNinja
A barematel toolchain for targeting aarch64 semihosting can be found
at [2], under `aarch64-none-elf`.
[2] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
The folder `samples/semihosting` provides two example semihosting
applications.
The two binaries can be executed on the host platform with:
qemu-aarch64 ./bin/example_semihosting_histogram
qemu-aarch64 ./bin/example_semihosting_norm
Similarly, the test and perf executables of the modules can be run
with:
qemu-aarch64 ./bin/opecv_[test|perf]_<module>
Notice that filesystem support is disabled by the toolchain file,
hence some of the test that depend on filesystem support will fail.
* [semihosting] Remove blank like at the end of file. [NFC]
The spurious blankline was reported by
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31158.
* [semihosting] Make the raw pixel file generation OS independent.
Use the facilities provided by Cmake to generate the header file
instead of a shell script, so that the build doesn't fail on systems
that do not have a unix shell.
* [semihosting] Rename variable for semihosting compilation.
* [semihosting] Move the cmake configuration to a variable file.
* [semihosting] Make the guard macro private for the core module.
* [semihosting] Remove space. [NFC]
* [semihosting] Improve comment with information about semihosting. [NFC]
* [semihosting] Update license statement on top of sourvce file. [NFC]
* [semihosting] Replace BM_SUFFIX with SEMIHOSTING_SUFFIX. [NFC]
* [semihosting] Remove double space. [NFC]
* [semihosting] Add some text output to the sample applications.
* [semihosting] Remove duplicate entry in cmake configuration. [NFCI]
* [semihosting] Replace `long` with `int` in sample apps. [NFCI]
* [semihosting] Use `configure_file` to create the random pixels. [NFCI]
* [semihosting][bugfix] Fix name of cmakedefine variable.
* [semihosting][samples] Use CV_8UC1 for grayscale images. [NFCI]
* [semihosting] Add readme file.
* [semihosting] Remove blank like at the end of README. [NFC]
This fixes the failure at
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31272.
Improves support for Unix non-Linux systems, including QNX
* Fixes#20395. Improves support for Unix non-Linux systems. Focus on QNX Neutrino.
Signed-off-by: promero <promero@mathworks.com>
* Update system.cpp
* [build][option] Introduce `OPENCV_DISABLE_THREAD_SUPPORT` option.
The option forces the library to build without thread support.
* update handling of OPENCV_DISABLE_THREAD_SUPPORT
- reduce amount of #if conditions
* [to squash] cmake: apply mode vars in toolchains too
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
* Support cl_image conversion for CL_HALF_FLOAT (float16)
* Support cl_image conversion for additional channel orders:
CL_A, CL_INTENSITY, CL_LUMINANCE, CL_RG, CL_RA
* Comment on why cl_image conversion is unsupported for CL_RGB
* Predict optimal vector width for float16
* ocl::kernelToStr: support float16
* ocl::Device::halfFPConfig: drop artificial requirement for OpenCL
version >= 1.2. Even OpenCL 1.0 supports the underlying config
property, CL_DEVICE_HALF_FP_CONFIG.
* dumpOpenCLInformation: provide info on OpenCL half-float support
and preferred half-float vector width
* randu: support default range [-1.0, 1.0] for float16
* TestBase::warmup: support float16
There can be an int overflow.
cv::norm( InputArray _src, int normType, InputArray _mask ) is fine,
not cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask ).
Fix dynamic loading of clBLAS and clFFT (formerly, clAmdBlas and clAmdFft)
* Fix dynamic loading of clBLAS and clFFT
* Update filenames and function names for clBLAS (formerly, clAmdBlas)
* Update filenames and function names for clFFT (formerly, clAmdFft)
* Uncomment teardown of clFFT; tear down clFFT in same way as clBLAS
* Fix generators for clBLAS and clFFT headers
* Update generators to parse recent clBLAS and clFFT library headers
* Update generators to be compatible with Python 3
* Re-generate OpenCV's clBLAS and clFFT headers
* Update function calls to match names in newly generated headers
* Disable (and comment on) teardown code for clBLAS and clFFT
* Renaming *clamd* files
* Renaming *clamdblas* files to *clblas*
* Renaming *clamdfft* files to *clfft*
* Update generator for CL headers
* Update generator to be compatible with Python 3
Improve performance on Arm64
* Improve performance on Apple silicon
This patch will
- Enable dot product intrinsics for macOS arm64 builds
- Enable for macOS arm64 builds
- Improve HAL primitives
- reduction (sum, min, max, sad)
- signmask
- mul_expand
- check_any / check_all
Results on a M1 Macbook Pro
* Updates to #20011 based on feedback
- Removes Apple Silicon specific workarounds
- Makes #ifdef sections smaller for v_mul_expand cases
- Moves dot product optimization to compiler optimization check
- Adds 4x4 matrix transpose optimization
* Remove dotprod and fix v_transpose
Based on the latest, we've removed dotprod entirely and will revisit in a future PR.
Added explicit cats with v_transpose4x4()
This should resolve all opens with this PR
* Remove commented out lines
Remove two extraneous comments
* Add the support for riscv64 vector 0.7.1.
* fixed GCC warnings
* cleaned whitespaces
* Remove the worning by the use of internal API of compiler.
* Update the license header.
* removed trailing whitespaces
Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@me.com>
Co-authored-by: yulj <linjie.ylj@alibaba-inc.com>
Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
* Adding functions rbegin() and rend() functions to matrix class.
This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.
The functions are copy pated from their counterparts (even though they should probably call the counterparts but this gave me some troube).
They return iterators using std::reverse_iterators
Follow up of an open feature request:
https://github.com/opencv/opencv/issues/4641
* Fix rbegin() and rend() and provide tests for them
* Removing unnecessary whitespaces
* Adding rbegin and rend to Mat_ class with the right parameters so we don't need to repeat the template argument.
An instantiating cv::Mat_<int> for example can call it's rbegin() function and doesn't need rbegin<int>() with this convience addition.
Follows what is done for forward iterators
* static cast the vector size (return size_t) to an int (that is required for opencv mat constructor)
Co-authored-by: Stefan <stefan.gerl@tum.de>
Fixes for Swift troubles
* Remove NS_SWIFT_NAME override for Point, Rect, and Size due to Darwin namespace conflict
* Fix swift_type overrides in objc generator
* Add backwards compatibility Swift typealiases for Point, Rect, Size
* Add disable-swift build option to iOS/macOS builds
* Add import directive to swift source when building with disable-swift
Co-authored-by: Chris Ballinger <cballinger@rightpoint.com>
Also bring perf_imgproc CornerMinEigenVal accuracy requirements in line with
the test_imgproc accuracy requirements on that test and fix indentation on
the latter.
Partially addresses issue #9821