Sanchayan Maity
2fcc51c2c1
While at it also add the libpthread static library amd m5op_x86 for matrix multiplication test code as well. Note that the splash2 benchmark code does not comply with gem5 coding guidelines. Academic guys never seem to follow 80 columns and no whitespace guideline :(.
80 lines
2.7 KiB
C
80 lines
2.7 KiB
C
/*************************************************************************/
|
|
/* */
|
|
/* Copyright (c) 1994 Stanford University */
|
|
/* */
|
|
/* All rights reserved. */
|
|
/* */
|
|
/* Permission is given to use, copy, and modify this software for any */
|
|
/* non-commercial purpose as long as this copyright notice is not */
|
|
/* removed. All other uses, including redistribution in whole or in */
|
|
/* part, are forbidden without prior written permission. */
|
|
/* */
|
|
/* This software is provided with absolutely no warranty and no */
|
|
/* support. */
|
|
/* */
|
|
/*************************************************************************/
|
|
|
|
/* This file contains the declaration of the GlobalMemory
|
|
structure and the maximum number of molecules allowed
|
|
by the program. */
|
|
|
|
struct GlobalMemory {
|
|
LOCKDEC(IOLock)
|
|
LOCKDEC(IndexLock)
|
|
LOCKDEC(IntrafVirLock)
|
|
LOCKDEC(InterfVirLock)
|
|
LOCKDEC(KinetiSumLock)
|
|
LOCKDEC(PotengSumLock)
|
|
BARDEC(start)
|
|
BARDEC(InterfBar)
|
|
BARDEC(PotengBar)
|
|
long Index;
|
|
double VIR;
|
|
double SUM[3];
|
|
double POTA, POTR, POTRF;
|
|
unsigned long computestart,computeend;
|
|
unsigned long trackstart, trackend, tracktime;
|
|
unsigned long intrastart, intraend, intratime;
|
|
unsigned long interstart, interend, intertime;
|
|
};
|
|
|
|
extern struct GlobalMemory *gl;
|
|
|
|
/* bndry.C */
|
|
void BNDRY(long ProcID);
|
|
|
|
/* cnstnt.C */
|
|
void CNSTNT(long N, double *C);
|
|
|
|
/* cshift.C */
|
|
void CSHIFT(double *XA, double *XB, double XMA, double XMB, double *XL, double BOXH, double BOXL);
|
|
|
|
/* initia.C */
|
|
void INITIA(void);
|
|
double xrand(double xl, double xh);
|
|
|
|
/* interf.C */
|
|
void INTERF(long DEST, double *VIR, long ProcID);
|
|
void UPDATE_FORCES(struct link *link_ptr, long DEST, double *XL, double *YL, double *ZL, double *FF);
|
|
|
|
/* intraf.C */
|
|
void INTRAF(double *VIR, long ProcID);
|
|
|
|
/* kineti.C */
|
|
void KINETI(double *SUM, double HMAS, double OMAS, long ProcID);
|
|
|
|
/* mdmain.C */
|
|
double MDMAIN(long NSTEP, long NPRINT, long NSAVE, long NORD1, long ProcID);
|
|
|
|
/* poteng.C */
|
|
void POTENG(double *POTA, double *POTR, double *PTRF, long ProcID);
|
|
|
|
/* predcor.C */
|
|
void PREDIC(double *C, long NOR1, long ProcID);
|
|
void CORREC(double *PCC, long NOR1, long ProcID);
|
|
|
|
/* syscons.C */
|
|
void SYSCNS(void);
|
|
|
|
/* water.C */
|
|
void WorkStart(void);
|