mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Added NumTraits for type2index.
This commit is contained in:
parent
4f1a7e51c1
commit
791e5cfb69
@ -45,6 +45,23 @@ struct type2index {
|
||||
}
|
||||
};
|
||||
|
||||
template<DenseIndex n> struct NumTraits<type2index<n> >
|
||||
{
|
||||
typedef DenseIndex Real;
|
||||
enum {
|
||||
IsComplex = 0,
|
||||
RequireInitialization = false,
|
||||
ReadCost = 1,
|
||||
AddCost = 1,
|
||||
MulCost = 1
|
||||
};
|
||||
|
||||
EIGEN_DEVICE_FUNC static inline Real epsilon() { return 0; }
|
||||
EIGEN_DEVICE_FUNC static inline Real dummy_precision() { return 0; }
|
||||
EIGEN_DEVICE_FUNC static inline Real highest() { return n; }
|
||||
EIGEN_DEVICE_FUNC static inline Real lowest() { return n; }
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
template <typename T>
|
||||
EIGEN_DEVICE_FUNC void update_value(T& val, DenseIndex new_val) {
|
||||
|
Loading…
Reference in New Issue
Block a user