opencv/modules/core/src
Francesco Petrogalli d29c7e7871
Merge pull request #20392 from fpetrogalli:aarch64-semihosting
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.
2021-07-21 18:46:05 +03:00
..
cuda Merge pull request #19259 from nglee:dev_gpumatnd1 2021-02-05 20:30:37 +00:00
opencl Merge pull request #20203 from JoeHowse:clMath-patches 2021-06-07 20:24:27 +00:00
parallel core(parallel): fix plugins handling if no filesystem available 2021-03-18 23:05:12 +00:00
utils Merge pull request #19985 from fpetrogalli:disable_threads 2021-07-08 20:21:21 +00:00
algorithm.cpp
alloc.cpp add windows native aligned malloc + unit test case 2020-12-23 14:59:28 +01:00
arithm_ipp.hpp
arithm.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-01 09:54:57 +00:00
arithm.dispatch.cpp
arithm.simd.hpp Merge pull request #19778 from damonyu1989:master-riscv-0.7.1 2021-05-25 20:15:12 +03:00
array.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
async.cpp Merge pull request #19985 from fpetrogalli:disable_threads 2021-07-08 20:21:21 +00:00
batch_distance.cpp
bindings_utils.cpp Merge pull request #19668 from asmorkalov:as/filesystem_py 2021-03-04 16:17:57 +00:00
buffer_area.cpp core(buffer_area): handle 'OPENCV_ENABLE_MEMORY_SANITIZER=ON' case 2020-03-16 19:34:08 +03:00
bufferpool.impl.hpp
channels.cpp
check.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-02-26 20:09:03 +03:00
command_line_parser.cpp
conjugate_gradient.cpp
convert_c.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
convert_scale.dispatch.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
convert_scale.simd.hpp Fix spelling typos 2019-12-27 12:46:53 +00:00
convert.dispatch.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-17 21:05:34 +00:00
convert.hpp
convert.simd.hpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-17 21:56:26 +00:00
copy.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
count_non_zero.dispatch.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-04 18:26:58 +00:00
count_non_zero.simd.hpp core: vectorize countNonZero64f 2019-10-11 09:02:46 -05:00
cuda_gpu_mat_nd.cpp Merge pull request #19259 from nglee:dev_gpumatnd1 2021-02-05 20:30:37 +00:00
cuda_gpu_mat.cpp
cuda_host_mem.cpp
cuda_info.cpp
cuda_stream.cpp add cuda::Stream constructor with cuda flags 2021-01-28 16:14:01 +01:00
datastructs.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
directx.cpp DirectX: Support more types, including float16 2021-06-11 00:55:06 -03:00
directx.inc.hpp
downhill_simplex.cpp Fix spelling typos 2019-12-27 12:46:53 +00:00
dxt.cpp Merge pull request #20203 from JoeHowse:clMath-patches 2021-06-07 20:24:27 +00:00
gl_core_3_1.cpp
gl_core_3_1.hpp
glob.cpp [build][option] Build option to disable filesystem support. 2021-05-11 12:54:54 +00:00
hal_internal.cpp core: include version.hpp in cvdef.h, fix precomp.hpp usage 2021-02-16 11:10:45 +00:00
hal_internal.hpp core: include version.hpp in cvdef.h, fix precomp.hpp usage 2021-02-16 11:10:45 +00:00
hal_replacement.hpp
intel_gpu_gemm.inl.hpp Merge pull request #20203 from JoeHowse:clMath-patches 2021-06-07 20:24:27 +00:00
kmeans.cpp core(kmeans): bailout if can't select cluster center 2019-11-22 14:40:02 +00:00
lapack.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
lda.cpp
logger.cpp core(logger): avoid destruction of GlobalLoggingInitStruct object 2020-10-06 12:50:32 +00:00
lpsolver.cpp
lut.cpp
mathfuncs_core.dispatch.cpp core(IPP): disable some ippsMagnitude_32f calls 2021-03-31 13:38:57 +00:00
mathfuncs_core.simd.hpp Merge pull request #16236 from alalek:fix_core_simd_emulator 2020-01-10 21:31:02 +03:00
mathfuncs.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
mathfuncs.hpp
matmul.dispatch.cpp Merge pull request #20203 from JoeHowse:clMath-patches 2021-06-07 20:24:27 +00:00
matmul.simd.hpp [cv::transform] Enable CV_SIMD for the 16U case on AArch64. 2020-12-20 15:58:21 +00:00
matrix_c.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
matrix_decomp.cpp
matrix_expressions.cpp core(MatExpr): fix warning in case of e.s == (0, 0, 0, 0) 2020-05-01 07:29:57 +00:00
matrix_iterator.cpp core: include version.hpp in cvdef.h, fix precomp.hpp usage 2021-02-16 11:10:45 +00:00
matrix_operations.cpp add usageFlags to UMat static factories 2021-06-23 18:50:33 +02:00
matrix_sparse.cpp core: include version.hpp in cvdef.h, fix precomp.hpp usage 2021-02-16 11:10:45 +00:00
matrix_transform.cpp Merge pull request #18952 from terfendail:wui_doc 2021-03-30 16:18:03 +00:00
matrix_wrap.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
matrix.cpp noexcept def construct Mat, UMat, Mat_, MatSize, MatStep 2021-03-12 20:26:32 +00:00
mean.dispatch.cpp
mean.simd.hpp
merge.dispatch.cpp
merge.simd.hpp
minmax.cpp Merge pull request #16754 from alalek:issue_16752 2020-03-07 19:06:47 +00:00
norm.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-19 18:44:16 +00:00
ocl_disabled.impl.hpp Merge pull request #19755 from mikhail-nikolskiy:ffmpeg-umat 2021-05-14 16:48:50 +00:00
ocl.cpp OpenCL: core support for FP16, more channel orders 2021-06-30 14:14:37 -03:00
opengl.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-17 21:05:34 +00:00
out.cpp
ovx.cpp Fixed compilation on windows with openvx 2020-01-06 06:32:56 +03:00
parallel_impl.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-12 21:34:49 +00:00
parallel_impl.hpp
parallel.cpp Merge pull request #20392 from fpetrogalli:aarch64-semihosting 2021-07-21 18:46:05 +03:00
pca.cpp
persistence_base64_encoding.cpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence_base64_encoding.hpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence_impl.hpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence_json.cpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence_types.cpp
persistence_xml.cpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence_yml.cpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence.cpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
persistence.hpp port base64 encoding from 3.4 2021-07-08 10:42:44 +03:00
precomp.hpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-15 20:50:26 +00:00
rand.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
softfloat.cpp
split.dispatch.cpp
split.simd.hpp
stat_c.cpp core: rework code locality 2021-03-02 23:24:28 +00:00
stat.dispatch.cpp
stat.hpp
stat.simd.hpp
stl.cpp
sum.dispatch.cpp Merge pull request #16754 from alalek:issue_16752 2020-03-07 19:06:47 +00:00
sum.simd.hpp
system.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-16 10:35:42 +00:00
tables.cpp
trace.cpp core(trace): lazy quering for OPENCV_TRACE_LOCATION 2020-08-20 21:48:05 +00:00
types.cpp
umatrix.cpp Merge pull request #19985 from fpetrogalli:disable_threads 2021-07-08 20:21:21 +00:00
umatrix.hpp
va_intel.cpp Merge pull request #19755 from mikhail-nikolskiy:ffmpeg-umat 2021-05-14 16:48:50 +00:00
va_wrapper.impl.hpp core(libva): use dynamic loader 2021-02-19 10:32:59 +00:00