Changeset 1263
- Timestamp:
- Aug 25, 2008 10:55:49 AM (13 years ago)
- Location:
- stable/1.8/Clp
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/1.8/Clp/configure
r1240 r1263 2706 2706 coin_add_cflags="-pipe" 2707 2707 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 2709 2716 case $enable_doscompile in 2710 2717 mingw) … … 2779 2786 case "$CC" in 2780 2787 icc* | */icc*) 2781 coin_opt_cflags="-O3 -ip "2788 coin_opt_cflags="-O3 -ip -mp1" 2782 2789 coin_add_cflags="" 2783 2790 coin_dbg_cflags="-g" … … 3134 3141 fi ;; 3135 3142 *-*-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" ;; 3137 3144 *-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" ;; 3139 3146 esac 3140 3147 … … 3548 3555 coin_add_cxxflags="-pipe" 3549 3556 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 3555 3570 /* confdefs.h. */ 3556 3571 _ACEOF … … 3597 3612 rm -f conftest.err conftest.$ac_objext \ 3598 3613 conftest$ac_exeext conftest.$ac_ext 3599 3600 3601 3614 CXXFLAGS= 3615 ;; 3616 esac 3602 3617 esac 3603 3618 fi … … 3626 3641 case "$CXX" in 3627 3642 icpc* | */icpc*) 3628 coin_opt_cxxflags="-O3 -ip "3643 coin_opt_cxxflags="-O3 -ip -mp1" 3629 3644 coin_add_cxxflags="" 3630 3645 coin_dbg_cxxflags="-g" … … 3689 3704 xlC* | */xlC* | mpxlC* | */mpxlC*) 3690 3705 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++" 3692 3707 coin_dbg_cxxflags="-g" 3693 3708 ;; … … 5701 5716 *-*-irix6*) 5702 5717 # Find out which ABI we are using. 5703 echo '#line 57 03"configure"' > conftest.$ac_ext5718 echo '#line 5718 "configure"' > conftest.$ac_ext 5704 5719 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5705 5720 (eval $ac_compile) 2>&5 … … 6835 6850 6836 6851 # Provide some information about the compiler. 6837 echo "$as_me:68 37:" \6852 echo "$as_me:6852:" \ 6838 6853 "checking for Fortran 77 compiler version" >&5 6839 6854 ac_compiler=`set X $ac_compile; echo $2` … … 7902 7917 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 7903 7918 -e 's:$: $lt_compiler_flag:'` 7904 (eval echo "\"\$as_me:79 04: $lt_compile\"" >&5)7919 (eval echo "\"\$as_me:7919: $lt_compile\"" >&5) 7905 7920 (eval "$lt_compile" 2>conftest.err) 7906 7921 ac_status=$? 7907 7922 cat conftest.err >&5 7908 echo "$as_me:79 08: \$? = $ac_status" >&57923 echo "$as_me:7923: \$? = $ac_status" >&5 7909 7924 if (exit $ac_status) && test -s "$ac_outfile"; then 7910 7925 # The compiler can only warn and ignore the option if not recognized … … 8170 8185 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 8171 8186 -e 's:$: $lt_compiler_flag:'` 8172 (eval echo "\"\$as_me:81 72: $lt_compile\"" >&5)8187 (eval echo "\"\$as_me:8187: $lt_compile\"" >&5) 8173 8188 (eval "$lt_compile" 2>conftest.err) 8174 8189 ac_status=$? 8175 8190 cat conftest.err >&5 8176 echo "$as_me:81 76: \$? = $ac_status" >&58191 echo "$as_me:8191: \$? = $ac_status" >&5 8177 8192 if (exit $ac_status) && test -s "$ac_outfile"; then 8178 8193 # The compiler can only warn and ignore the option if not recognized … … 8274 8289 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 8275 8290 -e 's:$: $lt_compiler_flag:'` 8276 (eval echo "\"\$as_me:82 76: $lt_compile\"" >&5)8291 (eval echo "\"\$as_me:8291: $lt_compile\"" >&5) 8277 8292 (eval "$lt_compile" 2>out/conftest.err) 8278 8293 ac_status=$? 8279 8294 cat out/conftest.err >&5 8280 echo "$as_me:82 80: \$? = $ac_status" >&58295 echo "$as_me:8295: \$? = $ac_status" >&5 8281 8296 if (exit $ac_status) && test -s out/conftest2.$ac_objext 8282 8297 then … … 10619 10634 lt_status=$lt_dlunknown 10620 10635 cat > conftest.$ac_ext <<EOF 10621 #line 106 21"configure"10636 #line 10636 "configure" 10622 10637 #include "confdefs.h" 10623 10638 … … 10719 10734 lt_status=$lt_dlunknown 10720 10735 cat > conftest.$ac_ext <<EOF 10721 #line 107 21"configure"10736 #line 10736 "configure" 10722 10737 #include "confdefs.h" 10723 10738 … … 13063 13078 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 13064 13079 -e 's:$: $lt_compiler_flag:'` 13065 (eval echo "\"\$as_me:130 65: $lt_compile\"" >&5)13080 (eval echo "\"\$as_me:13080: $lt_compile\"" >&5) 13066 13081 (eval "$lt_compile" 2>conftest.err) 13067 13082 ac_status=$? 13068 13083 cat conftest.err >&5 13069 echo "$as_me:130 69: \$? = $ac_status" >&513084 echo "$as_me:13084: \$? = $ac_status" >&5 13070 13085 if (exit $ac_status) && test -s "$ac_outfile"; then 13071 13086 # The compiler can only warn and ignore the option if not recognized … … 13167 13182 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 13168 13183 -e 's:$: $lt_compiler_flag:'` 13169 (eval echo "\"\$as_me:131 69: $lt_compile\"" >&5)13184 (eval echo "\"\$as_me:13184: $lt_compile\"" >&5) 13170 13185 (eval "$lt_compile" 2>out/conftest.err) 13171 13186 ac_status=$? 13172 13187 cat out/conftest.err >&5 13173 echo "$as_me:131 73: \$? = $ac_status" >&513188 echo "$as_me:13188: \$? = $ac_status" >&5 13174 13189 if (exit $ac_status) && test -s out/conftest2.$ac_objext 13175 13190 then … … 14737 14752 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 14738 14753 -e 's:$: $lt_compiler_flag:'` 14739 (eval echo "\"\$as_me:147 39: $lt_compile\"" >&5)14754 (eval echo "\"\$as_me:14754: $lt_compile\"" >&5) 14740 14755 (eval "$lt_compile" 2>conftest.err) 14741 14756 ac_status=$? 14742 14757 cat conftest.err >&5 14743 echo "$as_me:147 43: \$? = $ac_status" >&514758 echo "$as_me:14758: \$? = $ac_status" >&5 14744 14759 if (exit $ac_status) && test -s "$ac_outfile"; then 14745 14760 # The compiler can only warn and ignore the option if not recognized … … 14841 14856 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 14842 14857 -e 's:$: $lt_compiler_flag:'` 14843 (eval echo "\"\$as_me:148 43: $lt_compile\"" >&5)14858 (eval echo "\"\$as_me:14858: $lt_compile\"" >&5) 14844 14859 (eval "$lt_compile" 2>out/conftest.err) 14845 14860 ac_status=$? 14846 14861 cat out/conftest.err >&5 14847 echo "$as_me:148 47: \$? = $ac_status" >&514862 echo "$as_me:14862: \$? = $ac_status" >&5 14848 14863 if (exit $ac_status) && test -s out/conftest2.$ac_objext 14849 14864 then … … 17048 17063 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 17049 17064 -e 's:$: $lt_compiler_flag:'` 17050 (eval echo "\"\$as_me:170 50: $lt_compile\"" >&5)17065 (eval echo "\"\$as_me:17065: $lt_compile\"" >&5) 17051 17066 (eval "$lt_compile" 2>conftest.err) 17052 17067 ac_status=$? 17053 17068 cat conftest.err >&5 17054 echo "$as_me:170 54: \$? = $ac_status" >&517069 echo "$as_me:17069: \$? = $ac_status" >&5 17055 17070 if (exit $ac_status) && test -s "$ac_outfile"; then 17056 17071 # The compiler can only warn and ignore the option if not recognized … … 17316 17331 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 17317 17332 -e 's:$: $lt_compiler_flag:'` 17318 (eval echo "\"\$as_me:173 18: $lt_compile\"" >&5)17333 (eval echo "\"\$as_me:17333: $lt_compile\"" >&5) 17319 17334 (eval "$lt_compile" 2>conftest.err) 17320 17335 ac_status=$? 17321 17336 cat conftest.err >&5 17322 echo "$as_me:173 22: \$? = $ac_status" >&517337 echo "$as_me:17337: \$? = $ac_status" >&5 17323 17338 if (exit $ac_status) && test -s "$ac_outfile"; then 17324 17339 # The compiler can only warn and ignore the option if not recognized … … 17420 17435 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 17421 17436 -e 's:$: $lt_compiler_flag:'` 17422 (eval echo "\"\$as_me:174 22: $lt_compile\"" >&5)17437 (eval echo "\"\$as_me:17437: $lt_compile\"" >&5) 17423 17438 (eval "$lt_compile" 2>out/conftest.err) 17424 17439 ac_status=$? 17425 17440 cat out/conftest.err >&5 17426 echo "$as_me:174 26: \$? = $ac_status" >&517441 echo "$as_me:17441: \$? = $ac_status" >&5 17427 17442 if (exit $ac_status) && test -s out/conftest2.$ac_objext 17428 17443 then -
stable/1.8/Clp/src/ClpCholeskyBase.cpp
r1197 r1263 1718 1718 newDropped=0; 1719 1719 for (int i=0;i<numberRows_;i++) { 1720 char dropped = rowsDropped[i];1720 char dropped = static_cast<char>(rowsDropped[i]); 1721 1721 rowsDropped_[i]=dropped; 1722 1722 rowsDropped_[i]=0; … … 1734 1734 newDropped=0; 1735 1735 for (int i=0;i<numberRows_;i++) { 1736 char dropped = rowsDropped[i];1736 char dropped = static_cast<char>(rowsDropped[i]); 1737 1737 rowsDropped_[i]=dropped; 1738 1738 if (dropped==2) { -
stable/1.8/Clp/src/ClpCholeskyDense.cpp
r1197 r1263 259 259 newDropped=0; 260 260 for (int i=0;i<numberRows_;i++) { 261 char dropped = rowsDropped[i];261 char dropped = static_cast<char>(rowsDropped[i]); 262 262 rowsDropped_[i]=dropped; 263 263 if (dropped==2) { -
stable/1.8/Clp/src/ClpDynamicExampleMatrix.hpp
r1088 r1263 124 124 { 125 125 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); 128 128 } 129 129 inline DynamicStatus getDynamicStatusGen(int sequence) const … … 134 134 } 135 135 inline void setFlaggedGen(int i) { 136 dynamicStatusGen_[i] |= 8;136 dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] | 8); 137 137 } 138 138 inline void unsetFlagged(int i) { 139 dynamicStatusGen_[i] &= ~8;;139 dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] & ~8); 140 140 } 141 141 //@} -
stable/1.8/Clp/src/ClpDynamicMatrix.hpp
r1088 r1263 156 156 { 157 157 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); 160 160 } 161 161 /// Number of sets (dynamic rows) … … 167 167 } 168 168 inline void setFlagged(int i) { 169 dynamicStatus_[i] |= 8;169 dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] | 8); 170 170 } 171 171 inline void unsetFlagged(int i) { 172 dynamicStatus_[i] &= ~8;;172 dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] & ~8); 173 173 } 174 174 inline void setDynamicStatus(int sequence, DynamicStatus status) 175 175 { 176 176 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); 179 179 } 180 180 inline DynamicStatus getDynamicStatus(int sequence) const -
stable/1.8/Clp/src/ClpGubDynamicMatrix.hpp
r1088 r1263 105 105 } 106 106 inline void setFlagged(int i) { 107 dynamicStatus_[i] |= 8;107 dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] | 8); 108 108 } 109 109 inline void unsetFlagged(int i) { 110 dynamicStatus_[i] &= ~8;;110 dynamicStatus_[i] = static_cast<unsigned char>(dynamicStatus_[i] & ~8); 111 111 } 112 112 inline void setDynamicStatus(int sequence, DynamicStatus status) 113 113 { 114 114 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); 117 117 } 118 118 inline DynamicStatus getDynamicStatus(int sequence) const -
stable/1.8/Clp/src/ClpGubMatrix.hpp
r1088 r1263 212 212 { 213 213 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); 216 216 } 217 217 /// To flag a variable 218 218 inline void setFlagged( int sequence) 219 219 { 220 status_[sequence] |= 64;220 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 64); 221 221 } 222 222 inline void clearFlagged( int sequence) 223 223 { 224 status_[sequence] &= ~64;224 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64); 225 225 } 226 226 inline bool flagged(int sequence) const … … 230 230 { 231 231 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); 234 234 } 235 235 /// To say key is feasible … … 237 237 { 238 238 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); 241 241 } 242 242 /// To say key is below lb … … 244 244 { 245 245 unsigned char iStat = status_[sequence]; 246 iStat &= ~24;246 iStat = static_cast<unsigned char>(iStat & ~24); 247 247 status_[sequence] = iStat; 248 248 } -
stable/1.8/Clp/src/ClpInterior.hpp
r1171 r1263 278 278 inline void setFixed( int sequence) 279 279 { 280 status_[sequence] |= 1;280 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 1) ; 281 281 } 282 282 inline void clearFixed( int sequence) 283 283 { 284 status_[sequence] &= ~1;284 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~1) ; 285 285 } 286 286 inline bool fixed(int sequence) const … … 290 290 inline void setFlagged( int sequence) 291 291 { 292 status_[sequence] |= 2;292 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 2) ; 293 293 } 294 294 inline void clearFlagged( int sequence) 295 295 { 296 status_[sequence] &= ~2;296 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~2) ; 297 297 } 298 298 inline bool flagged(int sequence) const … … 302 302 inline void setFixedOrFree( int sequence) 303 303 { 304 status_[sequence] |= 4;304 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 4) ; 305 305 } 306 306 inline void clearFixedOrFree( int sequence) 307 307 { 308 status_[sequence] &= ~4;308 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~4) ; 309 309 } 310 310 inline bool fixedOrFree(int sequence) const … … 314 314 inline void setLowerBound( int sequence) 315 315 { 316 status_[sequence] |= 8;316 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 8) ; 317 317 } 318 318 inline void clearLowerBound( int sequence) 319 319 { 320 status_[sequence] &= ~8;320 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~8) ; 321 321 } 322 322 inline bool lowerBound(int sequence) const … … 326 326 inline void setUpperBound( int sequence) 327 327 { 328 status_[sequence] |= 16;328 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 16) ; 329 329 } 330 330 inline void clearUpperBound( int sequence) 331 331 { 332 status_[sequence] &= ~16;332 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~16) ; 333 333 } 334 334 inline bool upperBound(int sequence) const … … 338 338 inline void setFakeLower( int sequence) 339 339 { 340 status_[sequence] |= 32;340 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32) ; 341 341 } 342 342 inline void clearFakeLower( int sequence) 343 343 { 344 status_[sequence] &= ~32;344 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32) ; 345 345 } 346 346 inline bool fakeLower(int sequence) const … … 350 350 inline void setFakeUpper( int sequence) 351 351 { 352 status_[sequence] |= 64;352 status_[sequence] = static_cast<unsigned char>(status_[sequence] | 64) ; 353 353 } 354 354 inline void clearFakeUpper( int sequence) 355 355 { 356 status_[sequence] &= ~64;356 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64) ; 357 357 } 358 358 inline bool fakeUpper(int sequence) const -
stable/1.8/Clp/src/ClpModel.cpp
r1230 r1263 3904 3904 if ((specialOptions_&65536)!=0) { 3905 3905 if (numberRows_>maximumRows_||numberColumns_>maximumColumns_) { 3906 if (numberRows_>maximumRows_) 3907 3906 if (numberRows_>maximumRows_) { 3907 if (maximumRows_>0) 3908 3908 maximumRows_ = numberRows_+10+numberRows_/100; 3909 3909 else 3910 3910 maximumRows_ = numberRows_; 3911 if (numberColumns_>maximumColumns_) 3911 } 3912 if (numberColumns_>maximumColumns_) { 3912 3913 if (maximumColumns_>0) 3913 3914 maximumColumns_ = numberColumns_+10+numberColumns_/100; 3914 3915 else 3915 3916 maximumColumns_ = numberColumns_; 3917 } 3916 3918 // need to make sure numberRows_ OK and size of matrices 3917 3919 resize(maximumRows_,maximumColumns_); … … 4113 4115 } 4114 4116 if (possible) { 4115 rotate[jRow] +=2;4117 rotate[jRow] = static_cast<char>(rotate[jRow]+2); 4116 4118 eligible[numberIn++]=jRow; 4117 char multiplier = (rotate[jRow]==2) ? 1 : -1;4119 char multiplier = static_cast<char>((rotate[jRow]==2) ? 1 : -1); 4118 4120 for (CoinBigIndex j=rowStart[jRow];j<rowStart[jRow+1];j++) { 4119 4121 iColumn = column[j]; … … 4122 4124 int absCount=CoinAbs(iCount); 4123 4125 if (!absCount) { 4124 columnCount[iColumn]= elementByRow[j]*multiplier;4126 columnCount[iColumn]=static_cast<char>(elementByRow[j]*multiplier); 4125 4127 } else { 4126 4128 columnCount[iColumn]=2; … … 4138 4140 trueNetwork=true; 4139 4141 for (iColumn=0;iColumn<numberColumns_;iColumn++) { 4140 if (CoinAbs( columnCount[iColumn])==1) {4142 if (CoinAbs(static_cast<int>(columnCount[iColumn]))==1) { 4141 4143 trueNetwork=false; 4142 4144 break; … … 4172 4174 else 4173 4175 iState = -1; 4174 rotate[iRow]= iState;4176 rotate[iRow]=static_cast<char>(iState); 4175 4177 } else { 4176 4178 rotate[iRow]=-1; -
stable/1.8/Clp/src/ClpNonLinearCost.cpp
r1197 r1263 784 784 for (iSequence=0;iSequence<numberTotal;iSequence++) { 785 785 double value=solution[iSequence]; 786 intiStatus = status_[iSequence];786 unsigned char iStatus = status_[iSequence]; 787 787 assert (currentStatus(iStatus)==CLP_SAME); 788 788 double lowerValue=lower[iSequence]; … … 989 989 int numberTotal = numberColumns_+numberRows_; 990 990 for (iSequence=0;iSequence<numberTotal;iSequence++) { 991 intiStatus = status_[iSequence];991 unsigned char iStatus = status_[iSequence]; 992 992 assert (currentStatus(iStatus)==CLP_SAME); 993 993 double lowerValue=lower[iSequence]; … … 1060 1060 double alpha = multiplier*array[iRow]; 1061 1061 double value = solution[iSequence]; 1062 intiStatus = status_[iSequence];1062 unsigned char iStatus = status_[iSequence]; 1063 1063 int iWhere = currentStatus(iStatus); 1064 1064 if (iWhere==CLP_SAME) … … 1146 1146 int iSequence = pivotVariable[iRow]; 1147 1147 double value = solution[iSequence]; 1148 intiStatus = status_[iSequence];1148 unsigned char iStatus = status_[iSequence]; 1149 1149 int iWhere = currentStatus(iStatus); 1150 1150 int original = originalStatus(iStatus); … … 1256 1256 int iSequence = pivotVariable[iRow]; 1257 1257 double value=solution[iSequence]; 1258 intiStatus = status_[iSequence];1258 unsigned char iStatus = status_[iSequence]; 1259 1259 assert (currentStatus(iStatus)==CLP_SAME); 1260 1260 double lowerValue=lower[iSequence]; … … 1369 1369 int iSequence = pivotVariable[iRow]; 1370 1370 double value=solution[iSequence]; 1371 intiStatus = status_[iSequence];1371 unsigned char iStatus = status_[iSequence]; 1372 1372 assert (currentStatus(iStatus)==CLP_SAME); 1373 1373 double lowerValue=lower[iSequence]; … … 1512 1512 double * lower = model_->lowerRegion(); 1513 1513 double * cost = model_->costRegion(); 1514 intiStatus = status_[iSequence];1514 unsigned char iStatus = status_[iSequence]; 1515 1515 assert (currentStatus(iStatus)==CLP_SAME); 1516 1516 double lowerValue=lower[iSequence]; … … 1713 1713 double * lower = model_->lowerRegion(); 1714 1714 double * cost = model_->costRegion(); 1715 intiStatus = status_[iSequence];1715 unsigned char iStatus = status_[iSequence]; 1716 1716 assert (currentStatus(iStatus)==CLP_SAME); 1717 1717 double lowerValue=lower[iSequence]; -
stable/1.8/Clp/src/ClpNonLinearCost.hpp
r1055 r1263 42 42 { return (status>>4);} 43 43 inline 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 } 45 48 inline 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 } 47 53 inline void setInitialStatus(unsigned char &status) 48 { status = CLP_FEASIBLE | (CLP_SAME<<4);}54 { status = static_cast<unsigned char>(CLP_FEASIBLE | (CLP_SAME<<4)); } 49 55 inline 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 } 51 60 // Use second version to get more speed 52 61 //#define FAST_CLPNON … … 220 229 rhs = saveRhs; 221 230 #endif 222 intiStatus = status_[sequence];231 unsigned char iStatus = status_[sequence]; 223 232 int iWhere = currentStatus(iStatus); 224 233 if (iWhere==CLP_SAME) -
stable/1.8/Clp/src/ClpPackedMatrix.cpp
r1219 r1263 2071 2071 } 2072 2072 } 2073 usefulRow[iRow]= useful;2073 usefulRow[iRow]=static_cast<char>(useful); 2074 2074 } 2075 2075 } … … 3622 3622 abort(); 3623 3623 } 3624 column_[j]= iColumn-start;3624 column_[j]=static_cast<unsigned short>(iColumn-start); 3625 3625 nFound++; 3626 3626 if (lastFound) { … … 3634 3634 } 3635 3635 } 3636 count_[iRow*numberBlocks_+iBlock]= nFound;3636 count_[iRow*numberBlocks_+iBlock]=static_cast<unsigned short>(nFound); 3637 3637 if (!nFound) 3638 3638 nZero++; -
stable/1.8/Clp/src/ClpSimplex.hpp
r1202 r1263 841 841 { 842 842 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); 845 845 } 846 846 /// Start or reset using maximumRows_ and Columns_ - true if change … … 941 941 { 942 942 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)); 945 945 } 946 946 inline FakeBound getFakeBound(int sequence) const … … 949 949 { 950 950 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); 953 953 } 954 954 inline Status getRowStatus(int sequence) const … … 957 957 { 958 958 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); 961 961 } 962 962 inline Status getColumnStatus(int sequence) const 963 963 {return static_cast<Status> (status_[sequence]&7);} 964 964 inline void setPivoted( int sequence) 965 { status_[sequence] |= 32;}965 { status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32);} 966 966 inline void clearPivoted( int sequence) 967 { status_[sequence] &= ~32;}967 { status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32);} 968 968 inline bool pivoted(int sequence) const 969 969 {return (((status_[sequence]>>5)&1)!=0);} … … 972 972 inline void clearFlagged( int sequence) 973 973 { 974 status_[sequence] &= ~64;974 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64); 975 975 } 976 976 inline bool flagged(int sequence) const … … 979 979 inline void setActive( int iRow) 980 980 { 981 status_[iRow] |= 128;981 status_[iRow] = static_cast<unsigned char>(status_[iRow] | 128); 982 982 } 983 983 inline void clearActive( int iRow) 984 984 { 985 status_[iRow] &= ~128;985 status_[iRow] = static_cast<unsigned char>(status_[iRow] & ~128); 986 986 } 987 987 inline bool active(int iRow) const -
stable/1.8/Clp/src/ClpSolve.cpp
r1236 r1263 3094 3094 } 3095 3095 #endif 3096 charway = 1-wayIn+4*(1-wayOut);3096 int way = 1-wayIn+4*(1-wayOut); 3097 3097 //obj_[i]=model_->objectiveValue(); 3098 3098 in_[CLP_CYCLE-1]=in; 3099 3099 out_[CLP_CYCLE-1]=out; 3100 way_[CLP_CYCLE-1]= way;3100 way_[CLP_CYCLE-1]=static_cast<char>(way); 3101 3101 return matched; 3102 3102 } -
stable/1.8/Clp/src/Idiot.cpp
r1197 r1263 1160 1160 } 1161 1161 double fixTolerance=IDIOT_FIX_TOLERANCE; 1162 double startTime = CoinCpuTime();1162 // double startTime = CoinCpuTime(); unused? 1163 1163 ClpSimplex * saveModel=NULL; 1164 1164 ClpMatrixBase * matrix = model_->clpMatrix(); … … 1527 1527 saveLower=NULL; 1528 1528 } 1529 #ifdef COIN_DEVELOP 1529 1530 printf("Time so far %g, %d now added from previous iterations\n", 1530 1531 CoinCpuTime()-startTime,n); 1532 #endif 1531 1533 if (addAll) 1532 1534 presolve=0; … … 1566 1568 saveUpper=NULL; 1567 1569 saveLower=NULL; 1570 #ifdef COIN_DEVELOP 1568 1571 printf("Time so far %g, %d now added from previous iterations\n", 1569 1572 CoinCpuTime()-startTime,n); 1573 #endif 1570 1574 } 1571 1575 if (presolve) { … … 1592 1596 } 1593 1597 } 1598 #ifdef COIN_DEVELOP 1594 1599 printf("Total time in crossover %g\n", CoinCpuTime()-startTime); 1600 #endif 1595 1601 delete [] saveUpper; 1596 1602 delete [] saveLower;
Note: See TracChangeset
for help on using the changeset viewer.