Commit 0469d1ac authored by snuverink_j's avatar snuverink_j
Browse files

remove keyword register, fixes issue #107

parent a207c5d2
......@@ -105,10 +105,10 @@ static CRCTYPE crctab[256] =
/* calculate the CRC for the given buffer of bytes, of length icnt */
CRCTYPE crc(void *icp, int icnt)
{
register int initcrc = -1;
register int cnt = icnt;
register CRCTYPE crc = (CRCTYPE)initcrc;
register unsigned char *cp = (unsigned char *)icp;
int initcrc = -1;
int cnt = icnt;
CRCTYPE crc = (CRCTYPE)initcrc;
unsigned char *cp = (unsigned char *)icp;
while (cnt--)
crc=((crc>>8)&0xffffff)^crctab[(crc&0xff)^*cp++];
......
......@@ -181,7 +181,7 @@ static inline _G_uint32_t LCG(_G_uint32_t x)
ACG::ACG(_G_uint32_t seed, int size)
{
register int l;
int l;
initialSeed = seed;
//
......@@ -217,7 +217,7 @@ ACG::ACG(_G_uint32_t seed, int size)
void
ACG::reset()
{
register _G_uint32_t u;
_G_uint32_t u;
if (initialSeed < SEED_TABLE_SIZE) {
u = seedTable[ initialSeed ];
......@@ -229,7 +229,7 @@ ACG::reset()
j = randomStateTable[ initialTableEntry ][ 0 ] - 1;
k = randomStateTable[ initialTableEntry ][ 1 ] - 1;
register int i;
int i;
for(i = 0; i < stateSize; i++) {
state[i] = u = LCG(u);
}
......@@ -270,7 +270,7 @@ ACG::asLong()
k = (k <= 0) ? (stateSize-1) : (k-1);
short int auxIndex = (result >> 24) & (auxSize - 1);
register _G_uint32_t auxACG = auxState[auxIndex];
_G_uint32_t auxACG = auxState[auxIndex];
auxState[auxIndex] = lcgRecurr = LCG(lcgRecurr);
//
......@@ -278,7 +278,7 @@ ACG::asLong()
// do not want to run off the end of the permutation table.
// This insures that we have always got four entries left.
//
register _G_uint32_t *perm = & randomPermutations[result & 0x3c];
_G_uint32_t *perm = & randomPermutations[result & 0x3c];
result = *(perm++) & auxACG;
result |= *(perm++) & ((auxACG << 24)
......
......@@ -181,7 +181,7 @@ static inline _G_uint32_t LCG(_G_uint32_t x)
ACG::ACG(_G_uint32_t seed, int size)
{
register int l;
int l;
initialSeed = seed;
//
......@@ -217,7 +217,7 @@ ACG::ACG(_G_uint32_t seed, int size)
void
ACG::reset()
{
register _G_uint32_t u;
_G_uint32_t u;
if (initialSeed < SEED_TABLE_SIZE) {
u = seedTable[ initialSeed ];
......@@ -229,7 +229,7 @@ ACG::reset()
j = randomStateTable[ initialTableEntry ][ 0 ] - 1;
k = randomStateTable[ initialTableEntry ][ 1 ] - 1;
register int i;
int i;
for(i = 0; i < stateSize; i++) {
state[i] = u = LCG(u);
}
......@@ -270,7 +270,7 @@ ACG::asLong()
k = (k <= 0) ? (stateSize-1) : (k-1);
short int auxIndex = (result >> 24) & (auxSize - 1);
register _G_uint32_t auxACG = auxState[auxIndex];
_G_uint32_t auxACG = auxState[auxIndex];
auxState[auxIndex] = lcgRecurr = LCG(lcgRecurr);
//
......@@ -278,7 +278,7 @@ ACG::asLong()
// do not want to run off the end of the permutation table.
// This insures that we have always got four entries left.
//
register _G_uint32_t *perm = & randomPermutations[result & 0x3c];
_G_uint32_t *perm = & randomPermutations[result & 0x3c];
result = *(perm++) & auxACG;
result |= *(perm++) & ((auxACG << 24)
......
......@@ -170,8 +170,8 @@ void ArbitraryDomain::compute(Vector_t hr){
IdxMap.clear();
CoordMap.clear();
register int id=0;
register int idx, idy, idz;
int id=0;
int idx, idy, idz;
for (idz = 0; idz < nr[2]; idz++) {
for (idy = 0; idy < nr[1]; idy++) {
for (idx = 0; idx < nr[0]; idx++) {
......@@ -381,7 +381,7 @@ void ArbitraryDomain::compute(Vector_t hr, NDIndex<3> localId){
// Build up index and coord map
IdxMap.clear();
CoordMap.clear();
register int index = startIdx - numGhostNodesLeft;
int index = startIdx - numGhostNodesLeft;
INFOMSG(level2 << "* Building up index and coordinate map..." << endl);
......
......@@ -85,8 +85,8 @@ void BoxCornerDomain::compute(Vector_t hr){
IntersectXDir.clear();
// build a index and coordinate map
register int idx = 0;
register int x, y, z;
int idx = 0;
int x, y, z;
for(x = 0; x < nr[0]; x++) {
for(y = 0; y < nr[1]; y++) {
for(z = 0; z < nr[2]; z++) {
......
......@@ -89,8 +89,8 @@ void EllipticDomain::compute(Vector_t hr){
IntersectXDir.clear();
// build a index and coordinate map
register int idx = 0;
register int x, y;
int idx = 0;
int x, y;
for(x = 0; x < nr[0]; x++) {
for(y = 0; y < nr[1]; y++) {
......@@ -166,8 +166,8 @@ void EllipticDomain::compute(Vector_t hr, NDIndex<3> localId){
IntersectXDir.clear();
// build a index and coordinate map
register int idx = 0;
register int x, y;
int idx = 0;
int x, y;
for(x = localId[0].first(); x<= localId[0].last(); x++) {
for(y = localId[1].first(); y <= localId[1].last(); y++) {
......
......@@ -36,13 +36,13 @@ void TaperDomain::compute(Vector_t hr) {
setHr(hr);
nxy_m = 0;
register int x, y, z;
register double pos, rb2, rs2;
int x, y, z;
double pos, rb2, rs2;
// clear previous coordinate maps
IdxMap.clear();
CoordMap.clear();
register int idx = 0;
int idx = 0;
// FIXME: since we counting idx++ loop order matters!
for(x = 0; x < nr[0]; x++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment