Client (Android): move whetstone.h into cpu_benchmark.h

This commit is contained in:
David Anderson 2013-08-27 21:25:04 -07:00
parent 98123560e2
commit 51e173d595
3 changed files with 21 additions and 8 deletions

View File

@ -98,10 +98,10 @@ boinc_clientdir = $(bindir)
if OS_ARM_LINUX if OS_ARM_LINUX
boinc_client_LDADD += libwhetneon.a libwhetvfp.a boinc_client_LDADD += libwhetneon.a libwhetvfp.a
noinst_LIBRARIES = libwhetneon.a libwhetvfp.a noinst_LIBRARIES = libwhetneon.a libwhetvfp.a
libwhetneon_a_SOURCES = whetstone.cpp whetstone.h libwhetneon_a_SOURCES = whetstone.cpp
libwhetneon_a_CXXFLAGS = $(boinc_client_CXXFLAGS) -DANDROID_NEON -mfloat-abi=softfp -mfpu=neon libwhetneon_a_CXXFLAGS = $(boinc_client_CXXFLAGS) -DANDROID_NEON -mfloat-abi=softfp -mfpu=neon
libwhetvfp_a_SOURCES = whetstone.cpp whetstone.h libwhetvfp_a_SOURCES = whetstone.cpp
libwhetvfp_a_CXXFLAGS = $(boinc_client_CXXFLAGS) -DANDROID_VFP -mfloat-abi=softfp -mfpu=vfp libwhetvfp_a_CXXFLAGS = $(boinc_client_CXXFLAGS) -DANDROID_VFP -mfloat-abi=softfp -mfpu=vfp
endif endif

View File

@ -28,3 +28,22 @@ extern int dhrystone(double& vax_mips, double& loops, double& cpu_time, double m
extern int whetstone(double& flops, double& cpu_time, double min_cpu_time); extern int whetstone(double& flops, double& cpu_time, double min_cpu_time);
extern void benchmark_wait_to_start(int which); extern void benchmark_wait_to_start(int which);
extern bool benchmark_time_to_stop(int which); extern bool benchmark_time_to_stop(int which);
// separate different compilations of whetstone.cpp which will utilize
// various ARM fp features ie neon, vfp, or "normal"
#ifdef ANDROID
#ifdef ANDROID_NEON
// add CXXFLAGS/CFLAGS for gcc: -DANDROID_NEON -mfloat-abi=softfp -mfpu=neon
#include <arm_neon.h>
#endif // ANDROID_NEON
namespace android_neon {
int whetstone(double& flops, double& cpu_time, double min_cpu_time);
}
namespace android_vfp {
int whetstone(double& flops, double& cpu_time, double min_cpu_time);
}
#endif // ANDROID

View File

@ -46,7 +46,6 @@
#endif #endif
#include <signal.h> #include <signal.h>
#if HAVE_SYS_SIGNAL_H #if HAVE_SYS_SIGNAL_H
#include <sys/signal.h>
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -61,11 +60,6 @@
#include "util.h" #include "util.h"
#include "cpu_benchmark.h" #include "cpu_benchmark.h"
// CMC HERE - header file for whetstone namespaces (neon & vfp)
#ifdef ANDROID
#include "whetstone.h"
#endif
#include "client_msgs.h" #include "client_msgs.h"
#include "log_flags.h" #include "log_flags.h"
#include "client_state.h" #include "client_state.h"