Added to possibility to compile unit tests at maximum warning level.

Silenced (amongst others) many conversion related warnings.
This commit is contained in:
Hauke Heibel
2009-12-12 11:39:07 +01:00
parent 494a88685e
commit d088ee35f6
38 changed files with 135 additions and 44 deletions

View File

@@ -111,6 +111,9 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
protected:
ExpressionTypeNested m_matrix;
private:
Flagged& operator=(const Flagged&);
};
/** \deprecated it is only used by lazy() which is deprecated

View File

@@ -150,8 +150,10 @@ template<typename MatrixType, unsigned int UpLo> class SelfAdjointView
const LDLT<PlainMatrixType> ldlt() const;
protected:
const typename MatrixType::Nested m_matrix;
private:
SelfAdjointView& operator=(const SelfAdjointView&);
};

View File

@@ -210,15 +210,15 @@ template<typename T, bool Align> inline void ei_conditional_aligned_delete(T *pt
}
/** \internal \returns the number of elements which have to be skipped such that data are 16 bytes aligned */
template<typename Scalar>
inline static int ei_alignmentOffset(const Scalar* ptr, int maxOffset)
template<typename Scalar, typename Integer>
inline static Integer ei_alignmentOffset(const Scalar* ptr, Integer maxOffset)
{
typedef typename ei_packet_traits<Scalar>::type Packet;
const int PacketSize = ei_packet_traits<Scalar>::size;
const int PacketAlignedMask = PacketSize-1;
const Integer PacketSize = ei_packet_traits<Scalar>::size;
const Integer PacketAlignedMask = PacketSize-1;
const bool Vectorized = PacketSize>1;
return Vectorized
? std::min<int>( (PacketSize - (int((size_t(ptr)/sizeof(Scalar))) & PacketAlignedMask))
? std::min<Integer>( (PacketSize - (Integer((Integer(ptr)/sizeof(Scalar))) & PacketAlignedMask))
& PacketAlignedMask, maxOffset)
: 0;
}