Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d9d4e8df
Commit
d9d4e8df
authored
Nov 01, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bugs #2300 (Vector::dot) and #2467 (build with Xcode 4.5 with --stdlib=libc++)
parent
b5ecb1d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+5
-10
No files found.
modules/core/include/opencv2/core/operations.hpp
View file @
d9d4e8df
...
...
@@ -56,7 +56,10 @@
#define CV_XADD(addr,delta) _InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
#elif defined __GNUC__
#if __GNUC__*10 + __GNUC_MINOR__ >= 42
#if defined __clang__ && __clang_major__ >= 3 && defined __ATOMIC_SEQ_CST
#define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), (delta), __ATOMIC_SEQ_CST)
#elif __GNUC__*10 + __GNUC_MINOR__ >= 42
#if !defined WIN32 && (defined __i486__ || defined __i586__ || \
defined __i686__ || defined __MMX__ || defined __SSE__ || defined __ppc__)
...
...
@@ -2460,18 +2463,10 @@ dot(const Vector<_Tp>& v1, const Vector<_Tp>& v2)
assert
(
v1
.
size
()
==
v2
.
size
());
_Tw
s
=
0
;
if
(
n
>
0
)
{
const
_Tp
*
ptr1
=
&
v1
[
0
],
*
ptr2
=
&
v2
[
0
];
#if CV_ENABLE_UNROLLED
const
size_t
n2
=
(
n
>
4
)
?
n
:
4
;
for
(;
i
<=
n2
-
4
;
i
+=
4
)
s
+=
(
_Tw
)
ptr1
[
i
]
*
ptr2
[
i
]
+
(
_Tw
)
ptr1
[
i
+
1
]
*
ptr2
[
i
+
1
]
+
(
_Tw
)
ptr1
[
i
+
2
]
*
ptr2
[
i
+
2
]
+
(
_Tw
)
ptr1
[
i
+
3
]
*
ptr2
[
i
+
3
];
#endif
for
(
;
i
<
n
;
i
++
)
s
+=
(
_Tw
)
ptr1
[
i
]
*
ptr2
[
i
];
}
return
s
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment