[Coin-discuss] little problem solved in ClpPackedMatrix.cpp
Rolf Steenge
rolf_steenge at planet.nl
Mon Jun 28 13:44:48 EDT 2004
Dear Coin,
I found a small problem in the program ClpPackedMatrix.cpp in the function ClpPackedMatrix::scale:
Original code:
#ifndef NO_RTTI
ClpQuadraticObjective * quadraticObj = (dynamic_cast< ClpQuadraticObjective*>(obj));
#else
ClpQuadraticObjective * quadraticObj = NULL;
if (obj->type()==2)
quadraticObj = (static_cast< ClpQuadraticObjective*>(obj));
#endif
I have NO_RTTI in my project settings (MS visual C++ V6, Windows/XP) and ran into the debugger, because obj->type() was 1 and not 2. So I changed the code in line with the RTTI case and had no more problems:
ClpQuadraticObjective * quadraticObj = NULL;
#ifndef NO_RTTI
if (obj->type()==2)
quadraticObj = (ClpQuadraticObjective*)obj;
#else
if (obj->type()==2)
quadraticObj = (static_cast< ClpQuadraticObjective*>(obj));
#endif
Another question: would it be helpful to run the profiler to see what the most cpu demanding functions are and then try to adapt these functions in order to improve overall performance. Or is this something that already has been done?
Regards
Rolf Steenge
Archipel 3619
8224 HL Lelystad
the Netherlands
Europe
mail rolf_steenge at planet.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20040628/61963a1a/attachment.html>
More information about the Coin-discuss
mailing list