mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-02 08:44:12 +08:00
Marked the And and Or reducers as stateless.
This commit is contained in:
parent
91e1375ba9
commit
7a01cb8e4b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user