Be sure to use 64bit uints.
Memset wholeMatrix to erase any data that was there before.