mscash-cuda. Update valid() and prepare() from CPU format.
Closes #942