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
286c6b49
Commit
286c6b49
authored
Jun 16, 2014
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenCV Manager hardware detector workaround for not detected ARM SoC support.
parent
0b4eb6a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
+28
-13
HardwareDetector.cpp
...d/service/engine/jni/BinderComponent/HardwareDetector.cpp
+28
-13
No files found.
platforms/android/service/engine/jni/BinderComponent/HardwareDetector.cpp
View file @
286c6b49
...
...
@@ -39,44 +39,57 @@ int GetCpuID()
#else
result
=
ARCH_UNKNOWN
;
#endif
#el
se
#el
if defined(__arm__)
LOGD
(
"Using ARM HW detector"
);
it
=
cpu_info
.
find
(
"Processor"
);
if
(
cpu_info
.
end
()
!=
it
)
{
size_t
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_
X86
_STR
);
size_t
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_
ARMV7
_STR
);
if
(
string
::
npos
!=
proc_name_pos
)
{
result
|=
ARCH_ARMv7
;
}
else
{
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_ARMV
7
_STR
);
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_ARMV
6
_STR
);
if
(
string
::
npos
!=
proc_name_pos
)
{
result
|=
ARCH_ARMv
7
;
result
|=
ARCH_ARMv
6
;
}
else
{
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_ARMV
6
_STR
);
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_ARMV
5
_STR
);
if
(
string
::
npos
!=
proc_name_pos
)
{
result
|=
ARCH_ARMv
6
;
result
|=
ARCH_ARMv
5
;
}
else
{
proc_name_pos
=
it
->
second
.
find
(
CPU_INFO_ARCH_ARMV5_STR
);
if
(
string
::
npos
!=
proc_name_pos
)
{
result
|=
ARCH_ARMv5
;
}
// Treat the arch of current binary. Google Play checks
// device hardware before installation. Let's assume that
// if the binary works, it's compatible with current hardware
#if defined __ARM_ARCH_7A__
result
|=
ARCH_ARMv7
;
result
|=
FEATURES_HAS_VFPv3d16
;
#else
result
|=
ARCH_ARMv5
;
#endif
}
}
}
}
else
{
return
ARCH_UNKNOWN
;
// Treat the arch of current binary. Google Play checks
// device hardware before installation. Let's assume that
// if the binary works, it's compatible with current hardware
#if defined __ARM_ARCH_7A__
result
|=
ARCH_ARMv7
;
result
|=
FEATURES_HAS_VFPv3
;
#else
result
|=
ARCH_ARMv5
;
#endif
}
it
=
cpu_info
.
find
(
"Features"
);
...
...
@@ -107,7 +120,9 @@ int GetCpuID()
}
}
}
#endif
#else
result
=
ARCH_UNKNOWN
;
#endif
return
result
;
}
...
...
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