Avoid raw memory access for high precision types.
Some of the high precision types cannot work correctly with raw memory access functions such as memset
or memcpy
. In fact most of the memset(…)
calls can be replaced with std::fill(…)
calls. This can be done later, because my current approach is to completely not modify current yade behavior for double
type. So in all places the old code is still used when double
type is used, even if it YADE_REAL_BIT is not defined - so this code works as intended even without merging !362 (merged).
Later we can remove some of the #if
clauses and use the generic C++ approach which always is guaranteed to be optimized as much as memset
or memcpy
.