/***********************/
/* function prototypes */
/***********************/
-double randlc( double *X, double *A );
+double randlc( double *X, double *A );
void full_verify( global_data* gd );
int nprocs_total,
double t,
double mops,
- char *optype,
+ char *optype,
int passed_verification,
char *npbversion,
char *compiletime,
/************* portable random number generator ************/
/*****************************************************************/
-double randlc( double *X, double *A )
+double randlc( double *X, double *A )
{
static int KS=0;
- static double R23, R46, T23, T46;
- double T1, T2, T3, T4;
- double A1;
- double A2;
- double X1;
- double X2;
- double Z;
- int i, j;
+ static double R23, R46, T23, T46;
+ double T1, T2, T3, T4;
+ double A1;
+ double A2;
+ double X1;
+ double X2;
+ double Z;
+ int i, j;
if (KS == 0)
{
/************* C R E A T E _ S E Q ************/
/*****************************************************************/
-void create_seq( global_data* gd, double seed, double a )
+void create_seq( global_data* gd, double seed, double a )
{
- double x;
- int i, k;
+ double x;
+ int i, k;
k = MAX_KEY/4;
- for (i=0; i<NUM_KEYS; i++)
- {
- x = randlc(&seed, &a);
- x += randlc(&seed, &a);
- x += randlc(&seed, &a);
- x += randlc(&seed, &a);
+ for (i=0; i<NUM_KEYS; i++)
+ {
+ x = randlc(&seed, &a);
+ x += randlc(&seed, &a);
+ x += randlc(&seed, &a);
+ x += randlc(&seed, &a);
gd->key_array[i] = k*x;
- }
+ }
}
break;
case 'A':
if( i <= 2 )
- {
+ {
if( key_rank != gd->test_rank_array[i]+(iteration-1) )
failed = 1;
else
gd->passed_verification++;
- }
+ }
else
{
if( key_rank != gd->test_rank_array[i]-(iteration-1) )
break;
case 'B':
if( i == 1 || i == 2 || i == 4 )
- {
+ {
if( key_rank != gd->test_rank_array[i]+iteration )
failed = 1;
else
gd->passed_verification++;
- }
+ }
else
{
if( key_rank != gd->test_rank_array[i]-iteration )
break;
case 'C':
if( i <= 2 )
- {
+ {
if( key_rank != gd->test_rank_array[i]+iteration )
failed = 1;
else
gd->passed_verification++;
- }
+ }
else
{
if( key_rank != gd->test_rank_array[i]-iteration )
break;
case 'D':
if( i < 2 )
- {
+ {
if( key_rank != gd->test_rank_array[i]+iteration )
failed = 1;
else
gd->passed_verification++;
- }
+ }
else
{
if( key_rank != gd->test_rank_array[i]-iteration )