2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2003-05-15 17:10:26 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2005-01-20 23:22:22 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2003-05-15 17:10:26 +00:00
|
|
|
|
2013-04-03 00:23:37 +00:00
|
|
|
#define MAX_CPU_BENCHMARKS_SECONDS 300
|
|
|
|
#define CPU_BENCHMARKS_RUNNING 0
|
|
|
|
#define CPU_BENCHMARKS_COMPLETE 1
|
|
|
|
#define CPU_BENCHMARKS_NOT_RUNNING 2
|
|
|
|
#define CPU_BENCHMARKS_ERROR 3
|
2002-12-09 23:51:55 +00:00
|
|
|
|
2004-05-21 22:40:54 +00:00
|
|
|
#define BM_TYPE_FP 0
|
|
|
|
#define BM_TYPE_INT 1
|
|
|
|
|
2008-05-05 00:51:20 +00:00
|
|
|
extern int dhrystone(double& vax_mips, double& loops, double& cpu_time, double min_cpu_time);
|
|
|
|
extern int whetstone(double& flops, double& cpu_time, double min_cpu_time);
|
2004-05-21 22:40:54 +00:00
|
|
|
extern void benchmark_wait_to_start(int which);
|
2004-05-24 19:00:26 +00:00
|
|
|
extern bool benchmark_time_to_stop(int which);
|
2013-08-28 04:25:04 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
|
|