Commit Graph

2262 Commits

Author SHA1 Message Date
HAN Liutong
4935b14539
Merge pull request #21012 from hanliutong:rvv_clang
Update RVV backend for using Clang.

* Update cmake file of clang.

* Modify the RVV optimization on DNN to adapt to clang.

* Modify intrin_rvv: Disable some existing types.

* Modify intrin_rvv: Reinterpret instead of load&cast.

* Modify intrin_rvv: Update load&store without cast.

* Modify intrin_rvv: Rename vfredsum to fredosum.

* Modify intrin_rvv: Rewrite Check all/any by using vpopc.

* Modify intrin_rvv: Use reinterpret instead of c-style casting.

* Remove all macros which is not used in v_reinterpret

* Rename vpopc to vcpop according to spec.
2021-12-03 15:13:24 +00:00
rogday
f044037ec5
Merge pull request #20733 from rogday:argmaxnd
Implement ArgMax and ArgMin

* add reduceArgMax and reduceArgMin

* fix review comments

* address review concerns
2021-11-28 16:17:46 +00:00
Alexander Alekhin
d228c5459d core: avoid using of 'check' identifier 2021-11-18 16:02:59 +00:00
Alexander Alekhin
827ff80c06 Merge pull request #20977 from JulieBar:remap_overflow 2021-11-11 22:06:16 +00:00
Alexander Alekhin
7842181b47 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-05 09:27:46 +00:00
Alexander Alekhin
2ce47fda88 Merge pull request #21011 from vrabaud:3.4 2021-11-05 09:25:50 +00:00
Vincent Rabaud
ffd010767f Only use fma functions when CV_FMA3 is set.
In practice, processors offering AVX2/AVX512 also FMA, that is why it got unnoticed.
2021-11-04 23:15:49 +01:00
Alexander Alekhin
7b57df02a7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-30 14:26:17 +00:00
Julie Bareeva
69d0bc8fd5 Added overflow handling during conversion from float to int for LinearFilter 2021-10-29 19:46:11 +03:00
Alexander Alekhin
74cc63ba2f Merge pull request #20969 from alalek:fix_msvc_clang_warning_noreturn 2021-10-28 23:00:49 +00:00
Alexander Alekhin
a49cda6523 core: eliminate Winvalid-noreturn in base.hpp 2021-10-28 21:33:20 +00:00
Alexander Alekhin
6bd143dd25 Merge pull request #20961 from alalek:fix_msvc_clang 2021-10-28 13:54:24 +00:00
Alexander Alekhin
75e2ba5af3 core(simd): fix compilation with MSVC-Clang 2021-10-28 11:25:00 +00:00
Alexander Alekhin
1726bb6c0d build(icc): fix nodiscard attribute handling 2021-10-28 05:52:22 +00:00
Alexander Alekhin
6a2077cbd8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-23 15:33:31 +00:00
Alexander Alekhin
c0c71d6b3a Merge pull request #20920 from alalek:hotfix_clang_abi 2021-10-21 11:35:58 +00:00
Alexander Alekhin
bac1c6d12f hotfix: repair Clang ABI 2021-10-21 09:36:25 +00:00
Alexander Alekhin
b1f422c1c5 Merge pull request #20894 from alalek:core_simd_int64_ctor_sse 2021-10-19 13:29:52 +00:00
Alexander Alekhin
b5fcb06a76 core(SIMD): update int64 SSE constructor 2021-10-18 18:59:40 +00:00
Sergiu Deitsch
f8f9f3c438 fixed AVX compile error
Some older compilers do not allow to pass a `const int` as an immediate. Use an unnamed enum instead.
2021-10-18 14:56:19 +02:00
Alexander Alekhin
31c40fa4cc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-15 13:35:03 +00:00
Alexander Alekhin
982503e9a8 core: ensure 'int' result from CV_POPCNT_U64(x) 2021-10-13 01:14:37 +00:00
Alexander Alekhin
39c3334147 Merge tag '4.5.4' 2021-10-10 00:22:46 +00:00
Alexander Alekhin
4223495e6c release: OpenCV 4.5.4 2021-10-09 15:48:26 +00:00
Alexander Alekhin
62252d157e Merge tag '3.4.16' 2021-10-08 19:05:00 +00:00
Alexander Alekhin
b1cf550123 release: OpenCV 3.4.16 2021-10-08 18:31:56 +00:00
Alexander Alekhin
e75387f029 core: fix compilation of copy ctors/assignment operators with GCC 4.x 2021-10-08 00:49:30 +00:00
Alexander Alekhin
eab2b9dc09 core: ensure is_trivially_copyable for simple types 2021-10-06 21:39:53 +00:00
Alexander Alekhin
3e6f27522b pre: OpenCV 4.5.4 (version++) 2021-10-04 22:35:47 +00:00
Alexander Alekhin
ebef84e9ea pre: OpenCV 3.4.16 (version++) 2021-10-04 20:47:07 +00:00
Vadim Levin
3c89a28a06
Merge pull request #20611 from VadimLevin:dev/vlevin/pure-python-modules
* feat: OpenCV extension with pure Python modules

