[Commits] [svn:einsteintoolkit] EOS_Omni/trunk/src/nuc_eos_cxx/ (Rev. 97)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Wed Mar 12 22:01:43 CDT 2014
User: rhaas
Date: 2014/03/12 10:01 PM
Modified:
/trunk/src/nuc_eos_cxx/
nuc_eos.hh, readtable.cc
Log:
EOS_Omni: declare global variables restrict
should help if we ever directly access them in an inner loop
From: Roland Haas <rhaas at tapir.caltech.edu>
File Changes:
Directory: /trunk/src/nuc_eos_cxx/
==================================
File [modified]: nuc_eos.hh
Delta lines: +7 -5
===================================================================
--- trunk/src/nuc_eos_cxx/nuc_eos.hh 2014-03-13 03:01:39 UTC (rev 96)
+++ trunk/src/nuc_eos_cxx/nuc_eos.hh 2014-03-13 03:01:42 UTC (rev 97)
@@ -1,6 +1,8 @@
#ifndef NUC_EOS_HH
#define NUC_EOS_HH
+#include "cctk.h"
+
#define HAVEGR 1
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
@@ -20,16 +22,16 @@
extern int ntemp;
extern int nye;
- extern double *alltables;
- extern double *epstable;
- extern double *logrho;
- extern double *logtemp;
+ extern double * restrict alltables;
+ extern double * restrict epstable;
+ extern double * restrict logrho;
+ extern double * restrict logtemp;
extern double temp0, temp1;
extern double dlintemp,dlintempi;
extern double drholintempi;
extern double dlintempyei;
extern double drholintempyei;
- extern double *yes;
+ extern double * restrict yes;
extern double energy_shift;
extern double dtemp, dtempi;
extern double drho, drhoi;
File [modified]: readtable.cc
Delta lines: +5 -5
===================================================================
--- trunk/src/nuc_eos_cxx/readtable.cc 2014-03-13 03:01:39 UTC (rev 96)
+++ trunk/src/nuc_eos_cxx/readtable.cc 2014-03-13 03:01:42 UTC (rev 97)
@@ -36,16 +36,16 @@
int ntemp;
int nye;
- double *alltables;
- double *epstable;
- double *logrho;
- double *logtemp;
+ double * restrict alltables;
+ double * restrict epstable;
+ double * restrict logrho;
+ double * restrict logtemp;
double temp0, temp1;
double dlintemp, dlintempi;
double drholintempi;
double dlintempyei;
double drholintempyei;
- double *yes;
+ double * restrict yes;
double energy_shift;
double dtemp, dtempi;
double drho, drhoi;
More information about the Commits
mailing list