Added higher order sim functions so that a uniform vectorizer can be used.