Marked the And and Or reducers as stateless.

This commit is contained in:
Benoit Steiner 2016-02-24 16:43:01 -08:00
parent 91e1375ba9
commit 7a01cb8e4b

View File

@ -240,6 +240,8 @@ template <typename T> struct ProdReducer
struct AndReducer
{
static const bool PacketAccess = false;
static const bool IsStateful = false;
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(bool t, bool* accum) const {
*accum = *accum && t;
}
@ -253,6 +255,8 @@ struct AndReducer
struct OrReducer {
static const bool PacketAccess = false;
static const bool IsStateful = false;
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(bool t, bool* accum) const {
*accum = *accum || t;
}