* feat: cv2 is now a Python package instead of extension module

Python package cv2 now can handle both Python and C extension modules
properly without additional "subfolders" like "_extra_py_code".

* feat: can call native function from its reimplementation in Python
2021-09-18 10:02:55 +03:00
Alexander Alekhin
c3ac834526 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-09-11 21:27:26 +00:00
Alexander Alekhin
5578ad5e14 dnn(ocl): fix automatic globalsize adjusting
- if kernel code doesn't support that
2021-09-06 03:11:29 +00:00
Alexander Alekhin
5aa7435d25 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-09-02 15:24:04 +00:00
Alexander Alekhin
6625810d2a Merge pull request #20618 from VadimLevin:dev/vlevin/fix-vector-conversion 2021-09-01 10:52:37 +00:00
Vadim Levin
16b9514543 feat: update conversion logic for std::vector<T> in Python bindings
`PyObject*` to `std::vector<T>` conversion logic:
- If user passed Numpy Array
  - If array is planar and T is a primitive type (doesn't require
    constructor call) that matches with the element type of array, then
    copy element one by one with the respect of the step between array
    elements. If compiler is lucky (or brave enough) copy loop can be
    vectorized.
    For classes that require constructor calls this path is not
    possible, because we can't begin an object lifetime without hacks.
  - Otherwise fall-back to general case
- Otherwise - execute the general case:
  If PyObject* corresponds to Sequence protocol - iterate over the
  sequence elements and invoke the appropriate `pyopencv_to` function.

`std::vector<T>` to `PyObject*` conversion logic:
- If `std::vector<T>` is empty - return empty tuple.
- If `T` has a corresponding `Mat` `DataType` than return
  Numpy array instance of the matching `dtype` e.g.
  `std::vector<cv::Rect>` is returned as `np.ndarray` of shape `Nx4` and
  `dtype=int`.
  This branch helps to optimize further evaluations in user code.
- Otherwise - execute the general case:
  Construct a tuple of length N = `std::vector::size` and insert
  elements one by one.

Unnecessary functions were removed and code was rearranged to allow
compiler select the appropriate conversion function specialization.
2021-09-01 13:00:21 +03:00
Dale Phurrough
3995deaf76
fix opencv/opencv#20544 nodiscard for msvc/gcc
- includes workaround for preprocessor non-compliance
- enable attribute syntax checking in msvc
2021-08-28 20:22:47 +02:00
HAN Liutong
2f31763335 fix v_reduce_sum 2021-08-24 11:42:19 +08:00
Daniel Playfair Cal
4d63a89fa6
Merge pull request #20536 from hedgepigdaniel:fix/ocl-context-create-ownership
docs(core/ocl): clarify ownership of arguments passed into OpenCL related functions

* docs(core/ocl): clarify ownership in OpenCLExecutionContext::create

Although it is technically true that OpenCLExecutionContext::create
calls `clRetainContext` on its context argument, it is misleading
because it does not increase the reference count overall. Clarify that
the ownership of one reference of the passed context and device is
taken.

* docs(core/ocl): document ownership transfer in ocl::Device::fromHandle
2021-08-11 20:58:08 +03:00
Alexander Alekhin
424eaba4c5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-08-07 17:25:06 +00:00
Alexander Smorkalov
6a2e559222 Fixed memory access issue in v_rshr_pack_store intrinsic on RISC-V RVV. 2021-08-04 20:04:03 +03:00
Vadim Levin
531ea5b3a2 fix: convert arguments names that are keywords reserved by Python 2021-08-01 12:02:36 +03:00
Zhuo Zhang
bdd3930855
Fix typo in comment, OpenMP => TBB 2021-07-29 09:34:09 +08:00
ZhangYin
acc576658a
Merge pull request #20412 from joy2myself:rvv-0.10
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>
2021-07-23 17:08:43 +03:00
Alexander Alekhin
9103837228 Merge pull request #20278 from joy2myself:rvv-0.10 2021-07-09 22:42:29 +00:00
Francesco Petrogalli
b928ebdd53
Merge pull request #19985 from fpetrogalli:disable_threads
* [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>
2021-07-08 20:21:21 +00:00
Alexander Alekhin
aaad1791d9 Merge tag '4.5.3' 2021-07-05 21:48:40 +00:00
Alexander Alekhin
ad6e82942b release: OpenCV 4.5.3 2021-07-05 12:03:22 +00:00
Alexander Alekhin
9a9954a036 Merge tag '3.4.15' 2021-07-04 21:32:19 +00:00
Alexander Alekhin
591708903b release: OpenCV 3.4.15 2021-07-04 21:10:13 +00:00