The prevalence of hardware accelerators has increased due to the steady progress in deep learning. It is therefore desirable to use all available hardware accelerators to speed up the evaluation of special functions, which play a crucial role in scientific computing.In this contribution, we propose a method for evaluating special functions using rational approximation, which has a high instruction throughput across a wide range of hardware accelerators when implemented in OpenCL. We describe how the best rational approximation by successive interval length adjustment (BRASIL) algorithm (Numer. Algorithms 88.1 (2021): 365-388) can be used to obtain a compact rational approximation to a special function that provides excellent control of the accuracy. We assess the performance of the proposal using the confluent hypergeometric function.