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
68aec288
Commit
68aec288
authored
Apr 18, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Calc_Hist under 32-bit gcc
parent
423b721d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
types_c.h
modules/core/include/opencv2/core/types_c.h
+11
-8
rand.cpp
modules/core/src/rand.cpp
+0
-1
No files found.
modules/core/include/opencv2/core/types_c.h
View file @
68aec288
...
...
@@ -317,16 +317,19 @@ CV_INLINE int cvRound( double value )
#endif
}
#if defined __SSE2__ || (defined _M_IX86_FP && 2 == _M_IX86_FP)
#include "emmintrin.h"
#endif
CV_INLINE
int
cvFloor
(
double
value
)
{
#ifdef __GNUC__
int
i
=
(
int
)
value
;
return
i
-
(
i
>
value
);
#elif defined _MSC_VER && defined _M_X64
#if defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__)
__m128d
t
=
_mm_set_sd
(
value
);
int
i
=
_mm_cvtsd_si32
(
t
);
return
i
-
_mm_movemask_pd
(
_mm_cmplt_sd
(
t
,
_mm_cvtsi32_sd
(
t
,
i
)));
#elif defined __GNUC__
int
i
=
(
int
)
value
;
return
i
-
(
i
>
value
);
#else
int
i
=
cvRound
(
value
);
Cv32suf
diff
;
...
...
@@ -338,13 +341,13 @@ CV_INLINE int cvFloor( double value )
CV_INLINE
int
cvCeil
(
double
value
)
{
#ifdef __GNUC__
int
i
=
(
int
)
value
;
return
i
+
(
i
<
value
);
#elif defined _MSC_VER && defined _M_X64
#if defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__)
__m128d
t
=
_mm_set_sd
(
value
);
int
i
=
_mm_cvtsd_si32
(
t
);
return
i
+
_mm_movemask_pd
(
_mm_cmplt_sd
(
_mm_cvtsi32_sd
(
t
,
i
),
t
));
#elif defined __GNUC__
int
i
=
(
int
)
value
;
return
i
+
(
i
<
value
);
#else
int
i
=
cvRound
(
value
);
Cv32suf
diff
;
...
...
modules/core/src/rand.cpp
View file @
68aec288
...
...
@@ -240,7 +240,6 @@ static void randf_32f( float* arr, int len, uint64* state, const Vec2f* p, bool
for
(
;
i
<
len
;
i
++
)
{
temp
=
RNG_NEXT
(
temp
);
arr
[
i
]
=
(
int
)
temp
*
p
[
i
][
0
]
+
p
[
i
][
1
];
#if defined __SSE2__ || (defined _M_IX86_FP && 2 == _M_IX86_FP)
_mm_store_ss
(
arr
+
i
,
_mm_add_ss
(
_mm_mul_ss
(
_mm_set_ss
((
float
)(
int
)
temp
),
_mm_set_ss
(
p
[
i
][
0
])),
...
...
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