Implementing Mahalanobis Distance Computation on GPUs for portability