CUDA: transfer non-const Masks to GPU.
Update tests to use new Mask syntax.