fix readcost for complex types

This commit is contained in:
Thomas Capricelli 2010-05-26 02:33:28 +02:00
parent e7dc772554
commit 4a2d6ece2e

View File

@ -113,7 +113,7 @@ template<typename _Real> struct NumTraits<std::complex<_Real> >
typedef _Real Real;
enum {
IsComplex = 1,
ReadCost = 2,
ReadCost = 2 * NumTraits<_Real>::ReadCost,
AddCost = 2 * NumTraits<Real>::AddCost,
MulCost = 4 * NumTraits<Real>::MulCost + 2 * NumTraits<Real>::AddCost
};