From 3c58c3895812c321e00b9f85488598947e7c0195 Mon Sep 17 00:00:00 2001 From: "Eric J. Korpela" Date: Wed, 8 Apr 2009 00:50:39 +0000 Subject: [PATCH] - API: Added new function boinc_set_credit_claim() for use by projects that want to grant approximately fixed credits, but don't want to express them in terms of FPOPS and IOPS. This API just calls boinc_ops_cumulative(N*8.64000e+11,0). CPU intensive projects that use this API should still use the tools/calculate_credit_multiplier script in order to adjust their credit claims as processing times vary. svn path=/trunk/boinc/; revision=17743 --- api/boinc_api.cpp | 4 ++++ api/boinc_api.h | 1 + checkin_notes | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index ebbdd19782..2ecd541761 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -1230,6 +1230,10 @@ void boinc_ops_cumulative(double fp, double i) { intops_cumulative = i; } +void boinc_set_credit_claim(double credit) { + boinc_ops_cumulative(credit*8.64000e+11,0); +} + void boinc_need_network() { want_network = 1; have_network = 0; diff --git a/api/boinc_api.h b/api/boinc_api.h index 59ec48e873..e68f17e47d 100644 --- a/api/boinc_api.h +++ b/api/boinc_api.h @@ -91,6 +91,7 @@ extern void boinc_network_done(); extern int boinc_is_standalone(void); extern void boinc_ops_per_cpu_sec(double fp, double integer); extern void boinc_ops_cumulative(double fp, double integer); +extern void boinc_set_credit_claim(double credit); extern int boinc_receive_trickle_down(char* buf, int len); extern int boinc_init_options(BOINC_OPTIONS*); extern int boinc_get_status(BOINC_STATUS*); diff --git a/checkin_notes b/checkin_notes index e438180aaa..7b9df65ee0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3663,3 +3663,13 @@ David 7 Apr 2009 client_state.cpp cs_cmdline.cpp log_flags.cpp,h + +Eric 7 Apr 2009 + - API: Added new function boinc_set_credit_claim() for use by projects that + want to grant approximately fixed credits, but don't want to express them in + terms of FPOPS and IOPS. This API just calls + boinc_ops_cumulative(N*8.64000e+11,0). + + api/ + boinc_api.cpp,h +