Getting hardware floating point with android NDK

Posted by Goz on Stack Overflow See other posts from Stack Overflow or by Goz
Published on 2010-06-09T10:21:14Z Indexed on 2010/06/09 10:22 UTC
Read the original article Hit count: 362

Hi All,

I've begun playing with the android NDK. One of the things I've just learnt is about creating an application.mk file to specify the armv7 abi.

I'm building the san-angeles example with the following parameters.

APP_MODULES      := sanangeles
APP_PROJECT_PATH := $(call my-dir)/../
APP_OPTIM        := release
APP_ABI          := armeabi-v7a

However this seems to run at exactly the same speed as it did before (ie badly). Am I just GL limited and not CPU limited or is something wrong here?

I have noticed when I compile that I get the following command line options emitted:

-march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb 

The thing that worries me there is the "softfp". There IS mention of the v7 abi, the VFP fpu stuff and I'm guessing the "thumb" refers to the "thumb-2" instructions (Though I don't know what exactly these are). However that "softfp" does concern me. Shouldn't it be "hardfp"?

Anyone got any ideas on these questions? I think I'm probably about ready to start implementing some GL ES 2.0 code for my HTC Desire but I'd like to make sure I'm getting the best possible speed out of it :)

Cheers in advance!

© Stack Overflow or respective owner

Related posts about c++

Related posts about android