do not add regularize option when not specified
Limit the # of template based loop to avoid instantiation limit
workaround for gcc with deeper templates which is introduced by gcc in xcode 5