mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4173
This commit is contained in:
parent
860ef1a1e6
commit
d7db5db2d8
|
@ -17212,5 +17212,7 @@ David 9 Sept 2004
|
|||
db/
|
||||
boinc.db.h
|
||||
sched/
|
||||
sample_bitwise_validator.C
|
||||
sample_trivial_validator.C
|
||||
validate_util.C,h
|
||||
validator.C
|
||||
|
|
|
@ -85,7 +85,7 @@ int init_result_read_file(RESULT const & result, void*& data)
|
|||
}
|
||||
|
||||
int check_pair_initialized_identical(
|
||||
RESULT const& /*r1*/, void* data1,
|
||||
RESULT & /*r1*/, void* data1,
|
||||
RESULT const& /*r2*/, void* data2,
|
||||
bool& match)
|
||||
{
|
||||
|
@ -103,7 +103,11 @@ int cleanup_result_string(RESULT const& /*result*/, void* data) {
|
|||
|
||||
// See if there's a strict majority under equality.
|
||||
//
|
||||
int check_set(vector<RESULT>& results, int& canonicalid, double& credit) {
|
||||
int check_set(
|
||||
vector<RESULT>& results, DB_WORKUNIT&, int& canonicalid, double& credit,
|
||||
bool& retry
|
||||
) {
|
||||
retry = false;
|
||||
return generic_check_set_majority(
|
||||
results, canonicalid, credit,
|
||||
init_result_read_file,
|
||||
|
@ -112,12 +116,16 @@ int check_set(vector<RESULT>& results, int& canonicalid, double& credit) {
|
|||
);
|
||||
}
|
||||
|
||||
int check_pair(RESULT const& r1, RESULT const& r2, bool& match) {
|
||||
return generic_check_pair(
|
||||
r1, r2, match,
|
||||
int check_pair(
|
||||
RESULT & r1, RESULT const& r2, bool& retry
|
||||
) {
|
||||
retry = false;
|
||||
int retval = generic_check_pair(
|
||||
r1, r2,
|
||||
init_result_read_file,
|
||||
check_pair_initialized_identical,
|
||||
cleanup_result_string
|
||||
);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ int init_result_trivial(RESULT const& result, void*& data) {
|
|||
}
|
||||
|
||||
int check_pair_initialized_trivial(
|
||||
RESULT const& r1, void* /*data1*/,
|
||||
RESULT & r1, void* /*data1*/,
|
||||
RESULT const& r2, void* /*data2*/
|
||||
) {
|
||||
bool match = (r1.cpu_time >= MIN_CPU_TIME && r2.cpu_time >= MIN_CPU_TIME);
|
||||
|
@ -43,7 +43,10 @@ int cleanup_result_trivial(RESULT const&, void*) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int check_set(vector<RESULT>& results, int& canonicalid, double& credit, bool& retry) {
|
||||
int check_set(
|
||||
vector<RESULT>& results, DB_WORKUNIT&, int& canonicalid, double& credit,
|
||||
bool& retry
|
||||
) {
|
||||
retry = false;
|
||||
return generic_check_set_majority(
|
||||
results, canonicalid, credit,
|
||||
|
@ -53,7 +56,8 @@ int check_set(vector<RESULT>& results, int& canonicalid, double& credit, bool& r
|
|||
);
|
||||
}
|
||||
|
||||
int check_pair(RESULT const& r1, RESULT const& r2, bool& match) {
|
||||
int check_pair(RESULT & r1, RESULT const& r2, bool& retry) {
|
||||
retry = false;
|
||||
return check_pair_initialized_trivial(
|
||||
r1, NULL,
|
||||
r2, NULL
|
||||
|
|
|
@ -201,7 +201,7 @@ int generic_check_set_majority(
|
|||
}
|
||||
|
||||
int generic_check_pair(
|
||||
RESULT const& r1, RESULT const& r2, bool& match,
|
||||
RESULT & r1, RESULT const& r2,
|
||||
init_result_f init_result_f,
|
||||
check_pair_with_data_f check_pair_with_data_f,
|
||||
cleanup_result_f cleanup_result_f
|
||||
|
@ -209,6 +209,7 @@ int generic_check_pair(
|
|||
void* data1;
|
||||
void* data2;
|
||||
int retval;
|
||||
bool match;
|
||||
|
||||
retval = init_result_f(r1, data1);
|
||||
if (retval) {
|
||||
|
@ -232,6 +233,7 @@ int generic_check_pair(
|
|||
}
|
||||
|
||||
retval = check_pair_with_data_f(r1, data1, r2, data2, match);
|
||||
r1.validate_state = match?VALIDATE_STATE_VALID:VALIDATE_STATE_INVALID;
|
||||
|
||||
cleanup_result_f(r1, data1);
|
||||
cleanup_result_f(r2, data2);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <string>
|
||||
|
||||
typedef int (*init_result_f)(RESULT const&, void*&);
|
||||
typedef int (*check_pair_with_data_f)(RESULT const&, void*, RESULT const&, void*, bool&);
|
||||
typedef int (*check_pair_with_data_f)(RESULT &, void*, RESULT const&, void*, bool&);
|
||||
typedef int (*cleanup_result_f)(RESULT const&, void*);
|
||||
extern int get_output_file_path(RESULT const& result, std::string& path);
|
||||
extern double median_mean_credit(std::vector<RESULT> const& results);
|
||||
|
@ -44,7 +44,7 @@ int generic_check_set_majority(
|
|||
cleanup_result_f cleanup_result_f);
|
||||
|
||||
int generic_check_pair(
|
||||
RESULT const& r1, RESULT const& r2, bool& match,
|
||||
RESULT & r1, RESULT const& r2,
|
||||
init_result_f init_result_f,
|
||||
check_pair_with_data_f check_pair_with_data_f,
|
||||
cleanup_result_f cleanup_result_f);
|
||||
|
|
|
@ -49,7 +49,7 @@ extern int check_set(
|
|||
bool& retry
|
||||
);
|
||||
extern int check_pair(
|
||||
RESULT const& new_result, RESULT const& canonical_result, bool& retry
|
||||
RESULT & new_result, RESULT const& canonical_result, bool& retry
|
||||
);
|
||||
|
||||
SCHED_CONFIG config;
|
||||
|
|
Loading…
Reference in New Issue