Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mjwilkins18/nas-mpl into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GarrettWeil committed Jul 29, 2022
2 parents 263009a + e1417ce commit abe8e24
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 90 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ ENV
*.o
tool_src/mlton
ffi-help.h
npbparams.h
Binary file removed NPB/NPB-C-3.0/CG/cg.o
Binary file not shown.
21 changes: 0 additions & 21 deletions NPB/NPB-C-3.0/CG/npbparams.h

This file was deleted.

Binary file removed NPB/NPB-C-3.0/EP/ep.o
Binary file not shown.
18 changes: 0 additions & 18 deletions NPB/NPB-C-3.0/EP/npbparams.h

This file was deleted.

1 change: 1 addition & 0 deletions NPB/NPB-C-3.0/IS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include ../sys/make.common

OBJS = is.o \
${COMMON}/c_print_results.o \
${COMMON}/c_${RAND}.o \
${COMMON}/c_timers.o \
${COMMON}/c_wtime.o

Expand Down
27 changes: 16 additions & 11 deletions NPB/NPB-C-3.0/IS/is.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
--------------------------------------------------------------------*/

#include "npb-C.h"
#include "npbparams.h"
#include <stdlib.h>
#include <stdio.h>
Expand Down Expand Up @@ -188,7 +189,7 @@ INT_TYPE test_index_array[TEST_ARRAY_SIZE],
/***********************/
/* function prototypes */
/***********************/
double randlc( double *X, double *A );
//double randlc( double *X, double *A );

void full_verify( void );

Expand Down Expand Up @@ -231,6 +232,10 @@ void full_verify( void );
/************* portable random number generator ************/
/*****************************************************************/



//MW eliminated-using the common randlc instead
/*
double randlc(X, A)
double *X;
double *A;
Expand Down Expand Up @@ -265,16 +270,16 @@ double *A;
KS = 1;
}
/* Break A into two parts such that A = 2^23 * A1 + A2 and set X = N. */
// Break A into two parts such that A = 2^23 * A1 + A2 and set X = N.
T1 = R23 * *A;
j = T1;
A1 = j;
A2 = *A - T23 * A1;
/* Break X into two parts such that X = 2^23 * X1 + X2, compute
Z = A1 * X2 + A2 * X1 (mod 2^23), and then
X = 2^23 * Z + A2 * X2 (mod 2^46). */
// Break X into two parts such that X = 2^23 * X1 + X2, compute
// Z = A1 * X2 + A2 * X1 (mod 2^23), and then
// X = 2^23 * Z + A2 * X2 (mod 2^46).
T1 = R23 * *X;
j = T1;
Expand All @@ -291,7 +296,7 @@ double *A;
*X = T3 - T46 * T4;
return(R46 * *X);
}

*/



Expand All @@ -308,10 +313,10 @@ void create_seq( double seed, double a )

for (i=0; i<NUM_KEYS; i++)
{
x = randlc(&seed, &a);
x += randlc(&seed, &a);
x += randlc(&seed, &a);
x += randlc(&seed, &a);
x = randlc(&seed, a);
x += randlc(&seed, a);
x += randlc(&seed, a);
x += randlc(&seed, a);

key_array[i] = k*x;
}
Expand Down Expand Up @@ -580,7 +585,7 @@ void rank( int iteration )
/************* M A I N ****************/
/*****************************************************************/

main( argc, argv )
int main( argc, argv )
int argc;
char **argv;
{
Expand Down
Binary file removed NPB/NPB-C-3.0/IS/is.o
Binary file not shown.
14 changes: 0 additions & 14 deletions NPB/NPB-C-3.0/IS/npbparams.h

This file was deleted.

Binary file removed NPB/NPB-C-3.0/MG/mg.o
Binary file not shown.
26 changes: 0 additions & 26 deletions NPB/NPB-C-3.0/MG/npbparams.h

This file was deleted.

0 comments on commit abe8e24

Please sign in to comment.