Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
f37f2c0f
Commit
f37f2c0f
authored
Aug 10, 2014
by
biagio montesano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected windows warning
parent
1c246d47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
bitops.hpp
...ine_descriptor/include/opencv2/line_descriptor/bitops.hpp
+9
-10
No files found.
modules/line_descriptor/include/opencv2/line_descriptor/bitops.hpp
View file @
f37f2c0f
...
...
@@ -71,20 +71,20 @@ inline int match( UINT8*P, UINT8*Q, int codelb )
return
popcnt
(
*
(
UINT32
*
)
P
^
*
(
UINT32
*
)
Q
);
break
;
case
8
:
// 64 bit
return
(
int
)
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
);
return
(
int
)
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
);
break
;
case
16
:
// 128 bit
return
(
int
)
(
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
1
]
^
(
(
UINT64
*
)
Q
)[
1
]
)
);
return
(
int
)
(
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
1
]
^
(
(
UINT64
*
)
Q
)[
1
]
)
);
break
;
case
32
:
// 256 bit
return
(
int
)
(
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
1
]
^
(
(
UINT64
*
)
Q
)[
1
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
2
]
^
(
(
UINT64
*
)
Q
)[
2
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
3
]
^
(
(
UINT64
*
)
Q
)[
3
]
));
return
(
int
)
(
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
1
]
^
(
(
UINT64
*
)
Q
)[
1
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
2
]
^
(
(
UINT64
*
)
Q
)[
2
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
3
]
^
(
(
UINT64
*
)
Q
)[
3
]
)
);
break
;
case
64
:
// 512 bit
return
(
int
)
(
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
1
]
^
(
(
UINT64
*
)
Q
)[
1
]
)
return
(
int
)
(
popcntll
(
(
(
UINT64
*
)
P
)[
0
]
^
(
(
UINT64
*
)
Q
)[
0
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
1
]
^
(
(
UINT64
*
)
Q
)[
1
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
2
]
^
(
(
UINT64
*
)
Q
)[
2
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
3
]
^
(
(
UINT64
*
)
Q
)[
3
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
4
]
^
(
(
UINT64
*
)
Q
)[
4
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
5
]
^
(
(
UINT64
*
)
Q
)[
5
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
6
]
^
(
(
UINT64
*
)
Q
)[
6
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
7
]
^
(
(
UINT64
*
)
Q
)[
7
]
));
+
popcntll
(
(
(
UINT64
*
)
P
)[
6
]
^
(
(
UINT64
*
)
Q
)[
6
]
)
+
popcntll
(
(
(
UINT64
*
)
P
)[
7
]
^
(
(
UINT64
*
)
Q
)[
7
]
)
);
break
;
default:
int
output
=
0
;
...
...
@@ -94,7 +94,6 @@ inline int match( UINT8*P, UINT8*Q, int codelb )
break
;
}
}
/* splitting function (b <= 64) */
...
...
@@ -132,7 +131,7 @@ inline UINT64 next_set_of_n_elements( UINT64 x )
{
UINT64
smallest
,
ripple
,
new_smallest
;
smallest
=
x
&
-
(
signed
)
x
;
smallest
=
x
&
-
(
signed
)
x
;
ripple
=
x
+
smallest
;
new_smallest
=
x
^
ripple
;
new_smallest
=
new_smallest
/
smallest
;
...
...
@@ -145,8 +144,8 @@ inline void print_code( UINT64 tmp, int b )
{
for
(
long
long
int
j
=
(
b
-
1
);
j
>=
0
;
j
--
)
{
printf
(
"%llu"
,
(
long
long
int
)
tmp
/
(
1
<<
j
)
);
tmp
=
tmp
-
(
tmp
/
(
1
<<
j
)
)
*
(
1
<<
j
);
printf
(
"%llu"
,
(
long
long
int
)
tmp
/
(
UINT64
)
(
1
<<
j
)
);
tmp
=
tmp
-
(
tmp
/
(
UINT64
)
(
1
<<
j
)
)
*
(
UINT64
)
(
1
<<
j
);
}
printf
(
"
\n
"
);
...
...
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