floating point - Is there a way to detect VFP/NEON/Thumb/... on iOS at runtime? -
so it's easy figure out kind of cpu ios device runs querying sysctlbyname("hw.cpusubtype", ...)
, there seems no obvious way figure out features cpu has (think vfp, neon, thumb, ...). can think of way this?
basically, need similar getauxval(at_hwcap)
on linux/android, returns bit mask of features supported cpu.
a few things note:
- the information must retrieved @ runtime os. no preprocessor defines.
- fat binaries not solution. do need know stuff in arm v6 binary.
thanks in advance!
sysctlbyname
has “hw.optional.neon”. not see name vfp, except “hw.optional.vfp_shortvector”, deprecated feature.
Comments
Post a Comment