uncommented double matrix check which should be the default
first attempt to get rid of if(usegpu_flag) in monomials