You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compilation error when Scalar is Eigen::half and not float #346
template <typename Scalar>
classMatrixfinal {
......
private:
...........
// The zero_point, i.e. which Scalar value is to be interpreted as zero.// When Scalar is floating-point, this must be 0.
Scalar zero_point_ = 0;
};
I could have something like: Matrix<Eigen::half> myMatrix;
but then at compilation I get error: no viable conversion from 'int' to 'Eigen::half' Scalar zero_point_ = 0; since the zero isn't templatized
integer 0 and float zero are interchangeable so the above code works; but it's not the generic case for templates. I believe an implementation like Scalar zero_point_ = Scalar{0}; is more generic
Similar fixes to other classes and parts of the code?
Activity