steinwurf / cpuid

C++ library for detecting CPU capabilities
https://cpuid.steinwurf.com
Other
105 stars 21 forks source link

Suggestion to change detection of NEON feature #21

Closed ilya-lavrenov closed 9 years ago

ilya-lavrenov commented 9 years ago

It's better to use the following technique instead of reading /proc/... file. See for details https://github.com/Itseez/opencv/pull/3568/files

ilya-lavrenov commented 9 years ago

@mortenvp, @petya2164, @nestorjhernandezm, please, see

mortenvp commented 9 years ago

@ilya-lavrenov I agree that looks cleaner. Do you know if it works on Android?

ilya-lavrenov commented 9 years ago

looks like - no :(

mortenvp commented 9 years ago

Ok, that's a shame - then we'll probably stick with the current version - but thanks for the suggestion. Will keep it in mind for the future.

mortenvp commented 9 years ago

Our current solution is not ideal, when you say Apple do you mean iOS (we handle that here https://github.com/steinwurf/cpuid/blob/master/src/cpuid/init_ios_clang_arm.hpp) or OSX (does that run on ARM)?

petya2164 commented 9 years ago

Our current solution works fine for iOS, because the iOS toolchain guarantees that you have NEON if you are targeting a specific iOS version (I think that is iOS 5+). All iOS devices running that iOS version are required to support NEON. Fortunately, iOS is less diverse than Android ;) @ilya-lavrenov Do you have a specific case where the current solution does not work?

nestorjhernandezm commented 9 years ago

Hi @ilya-lavrenov , thanks for this and the previous observation. For this case, NEON is supported for ARMv7 and higher which will be the case by newer devices, which is complemented by Péter's description. Do you have some examples where it does not work?

mortenvp commented 9 years ago

Hi @ilya-lavrenov I will close the issue - fell free to come with additional suggestions/comments. We appreciate it!