modified grid/matrix major check by exception throw in eigen_s/eigen_sx