diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2005-11-19 20:32:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2005-11-19 20:32:00 +0000 |
commit | 719228283628144df8fc9b6e01cce982548095c6 (patch) | |
tree | 9feb90f736a43430c64a0b2a9a46a34ed1c93314 /Carpet/CarpetLib/src/gdata.cc | |
parent | 770244b3441d73fc51de9db18ecdc8f8f4627cd8 (diff) |
CarpetLib: Rename some local variables
Rename some local variables in dh.cc and gdata.cc so that their names
don't clash with global variables.
darcs-hash:20051119203248-dae7b-c371dfbf1e43fbd95577a17201d7cee45e5c8400.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gdata.cc')
-rw-r--r-- | Carpet/CarpetLib/src/gdata.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc index c3635f266..fc737826d 100644 --- a/Carpet/CarpetLib/src/gdata.cc +++ b/Carpet/CarpetLib/src/gdata.cc @@ -196,7 +196,7 @@ void gdata::copy_from_post (comm_state& state, // copy data into send buffer wtime_copyfrom_sendinner_copy.start(); const ibbox& ext = src->extent(); - ivect shape = ext.shape() / ext.stride(); + ivect myshape = ext.shape() / ext.stride(); ivect items = (box.upper() - box.lower()) / box.stride() + 1; ivect offs = (box.lower() - ext.lower()) / ext.stride(); char* send_buffer = (char*) b->pointer(); @@ -204,7 +204,7 @@ void gdata::copy_from_post (comm_state& state, for (int k = 0; k < items[2]; k++) { for (int j = 0; j < items[1]; j++) { - int i = offs[0] + shape[0]*((j+offs[1]) + shape[1]*(k+offs[2])); + int i = offs[0] + myshape[0]*((j+offs[1]) + myshape[1]*(k+offs[2])); memcpy (send_buffer, ((char*) src->storage()) + datatypesize*i, datatypesize * items[0]); send_buffer += datatypesize * items[0]; @@ -246,7 +246,7 @@ void gdata::copy_from_wait (comm_state& state, if (bufs == &state.recvbufs) { wtime_copyfrom_recvwaitinner_copy.start(); const ibbox& ext = extent(); - ivect shape = ext.shape() / ext.stride(); + ivect myshape = ext.shape() / ext.stride(); ivect items = (box.upper() - box.lower()) / box.stride() + 1; ivect offs = (box.lower() - ext.lower()) / ext.stride(); const char* recv_buffer = (const char*) b->pointer(); @@ -254,7 +254,7 @@ void gdata::copy_from_wait (comm_state& state, for (int k = 0; k < items[2]; k++) { for (int j = 0; j < items[1]; j++) { - int i = offs[0] + shape[0]*((j+offs[1]) + shape[1]*(k+offs[2])); + int i = offs[0] + myshape[0]*((j+offs[1]) + myshape[1]*(k+offs[2])); memcpy (((char*) storage()) + datatypesize*i, recv_buffer, datatypesize * items[0]); recv_buffer += datatypesize * items[0]; @@ -283,7 +283,7 @@ void gdata::copy_into_sendbuffer (comm_state& state, } else { // copy to remote processor assert (src->_has_storage); - int& datatypesize = state.typebufs.at(c_datatype()).datatypesize; + int datatypesize = state.typebufs.at(c_datatype()).datatypesize; comm_state::procbufdesc& procbuf = state.typebufs.at(c_datatype()).procbufs.at(proc()); assert (procbuf.sendbuf - procbuf.sendbufbase <= @@ -294,14 +294,14 @@ void gdata::copy_into_sendbuffer (comm_state& state, // copy this processor's data into the send buffer const ibbox& ext = src->extent(); - ivect shape = ext.shape() / ext.stride(); + ivect myshape = ext.shape() / ext.stride(); ivect items = (box.upper() - box.lower()) / box.stride() + 1; ivect offs = (box.lower() - ext.lower()) / ext.stride(); assert (dim == 3); for (int k = 0; k < items[2]; k++) { for (int j = 0; j < items[1]; j++) { - int i = offs[0] + shape[0]*((j+offs[1]) + shape[1]*(k+offs[2])); + int i = offs[0] + myshape[0]*((j+offs[1]) + myshape[1]*(k+offs[2])); memcpy (procbuf.sendbuf, ((const char*) src->storage()) + datatypesize*i, datatypesize * items[0]); @@ -333,14 +333,14 @@ void gdata::copy_from_recvbuffer (comm_state& state, // copy this processor's data from the recv buffer const ibbox& ext = extent(); - ivect shape = ext.shape() / ext.stride(); + ivect myshape = ext.shape() / ext.stride(); ivect items = (box.upper() - box.lower()) / box.stride() + 1; ivect offs = (box.lower() - ext.lower()) / ext.stride(); assert (dim == 3); for (int k = 0; k < items[2]; k++) { for (int j = 0; j < items[1]; j++) { - int i = offs[0] + shape[0]*((j+offs[1]) + shape[1]*(k+offs[2])); + int i = offs[0] + myshape[0]*((j+offs[1]) + myshape[1]*(k+offs[2])); memcpy (((char*) storage()) + datatypesize*i, procbuf.recvbuf, datatypesize * items[0]); procbuf.recvbuf += datatypesize * items[0]; |