compiled MKL dist function