Changeset 1264


Ignore:
Timestamp:
Aug 25, 2008 10:59:58 AM (11 years ago)
Author:
forrest
Message:

BSP changes from 1247 to 1259

Location:
trunk/Clp
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/configure

    r1220 r1264  
    27062706        coin_add_cflags="-pipe"
    27072707        coin_dbg_cflags="-g"
    2708         coin_warn_cflags="-pedantic-errors -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall"
     2708        coin_warn_cflags="-Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas"
     2709        case $build in
     2710          *-darwin*)
     2711            ;;
     2712          *)
     2713            coin_warn_cflags="-pedantic-errors $coin_warn_cflags"
     2714            ;;
     2715        esac
    27092716        case $enable_doscompile in
    27102717          mingw)
     
    27792786        case "$CC" in
    27802787          icc* | */icc*)
    2781             coin_opt_cflags="-O3 -ip"
     2788            coin_opt_cflags="-O3 -ip -mp1"
    27822789            coin_add_cflags=""
    27832790            coin_dbg_cflags="-g"
     
    31343141             fi ;;
    31353142  *-*-solaris*)
    3136              comps="CC xlC aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     3143             comps="CC xlC_r aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    31373144  *-darwin*) comps="g++ c++ CC" ;;
    3138           *) comps="xlC aCC CC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     3145          *) comps="xlC_r aCC CC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    31393146esac
    31403147
     
    35483555        coin_add_cxxflags="-pipe"
    35493556        coin_dbg_cxxflags="-g"
    3550         coin_warn_cxxflags="-pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion"
    3551         case $enable_doscompile in
    3552           mingw)
    3553             CXXFLAGS="-mno-cygwin"
    3554             cat >conftest.$ac_ext <<_ACEOF
     3557        coin_warn_cxxflags="-Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas"
     3558        case $build in
     3559          *-darwin*)
     3560            ;;
     3561          *)
     3562            coin_warn_cxxflags="-pedantic-errors $coin_warn_cxxflags"
     3563            ;;
     3564        esac
     3565
     3566        case $enable_doscompile in
     3567          mingw)
     3568            CXXFLAGS="-mno-cygwin"
     3569            cat >conftest.$ac_ext <<_ACEOF
    35553570/* confdefs.h.  */
    35563571_ACEOF
     
    35973612rm -f conftest.err conftest.$ac_objext \
    35983613      conftest$ac_exeext conftest.$ac_ext
    3599             CXXFLAGS=
    3600             ;;
    3601         esac
     3614            CXXFLAGS=
     3615          ;;
     3616        esac
    36023617    esac
    36033618  fi
     
    36263641        case "$CXX" in
    36273642          icpc* | */icpc*)
    3628             coin_opt_cxxflags="-O3 -ip"
     3643            coin_opt_cxxflags="-O3 -ip -mp1"
    36293644            coin_add_cxxflags=""
    36303645            coin_dbg_cxxflags="-g"
     
    36893704          xlC* | */xlC* | mpxlC* | */mpxlC*)
    36903705            coin_opt_cxxflags="-O -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
    3691             coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna -qsuppress=1500-036 -qsuppress=1500-029"
     3706            coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna -qsuppress=1500-036 -qsuppress=1500-029 -qsourcetype=c++"
    36923707            coin_dbg_cxxflags="-g"
    36933708            ;;
     
    57015716*-*-irix6*)
    57025717  # Find out which ABI we are using.
    5703   echo '#line 5703 "configure"' > conftest.$ac_ext
     5718  echo '#line 5718 "configure"' > conftest.$ac_ext
    57045719  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    57055720  (eval $ac_compile) 2>&5
     
    68356850
    68366851# Provide some information about the compiler.
    6837 echo "$as_me:6837:" \
     6852echo "$as_me:6852:" \
    68386853     "checking for Fortran 77 compiler version" >&5
    68396854ac_compiler=`set X $ac_compile; echo $2`
     
    79027917   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    79037918   -e 's:$: $lt_compiler_flag:'`
    7904    (eval echo "\"\$as_me:7904: $lt_compile\"" >&5)
     7919   (eval echo "\"\$as_me:7919: $lt_compile\"" >&5)
    79057920   (eval "$lt_compile" 2>conftest.err)
    79067921   ac_status=$?
    79077922   cat conftest.err >&5
    7908    echo "$as_me:7908: \$? = $ac_status" >&5
     7923   echo "$as_me:7923: \$? = $ac_status" >&5
    79097924   if (exit $ac_status) && test -s "$ac_outfile"; then
    79107925     # The compiler can only warn and ignore the option if not recognized
     
    81708185   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81718186   -e 's:$: $lt_compiler_flag:'`
    8172    (eval echo "\"\$as_me:8172: $lt_compile\"" >&5)
     8187   (eval echo "\"\$as_me:8187: $lt_compile\"" >&5)
    81738188   (eval "$lt_compile" 2>conftest.err)
    81748189   ac_status=$?
    81758190   cat conftest.err >&5
    8176    echo "$as_me:8176: \$? = $ac_status" >&5
     8191   echo "$as_me:8191: \$? = $ac_status" >&5
    81778192   if (exit $ac_status) && test -s "$ac_outfile"; then
    81788193     # The compiler can only warn and ignore the option if not recognized
     
    82748289   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    82758290   -e 's:$: $lt_compiler_flag:'`
    8276    (eval echo "\"\$as_me:8276: $lt_compile\"" >&5)
     8291   (eval echo "\"\$as_me:8291: $lt_compile\"" >&5)
    82778292   (eval "$lt_compile" 2>out/conftest.err)
    82788293   ac_status=$?
    82798294   cat out/conftest.err >&5
    8280    echo "$as_me:8280: \$? = $ac_status" >&5
     8295   echo "$as_me:8295: \$? = $ac_status" >&5
    82818296   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    82828297   then
     
    1061910634  lt_status=$lt_dlunknown
    1062010635  cat > conftest.$ac_ext <<EOF
    10621 #line 10621 "configure"
     10636#line 10636 "configure"
    1062210637#include "confdefs.h"
    1062310638
     
    1071910734  lt_status=$lt_dlunknown
    1072010735  cat > conftest.$ac_ext <<EOF
    10721 #line 10721 "configure"
     10736#line 10736 "configure"
    1072210737#include "confdefs.h"
    1072310738
     
    1306313078   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1306413079   -e 's:$: $lt_compiler_flag:'`
    13065    (eval echo "\"\$as_me:13065: $lt_compile\"" >&5)
     13080   (eval echo "\"\$as_me:13080: $lt_compile\"" >&5)
    1306613081   (eval "$lt_compile" 2>conftest.err)
    1306713082   ac_status=$?
    1306813083   cat conftest.err >&5
    13069    echo "$as_me:13069: \$? = $ac_status" >&5
     13084   echo "$as_me:13084: \$? = $ac_status" >&5
    1307013085   if (exit $ac_status) && test -s "$ac_outfile"; then
    1307113086     # The compiler can only warn and ignore the option if not recognized
     
    1316713182   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1316813183   -e 's:$: $lt_compiler_flag:'`
    13169    (eval echo "\"\$as_me:13169: $lt_compile\"" >&5)
     13184   (eval echo "\"\$as_me:13184: $lt_compile\"" >&5)
    1317013185   (eval "$lt_compile" 2>out/conftest.err)
    1317113186   ac_status=$?
    1317213187   cat out/conftest.err >&5
    13173    echo "$as_me:13173: \$? = $ac_status" >&5
     13188   echo "$as_me:13188: \$? = $ac_status" >&5
    1317413189   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1317513190   then
     
    1473714752   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1473814753   -e 's:$: $lt_compiler_flag:'`
    14739    (eval echo "\"\$as_me:14739: $lt_compile\"" >&5)
     14754   (eval echo "\"\$as_me:14754: $lt_compile\"" >&5)
    1474014755   (eval "$lt_compile" 2>conftest.err)
    1474114756   ac_status=$?
    1474214757   cat conftest.err >&5
    14743    echo "$as_me:14743: \$? = $ac_status" >&5
     14758   echo "$as_me:14758: \$? = $ac_status" >&5
    1474414759   if (exit $ac_status) && test -s "$ac_outfile"; then
    1474514760     # The compiler can only warn and ignore the option if not recognized
     
    1484114856   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1484214857   -e 's:$: $lt_compiler_flag:'`
    14843    (eval echo "\"\$as_me:14843: $lt_compile\"" >&5)
     14858   (eval echo "\"\$as_me:14858: $lt_compile\"" >&5)
    1484414859   (eval "$lt_compile" 2>out/conftest.err)
    1484514860   ac_status=$?
    1484614861   cat out/conftest.err >&5
    14847    echo "$as_me:14847: \$? = $ac_status" >&5
     14862   echo "$as_me:14862: \$? = $ac_status" >&5
    1484814863   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1484914864   then
     
    1704817063   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1704917064   -e 's:$: $lt_compiler_flag:'`
    17050    (eval echo "\"\$as_me:17050: $lt_compile\"" >&5)
     17065   (eval echo "\"\$as_me:17065: $lt_compile\"" >&5)
    1705117066   (eval "$lt_compile" 2>conftest.err)
    1705217067   ac_status=$?
    1705317068   cat conftest.err >&5
    17054    echo "$as_me:17054: \$? = $ac_status" >&5
     17069   echo "$as_me:17069: \$? = $ac_status" >&5
    1705517070   if (exit $ac_status) && test -s "$ac_outfile"; then
    1705617071     # The compiler can only warn and ignore the option if not recognized
     
    1731617331   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1731717332   -e 's:$: $lt_compiler_flag:'`
    17318    (eval echo "\"\$as_me:17318: $lt_compile\"" >&5)
     17333   (eval echo "\"\$as_me:17333: $lt_compile\"" >&5)
    1731917334   (eval "$lt_compile" 2>conftest.err)
    1732017335   ac_status=$?
    1732117336   cat conftest.err >&5
    17322    echo "$as_me:17322: \$? = $ac_status" >&5
     17337   echo "$as_me:17337: \$? = $ac_status" >&5
    1732317338   if (exit $ac_status) && test -s "$ac_outfile"; then
    1732417339     # The compiler can only warn and ignore the option if not recognized
     
    1742017435   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1742117436   -e 's:$: $lt_compiler_flag:'`
    17422    (eval echo "\"\$as_me:17422: $lt_compile\"" >&5)
     17437   (eval echo "\"\$as_me:17437: $lt_compile\"" >&5)
    1742317438   (eval "$lt_compile" 2>out/conftest.err)
    1742417439   ac_status=$?
    1742517440   cat out/conftest.err >&5
    17426    echo "$as_me:17426: \$? = $ac_status" >&5
     17441   echo "$as_me:17441: \$? = $ac_status" >&5
    1742717442   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1742817443   then
  • trunk/Clp/src/ClpCholeskyBase.cpp

    r1197 r1264  
    17181718        newDropped=0;
    17191719        for (int i=0;i<numberRows_;i++) {
    1720           char dropped = rowsDropped[i];
     1720          char dropped = static_cast<char>(rowsDropped[i]);
    17211721          rowsDropped_[i]=dropped;
    17221722          rowsDropped_[i]=0;
     
    17341734        newDropped=0;
    17351735        for (int i=0;i<numberRows_;i++) {
    1736           char dropped = rowsDropped[i];
     1736          char dropped = static_cast<char>(rowsDropped[i]);
    17371737          rowsDropped_[i]=dropped;
    17381738          if (dropped==2) {
  • trunk/Clp/src/ClpCholeskyDense.cpp

    r1197 r1264  
    259259      newDropped=0;
    260260      for (int i=0;i<numberRows_;i++) {
    261         char dropped = rowsDropped[i];
     261        char dropped = static_cast<char>(rowsDropped[i]);
    262262        rowsDropped_[i]=dropped;
    263263        if (dropped==2) {
  • trunk/Clp/src/ClpDynamicExampleMatrix.hpp

    r1088 r1264  
    124124  {
    125125    unsigned char & st_byte = dynamicStatusGen_[sequence];
    126     st_byte &= ~7;
    127     st_byte |= status;
     126    st_byte = static_cast<unsigned char>(st_byte & ~7);
     127    st_byte = static_cast<unsigned char>(st_byte | status);
    128128  }
    129129  inline DynamicStatus getDynamicStatusGen(int sequence) const
     
    134134  }
    135135  inline void setFlaggedGen(int i) {
    136     dynamicStatusGen_[i] |= 8;
     136    dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] | 8);
    137137  }
    138138  inline void unsetFlagged(int i) {
    139     dynamicStatusGen_[i]  &= ~8;;
     139    dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] & ~8);
    140140  }
    141141   //@}
  • trunk/Clp/src/ClpDynamicMatrix.hpp

    r1088 r1264  
    156156  {
    157157    unsigned char & st_byte = status_[sequence];
    158     st_byte &= ~7;
    159     st_byte |= status;
     158    st_byte = static_cast<unsigned char>(st_byte & ~7);
     159    st_byte = static_cast<unsigned char>(st_byte | status);
    160160  }
    161161  /// Number of sets (dynamic rows)
     
    167167  }
    168168  inline void setFlagged(int i) {
    169     dynamicStatus_[i] |= 8;
     169    dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] | 8);
    170170  }
    171171  inline void unsetFlagged(int i) {
    172     dynamicStatus_[i]  &= ~8;;
     172    dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] & ~8);
    173173  }
    174174  inline void setDynamicStatus(int sequence, DynamicStatus status)
    175175  {
    176176    unsigned char & st_byte = dynamicStatus_[sequence];
    177     st_byte &= ~7;
    178     st_byte |= status;
     177    st_byte = static_cast<unsigned char>(st_byte & ~7);
     178    st_byte = static_cast<unsigned char>(st_byte | status);
    179179  }
    180180  inline DynamicStatus getDynamicStatus(int sequence) const
  • trunk/Clp/src/ClpGubDynamicMatrix.hpp

    r1088 r1264  
    105105  }
    106106  inline void setFlagged(int i) {
    107     dynamicStatus_[i] |= 8;
     107    dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] | 8);
    108108  }
    109109  inline void unsetFlagged(int i) {
    110     dynamicStatus_[i]  &= ~8;;
     110    dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] & ~8);
    111111  }
    112112  inline void setDynamicStatus(int sequence, DynamicStatus status)
    113113  {
    114114    unsigned char & st_byte = dynamicStatus_[sequence];
    115     st_byte &= ~7;
    116     st_byte |= status;
     115    st_byte = static_cast<unsigned char>(st_byte & ~7);
     116    st_byte = static_cast<unsigned char>(st_byte | status);
    117117  }
    118118  inline DynamicStatus getDynamicStatus(int sequence) const
  • trunk/Clp/src/ClpGubMatrix.hpp

    r1088 r1264  
    212212  {
    213213    unsigned char & st_byte = status_[sequence];
    214     st_byte &= ~7;
    215     st_byte |= status;
     214    st_byte = static_cast<unsigned char>(st_byte & ~7);
     215    st_byte = static_cast<unsigned char>(st_byte | status);
    216216  }
    217217  /// To flag a variable
    218218  inline void setFlagged( int sequence)
    219219  {
    220     status_[sequence] |= 64;
     220    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 64);
    221221  }
    222222  inline void clearFlagged( int sequence)
    223223  {
    224     status_[sequence] &= ~64;
     224    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64);
    225225  }
    226226  inline bool flagged(int sequence) const
     
    230230  {
    231231    unsigned char iStat = status_[sequence];
    232     iStat &= ~24;
    233     status_[sequence] = iStat|16;
     232    iStat = static_cast<unsigned char>(iStat & ~24);
     233    status_[sequence] = static_cast<unsigned char>(iStat|16);
    234234  }
    235235  /// To say key is feasible
     
    237237  {
    238238    unsigned char iStat = status_[sequence];
    239     iStat &= ~24;
    240     status_[sequence] = iStat|8;
     239    iStat = static_cast<unsigned char>(iStat & ~24);
     240    status_[sequence] = static_cast<unsigned char>(iStat|8);
    241241  }
    242242  /// To say key is below lb
     
    244244  {
    245245    unsigned char iStat = status_[sequence];
    246     iStat &= ~24;
     246    iStat = static_cast<unsigned char>(iStat & ~24);
    247247    status_[sequence] = iStat;
    248248  }
  • trunk/Clp/src/ClpInterior.hpp

    r1171 r1264  
    278278  inline void setFixed( int sequence)
    279279  {
    280     status_[sequence] |= 1;
     280    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 1) ;
    281281  }
    282282  inline void clearFixed( int sequence)
    283283  {
    284     status_[sequence] &= ~1;
     284    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~1) ;
    285285  }
    286286  inline bool fixed(int sequence) const
     
    290290  inline void setFlagged( int sequence)
    291291  {
    292     status_[sequence] |= 2;
     292    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 2) ;
    293293  }
    294294  inline void clearFlagged( int sequence)
    295295  {
    296     status_[sequence] &= ~2;
     296    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~2) ;
    297297  }
    298298  inline bool flagged(int sequence) const
     
    302302  inline void setFixedOrFree( int sequence)
    303303  {
    304     status_[sequence] |= 4;
     304    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 4) ;
    305305  }
    306306  inline void clearFixedOrFree( int sequence)
    307307  {
    308     status_[sequence] &= ~4;
     308    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~4) ;
    309309  }
    310310  inline bool fixedOrFree(int sequence) const
     
    314314  inline void setLowerBound( int sequence)
    315315  {
    316     status_[sequence] |= 8;
     316    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 8) ;
    317317  }
    318318  inline void clearLowerBound( int sequence)
    319319  {
    320     status_[sequence] &= ~8;
     320    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~8) ;
    321321  }
    322322  inline bool lowerBound(int sequence) const
     
    326326  inline void setUpperBound( int sequence)
    327327  {
    328     status_[sequence] |= 16;
     328    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 16) ;
    329329  }
    330330  inline void clearUpperBound( int sequence)
    331331  {
    332     status_[sequence] &= ~16;
     332    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~16) ;
    333333  }
    334334  inline bool upperBound(int sequence) const
     
    338338  inline void setFakeLower( int sequence)
    339339  {
    340     status_[sequence] |= 32;
     340    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32) ;
    341341  }
    342342  inline void clearFakeLower( int sequence)
    343343  {
    344     status_[sequence] &= ~32;
     344    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32) ;
    345345  }
    346346  inline bool fakeLower(int sequence) const
     
    350350  inline void setFakeUpper( int sequence)
    351351  {
    352     status_[sequence] |= 64;
     352    status_[sequence] = static_cast<unsigned char>(status_[sequence] | 64) ;
    353353  }
    354354  inline void clearFakeUpper( int sequence)
    355355  {
    356     status_[sequence] &= ~64;
     356    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64) ;
    357357  }
    358358  inline bool fakeUpper(int sequence) const
  • trunk/Clp/src/ClpModel.cpp

    r1231 r1264  
    39043904  if ((specialOptions_&65536)!=0) {
    39053905    if (numberRows_>maximumRows_||numberColumns_>maximumColumns_) {
    3906       if (numberRows_>maximumRows_)
    3907         if (maximumRows_>0)
     3906      if (numberRows_>maximumRows_) {
     3907        if (maximumRows_>0)
    39083908          maximumRows_ = numberRows_+10+numberRows_/100;
    39093909        else
    39103910          maximumRows_ = numberRows_;
    3911       if (numberColumns_>maximumColumns_)
     3911      }
     3912      if (numberColumns_>maximumColumns_) {
    39123913        if (maximumColumns_>0)
    39133914          maximumColumns_ = numberColumns_+10+numberColumns_/100;
    39143915        else
    39153916          maximumColumns_ = numberColumns_;
     3917      }
    39163918      // need to make sure numberRows_ OK and size of matrices
    39173919      resize(maximumRows_,maximumColumns_);
     
    41134115        }
    41144116        if (possible) {
    4115           rotate[jRow]+=2;
     4117          rotate[jRow] = static_cast<char>(rotate[jRow]+2);
    41164118          eligible[numberIn++]=jRow;
    4117           char multiplier = (rotate[jRow]==2) ? 1 : -1;
     4119          char multiplier = static_cast<char>((rotate[jRow]==2) ? 1 : -1);
    41184120          for (CoinBigIndex j=rowStart[jRow];j<rowStart[jRow+1];j++) {
    41194121            iColumn = column[j];
     
    41224124            int absCount=CoinAbs(iCount);
    41234125            if (!absCount) {
    4124               columnCount[iColumn]=elementByRow[j]*multiplier;
     4126              columnCount[iColumn]=static_cast<char>(elementByRow[j]*multiplier);
    41254127            } else {
    41264128              columnCount[iColumn]=2;
     
    41384140    trueNetwork=true;
    41394141    for (iColumn=0;iColumn<numberColumns_;iColumn++) {
    4140       if (CoinAbs(columnCount[iColumn])==1) {
     4142      if (CoinAbs(static_cast<int>(columnCount[iColumn]))==1) {
    41414143        trueNetwork=false;
    41424144        break;
     
    41724174      else
    41734175        iState = -1;
    4174       rotate[iRow]=iState;
     4176      rotate[iRow]=static_cast<char>(iState);
    41754177    } else {
    41764178      rotate[iRow]=-1;
  • trunk/Clp/src/ClpNonLinearCost.cpp

    r1197 r1264  
    784784    for (iSequence=0;iSequence<numberTotal;iSequence++) {
    785785      double value=solution[iSequence];
    786       int iStatus = status_[iSequence];
     786      unsigned char iStatus = status_[iSequence];
    787787      assert (currentStatus(iStatus)==CLP_SAME);
    788788      double lowerValue=lower[iSequence];
     
    989989    int numberTotal = numberColumns_+numberRows_;
    990990    for (iSequence=0;iSequence<numberTotal;iSequence++) {
    991       int iStatus = status_[iSequence];
     991      unsigned char iStatus = status_[iSequence];
    992992      assert (currentStatus(iStatus)==CLP_SAME);
    993993      double lowerValue=lower[iSequence];
     
    10601060      double alpha = multiplier*array[iRow];
    10611061      double value = solution[iSequence];
    1062       int iStatus = status_[iSequence];
     1062      unsigned char iStatus = status_[iSequence];
    10631063      int iWhere = currentStatus(iStatus);
    10641064      if (iWhere==CLP_SAME)
     
    11461146      int iSequence = pivotVariable[iRow];
    11471147      double value = solution[iSequence];
    1148       int iStatus = status_[iSequence];
     1148      unsigned char iStatus = status_[iSequence];
    11491149      int iWhere = currentStatus(iStatus);
    11501150      int original = originalStatus(iStatus);
     
    12561256      int iSequence = pivotVariable[iRow];
    12571257      double value=solution[iSequence];
    1258       int iStatus = status_[iSequence];
     1258      unsigned char iStatus = status_[iSequence];
    12591259      assert (currentStatus(iStatus)==CLP_SAME);
    12601260      double lowerValue=lower[iSequence];
     
    13691369      int iSequence = pivotVariable[iRow];
    13701370      double value=solution[iSequence];
    1371       int iStatus = status_[iSequence];
     1371      unsigned char iStatus = status_[iSequence];
    13721372      assert (currentStatus(iStatus)==CLP_SAME);
    13731373      double lowerValue=lower[iSequence];
     
    15121512    double * lower = model_->lowerRegion();
    15131513    double * cost = model_->costRegion();
    1514     int iStatus = status_[iSequence];
     1514    unsigned char iStatus = status_[iSequence];
    15151515    assert (currentStatus(iStatus)==CLP_SAME);
    15161516    double lowerValue=lower[iSequence];
     
    17131713    double * lower = model_->lowerRegion();
    17141714    double * cost = model_->costRegion();
    1715     int iStatus = status_[iSequence];
     1715    unsigned char iStatus = status_[iSequence];
    17161716    assert (currentStatus(iStatus)==CLP_SAME);
    17171717    double lowerValue=lower[iSequence];
  • trunk/Clp/src/ClpNonLinearCost.hpp

    r1055 r1264  
    4242{ return (status>>4);}
    4343inline void setOriginalStatus(unsigned char & status,int value)
    44 { status &= ~15;status |= value;}
     44{
     45  status = static_cast<unsigned char>(status & ~15);
     46  status = static_cast<unsigned char>(status | value);
     47}
    4548inline void setCurrentStatus(unsigned char &status,int value)
    46 { status &= ~(15<<4);status |= (value<<4);}
     49{
     50  status = static_cast<unsigned char>(status & ~(15<<4));
     51  status = static_cast<unsigned char>(status | (value<<4));
     52}
    4753inline void setInitialStatus(unsigned char &status)
    48 { status = CLP_FEASIBLE | (CLP_SAME<<4);}
     54{ status = static_cast<unsigned char>(CLP_FEASIBLE | (CLP_SAME<<4)); }
    4955inline void setSameStatus(unsigned char &status)
    50 { status &= ~(15<<4);status |= (CLP_SAME<<4);}
     56{
     57  status = static_cast<unsigned char>(status & ~(15<<4));
     58  status = static_cast<unsigned char>(status | (CLP_SAME<<4));
     59}
    5160// Use second version to get more speed
    5261//#define FAST_CLPNON
     
    220229      rhs = saveRhs;
    221230#endif
    222       int iStatus = status_[sequence];
     231      unsigned char iStatus = status_[sequence];
    223232      int iWhere = currentStatus(iStatus);
    224233      if (iWhere==CLP_SAME)
  • trunk/Clp/src/ClpPackedMatrix.cpp

    r1219 r1264  
    20712071          }
    20722072        }
    2073         usefulRow[iRow]=useful;
     2073        usefulRow[iRow]=static_cast<char>(useful);
    20742074      }
    20752075    }
     
    36223622              abort();
    36233623            }
    3624             column_[j]=iColumn-start;
     3624            column_[j]=static_cast<unsigned short>(iColumn-start);
    36253625            nFound++;
    36263626            if (lastFound) {
     
    36343634        }
    36353635      }
    3636       count_[iRow*numberBlocks_+iBlock]=nFound;
     3636      count_[iRow*numberBlocks_+iBlock]=static_cast<unsigned short>(nFound);
    36373637      if (!nFound)
    36383638        nZero++;
  • trunk/Clp/src/ClpSimplex.hpp

    r1202 r1264  
    841841  {
    842842    unsigned char & st_byte = status_[sequence];
    843     st_byte &= ~7;
    844     st_byte |= status;
     843    st_byte = static_cast<unsigned char>(st_byte & ~7);
     844    st_byte = static_cast<unsigned char>(st_byte | status);
    845845  }
    846846  /// Start or reset using maximumRows_ and Columns_ - true if change
     
    941941  {
    942942    unsigned char & st_byte = status_[sequence];
    943     st_byte &= ~24;
    944     st_byte |= fakeBound<<3;
     943    st_byte = static_cast<unsigned char>(st_byte & ~24);
     944    st_byte = static_cast<unsigned char>(st_byte | (fakeBound<<3));
    945945  }
    946946  inline FakeBound getFakeBound(int sequence) const
     
    949949  {
    950950    unsigned char & st_byte = status_[sequence+numberColumns_];
    951     st_byte &= ~7;
    952     st_byte |= status;
     951    st_byte = static_cast<unsigned char>(st_byte & ~7);
     952    st_byte = static_cast<unsigned char>(st_byte | status);
    953953  }
    954954  inline Status getRowStatus(int sequence) const
     
    957957  {
    958958    unsigned char & st_byte = status_[sequence];
    959     st_byte &= ~7;
    960     st_byte |= status;
     959    st_byte = static_cast<unsigned char>(st_byte & ~7);
     960    st_byte = static_cast<unsigned char>(st_byte | status);
    961961  }
    962962  inline Status getColumnStatus(int sequence) const
    963963  {return static_cast<Status> (status_[sequence]&7);}
    964964  inline void setPivoted( int sequence)
    965   { status_[sequence] |= 32;}
     965  { status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32);}
    966966  inline void clearPivoted( int sequence)
    967   { status_[sequence] &= ~32; }
     967  { status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32);}
    968968  inline bool pivoted(int sequence) const
    969969  {return (((status_[sequence]>>5)&1)!=0);}
     
    972972  inline void clearFlagged( int sequence)
    973973  {
    974     status_[sequence] &= ~64;
     974    status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64);
    975975  }
    976976  inline bool flagged(int sequence) const
     
    979979  inline void setActive( int iRow)
    980980  {
    981     status_[iRow] |= 128;
     981    status_[iRow] = static_cast<unsigned char>(status_[iRow] | 128);
    982982  }
    983983  inline void clearActive( int iRow)
    984984  {
    985     status_[iRow] &= ~128;
     985    status_[iRow] = static_cast<unsigned char>(status_[iRow] & ~128);
    986986  }
    987987  inline bool active(int iRow) const
  • trunk/Clp/src/ClpSolve.cpp

    r1237 r1264  
    30943094  }
    30953095#endif
    3096   char way = 1-wayIn+4*(1-wayOut);
     3096  int way = 1-wayIn+4*(1-wayOut);
    30973097  //obj_[i]=model_->objectiveValue();
    30983098  in_[CLP_CYCLE-1]=in;
    30993099  out_[CLP_CYCLE-1]=out;
    3100   way_[CLP_CYCLE-1]=way;
     3100  way_[CLP_CYCLE-1]=static_cast<char>(way);
    31013101  return matched;
    31023102}
  • trunk/Clp/src/Idiot.cpp

    r1197 r1264  
    11601160  }
    11611161  double fixTolerance=IDIOT_FIX_TOLERANCE;
    1162   double startTime = CoinCpuTime();
     1162  // double startTime = CoinCpuTime();          unused?
    11631163  ClpSimplex * saveModel=NULL;
    11641164  ClpMatrixBase * matrix = model_->clpMatrix();
     
    15271527        saveLower=NULL;
    15281528      }
     1529#ifdef COIN_DEVELOP
    15291530      printf("Time so far %g, %d now added from previous iterations\n",
    15301531             CoinCpuTime()-startTime,n);
     1532#endif
    15311533      if (addAll)
    15321534        presolve=0;
     
    15661568        saveUpper=NULL;
    15671569        saveLower=NULL;
     1570#ifdef COIN_DEVELOP
    15681571        printf("Time so far %g, %d now added from previous iterations\n",
    15691572               CoinCpuTime()-startTime,n);
     1573#endif
    15701574      }
    15711575      if (presolve) {
     
    15921596      }
    15931597    }
     1598#ifdef COIN_DEVELOP
    15941599    printf("Total time in crossover %g\n", CoinCpuTime()-startTime);
     1600#endif
    15951601    delete [] saveUpper;
    15961602    delete [] saveLower;
Note: See TracChangeset for help on using the changeset viewer.