moves matrices to uint16 entries,
switch to float entries possible via mat/rmat typedef in matrix.h