Antonio Sanchez 1e6c6c1576 Replace memset with fill to work for non-trivial scalars.
For custom scalars, zero is not necessarily represented by
a zeroed-out memory block (e.g. gnu MPFR). We therefore
cannot rely on `memset` if we want to fill a matrix or tensor
with zeroes. Instead, we should rely on `fill`, which for trivial
types does end up getting converted to a `memset` under-the-hood
(at least with gcc/clang).

Requires adding a `fill(begin, end, v)` to `TensorDevice`.

Replaced all potentially bad instances of memset with fill.

Fixes #2245.
2021-07-08 18:34:41 +00:00
..
2016-01-27 22:48:40 +01:00
2021-03-15 18:42:04 +00:00
2017-11-10 14:11:22 +01:00
2017-11-27 22:11:57 +01:00
2016-01-27 22:48:40 +01:00
2016-01-27 22:48:40 +01:00