Integral types
Is there a reason why Discrete.h uses std::is_same rather than std::is_integral here?
https://github.com/bab2min/EigenRand/blob/f3190cd7f85c5878c949625cb2811262ff050d66/EigenRand/Dists/Discrete.h#L217
If this is instead std::is_integral<_Scalar>::value, then the discrete generators can also be used for int64_t, uint32_t, etc.
Would this line:
https://github.com/bab2min/EigenRand/blob/f3190cd7f85c5878c949625cb2811262ff050d66/EigenRand/Dists/Discrete.h#L268
need to change to if (bitcnt + bitsize < CHAR_BIT*sizeof(_Scalar))?
As I look further, it seems like there are a decent number of places where other types/constants need to become sizeof-dependent. Is this of interest?
Hi @kc9jud , thank you for your interest in this repository. It is because Discrete generators use some specialized routine for int32_t SIMD. At the time of first implementation, only int32_t was considered, so additional implementations were required to make it work for other integral types. I will add support for other integral types in future updates.