Android compile fix

This commit is contained in:
David Anderson 2013-08-28 00:17:51 -07:00
parent 51e173d595
commit 44f0928a7a
2 changed files with 13 additions and 18 deletions

View File

@ -171,25 +171,24 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
bdp->error_str[0] = '\0';
host_info.clear_host_info();
// CMC here
#ifdef ANDROID
// check for vfp or neon process or no special fp process
// namespaces separate the different compilations of the same whetstone.cpp file
if ( strstr(gstate.host_info.p_features, " neon ") != NULL ) {
// have ARM neon FP capabilities
retval = android_neon::whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
}
else if ( strstr(gstate.host_info.p_features, " vfp ") != NULL ) {
// have ARM vfp FP capabilities
retval = android_vfp::whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
}
else { // just run normal test
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
// check for FP accelerator: VFP, Neon, or none;
// run the appropriate version of Whetstone
// (separated using namespaces)
//
if (strstr(gstate.host_info.p_features, " neon ")) {
// have ARM neon FP capabilities
retval = android_neon::whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
} else if (strstr(gstate.host_info.p_features, " vfp ")) {
// have ARM vfp FP capabilities
retval = android_vfp::whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
} else { // just run normal test
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
}
#else
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
#endif
// CMC end
if (retval) {
bdp->error = true;
sprintf(bdp->error_str, "FP benchmark ran only %f sec; ignoring", fp_time);

View File

@ -34,10 +34,6 @@
#endif
#include "util.h"
// CMC android
#ifdef ANDROID
#include "whetstone.h"
#endif
#include "cpu_benchmark.h"
#ifndef SPDP