Changeset 60


Ignore:
Timestamp:
Nov 27, 2002 9:51:45 AM (17 years ago)
Author:
forrest
Message:

Ouch - I did not look at bcopy - then I thought it so simple a change I
did not do proper test. Apologies.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PresolveDoubleton.cpp

    r59 r60  
    113113
    114114    // move the column - 1:  copy the entries
    115     memcpy((void*)&hrow[kcsx], (void*)&hrow[newkcsx], hincol[icolx] * sizeof(int));
    116     memcpy((void*)&colels[kcsx], (void*)&colels[newkcsx], hincol[icolx] * sizeof(double));
     115    memcpy((void*)&hrow[newkcsx], (void*)&hrow[kcsx], hincol[icolx] * sizeof(int));
     116    memcpy((void*)&colels[newkcsx], (void*)&colels[kcsx], hincol[icolx] * sizeof(double));
    117117
    118118    // move the column - 2:  update the memory-order linked list
  • trunk/PresolveMatrix.cpp

    r59 r60  
    115115{
    116116  double *d1 = (double*)*end_mmapp;
    117   memcpy(d, d1, n*sizeof(double));
     117  memcpy(d1, d, n*sizeof(double));
    118118  *end_mmapp += ALIGN_DOUBLE(n*sizeof(double));
    119119  return (d1);
     
    122122{
    123123  int *d1 = (int*)*end_mmapp;
    124   memcpy(d, d1, n*sizeof(int));
     124  memcpy(d1, d, n*sizeof(int));
    125125  *end_mmapp += ALIGN_DOUBLE(n*sizeof(int));
    126126  return (d1);
     
    130130{
    131131  double *d1 = (double*)*end_mmapp;
    132   memcpy(d, d1, n*sizeof(double));
     132  memcpy(d1, d, n*sizeof(double));
    133133  *end_mmapp += ALIGN_DOUBLE(n2*sizeof(double));
    134134  return (d1);
     
    137137{
    138138  int *d1 = (int*)*end_mmapp;
    139   memcpy(d, d1, n*sizeof(int));
     139  memcpy(d1, d, n*sizeof(int));
    140140  *end_mmapp += ALIGN_DOUBLE(n2*sizeof(int));
    141141  return (d1);
  • trunk/PresolveSubst.cpp

    r59 r60  
    113113
    114114    // move the column - 1:  copy the entries
    115     memcpy((void*)&hrow[kcsx], (void*)&hrow[newkcsx], hincol[icolx] * sizeof(int));
    116     memcpy((void*)&colels[kcsx], (void*)&colels[newkcsx], hincol[icolx] * sizeof(double));
     115    memcpy((void*)&hrow[newkcsx], (void*)&hrow[kcsx], hincol[icolx] * sizeof(int));
     116    memcpy((void*)&colels[newkcsx], (void*)&colels[kcsx], hincol[icolx] * sizeof(double));
    117117
    118118    // move the column - 2:  update the memory-order linked list
     
    766766              ap->coeffxs[k-kcs] = colels[k];
    767767
    768               memcpy(&hcol[krs], &ap->rowcolsxs[nel], hinrow[irow]*sizeof(int));
    769               memcpy(&rowels[krs], &ap->rowelsxs[nel], hinrow[irow]*sizeof(double));
     768              memcpy( &ap->rowcolsxs[nel], &hcol[krs],hinrow[irow]*sizeof(int));
     769              memcpy( &ap->rowelsxs[nel], &rowels[krs],hinrow[irow]*sizeof(double));
    770770              nel += hinrow[irow];
    771771            }
     
    973973
    974974            // the addition of rows may have created zero coefficients
    975             memcpy(&hcol[mrstrt[rowy]], &zerocols[nzerocols], hinrow[rowy]*sizeof(int));
     975            memcpy( &zerocols[nzerocols], &hcol[mrstrt[rowy]],hinrow[rowy]*sizeof(int));
    976976            nzerocols += hinrow[rowy];
    977977           
Note: See TracChangeset for help on using the changeset viewer.