mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
'fix' a couple of clang -Wconstant-logical-operand warnings (still not convinced about the pertinence of that warning)
This commit is contained in:
parent
3884308da7
commit
25579df2d4
@ -41,7 +41,7 @@ public:
|
|||||||
DstIsAligned = Derived::Flags & AlignedBit,
|
DstIsAligned = Derived::Flags & AlignedBit,
|
||||||
DstHasDirectAccess = Derived::Flags & DirectAccessBit,
|
DstHasDirectAccess = Derived::Flags & DirectAccessBit,
|
||||||
SrcIsAligned = OtherDerived::Flags & AlignedBit,
|
SrcIsAligned = OtherDerived::Flags & AlignedBit,
|
||||||
JointAlignment = DstIsAligned && SrcIsAligned ? Aligned : Unaligned
|
JointAlignment = bool(DstIsAligned) && bool(SrcIsAligned) ? Aligned : Unaligned
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -106,9 +106,9 @@ public:
|
|||||||
: int(NoUnrolling)
|
: int(NoUnrolling)
|
||||||
)
|
)
|
||||||
: int(Traversal) == int(LinearVectorizedTraversal)
|
: int(Traversal) == int(LinearVectorizedTraversal)
|
||||||
? ( int(MayUnrollCompletely) && int(DstIsAligned) ? int(CompleteUnrolling) : int(NoUnrolling) )
|
? ( bool(MayUnrollCompletely) && bool(DstIsAligned) ? int(CompleteUnrolling) : int(NoUnrolling) )
|
||||||
: int(Traversal) == int(LinearTraversal)
|
: int(Traversal) == int(LinearTraversal)
|
||||||
? ( int(MayUnrollCompletely) ? int(CompleteUnrolling) : int(NoUnrolling) )
|
? ( bool(MayUnrollCompletely) ? int(CompleteUnrolling) : int(NoUnrolling) )
|
||||||
: int(NoUnrolling)
|
: int(NoUnrolling)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ struct redux_impl<Func, Derived, LinearVectorizedTraversal, NoUnrolling>
|
|||||||
const Index packetSize = packet_traits<Scalar>::size;
|
const Index packetSize = packet_traits<Scalar>::size;
|
||||||
const Index alignedStart = first_aligned(mat);
|
const Index alignedStart = first_aligned(mat);
|
||||||
enum {
|
enum {
|
||||||
alignment = (Derived::Flags & DirectAccessBit) || (Derived::Flags & AlignedBit)
|
alignment = bool(Derived::Flags & DirectAccessBit) || bool(Derived::Flags & AlignedBit)
|
||||||
? Aligned : Unaligned
|
? Aligned : Unaligned
|
||||||
};
|
};
|
||||||
const Index alignedSize = ((size-alignedStart)/packetSize)*packetSize;
|
const Index alignedSize = ((size-alignedStart)/packetSize)*packetSize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user