mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Partially Vectorize Cast
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
7d7576f326
commit
59b3ef5409
@@ -430,6 +430,13 @@ struct cast_impl
|
||||
}
|
||||
};
|
||||
|
||||
template <typename OldType>
|
||||
struct cast_impl<OldType, bool> {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static inline bool run(const OldType& x) { return x != OldType(0); }
|
||||
};
|
||||
|
||||
|
||||
// Casting from S -> Complex<T> leads to an implicit conversion from S to T,
|
||||
// generating warnings on clang. Here we explicitly cast the real component.
|
||||
template<typename OldType, typename NewType>
|
||||
|
||||
Reference in New Issue
Block a user