Partially Vectorize Cast

This commit is contained in:
Charles Schlosser
2023-06-09 16:54:31 +00:00
committed by Rasmus Munk Larsen
parent 7d7576f326
commit 59b3ef5409
14 changed files with 1051 additions and 399 deletions

View File

@@ -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>