Implementation of Airy Function Using Graphics Processing Unit (GPU)
Total Page:16
File Type:pdf, Size:1020Kb
ITM Web of Conferences 32, 03052 (2020) https://doi.org/10.1051/itmconf/20203203052 ICACC-2020 Implementation of Airy function using Graphics Processing Unit (GPU) Yugesh C. Keluskar1, Megha M. Navada2, Chaitanya S. Jage3 and Navin G. Singhaniya4 Department of Electronics Engineering, Ramrao Adik Institute of Technology, Nerul, Navi Mumbai. Email : [email protected], [email protected], [email protected], [email protected] Abstract—Special mathematical functions are an integral part Airy function is the solution to Airy differential equa- of Fractional Calculus, one of them is the Airy function. But tion,which has the following form [22]: it’s a gruelling task for the processor as well as system that is constructed around the function when it comes to evaluating the d2y special mathematical functions on an ordinary Central Processing = xy (1) Unit (CPU). The Parallel processing capabilities of a Graphics dx2 processing Unit (GPU) hence is used. In this paper GPU is used to get a speedup in time required, with respect to CPU time for It has its applications in classical physics and mainly evaluating the Airy function on its real domain. The objective quantum physics. The Airy function also appears as the so- of this paper is to provide a platform for computing the special lution to many other differential equations related to elasticity, functions which will accelerate the time required for obtaining the heat equation, the Orr-Sommerfield equation, etc in case of result and thus comparing the performance of numerical solution classical physics. While in the case of Quantum physics,the of Airy function using CPU and GPU. most well-known application of this equation is while solving Keywords- GPU, CPU, Airy function, Speedup. WKB approximation problem [3],[24]. Taking a few steps we can arrive at the Airy Differential equation as given below. The following is the One-Dimensional Time Independent Schrodinger’s¨ equation I. INTRODUCTION Fractional calculus (FC) is a field of mathematics that deals −¯h2 d2ψ(x) + V (x)ψ(x)=Enψ(x) (2) with derivatives and integrals of arbitrary non-integer order. 2m dx2 It is being used in engineering domain extensively due to its ability to model real-world systems more accurately than its in- Where ψ(x) is the wave-function, ¯h is the reduced Planck’s teger order variant. It is a topic which is around 320 years old!. constant (Dirac constant), m being mass of the particle, V (x) The inception of this field can be attributed to a letter written to is the potential function and E is the total energy. This equation Guillaume de l’Hopital by Gottfried Leibniz in the year 1695 in basically says that Kinetic Energy + Potential Energy = Total which he mentions about fractional order derivatives, see [26], Energy, and that is what each term in this equation signifies. one can also find the foundational work of Fractional calculus When we consider a triangular potential well i.e V (x)=qεx in the early papers of Niels Henrik Abel [27]. But due to its (q is charge of particle and ε is the electric field strength), we mathematically intricate and cumbersome nature it remained arrive at the following equation mostly unexplored for many years until 1974 when the “First Conference on Fractional Calculus and its Applications” was For x>0, n =1, 2, .. held at the University of New Haven,Connecticut [28]. In recent years applications of this are growing nowadays in −¯h2 d2ψ(x) + qεxψ(x)=Enψ(x) (3) a rapid manner as there is a community of researchers that 2m dx2 have came together to revive this field with the help of when advanced computing technology [1],[2]. As mentioned before The above equation is the same as equation (1) with using this mathematical technique, the scope of describing some constant terms mugging up the equation of which the a real object is more accurate as compared to the classi- Airy function is the solution. Hence we can say that for cal integer-order methods. The replacement of integer orders the Schrodinger¨ equation with triangular potential well’s case with fractional orders has resulted into various realistic and the solution is Airy function. However, to our knowledge, compact model in the field of various physical, engineering, the computational complexity of such Special Mathematical automation, biomedical, chemical engineering according to the Functions included in the fractional calculus increases when mention made in this book [13], The function can be called long time vectors are considered while implementing. It is a “Special Function” only when it has the ability to be useful interesting to make a platform which will allow us to speedup in some applications and satisfies certain special properties. the performance rate and thus use it in various hardware Some commonly used special functions are Gamma, Gauss implementations of the functions. This process cannot be Hypergeometric, Airy, Bessel,etc [2]. automated as the definition of the function is supposed to be © The Authors, published by EDP Sciences. This is an open access article distributed under the terms of the Creative Commons Attribution License 4.0 (http://creativecommons.org/licenses/by/4.0/). ITM Web of Conferences 32, 03052 (2020) https://doi.org/10.1051/itmconf/20203203052 ICACC-2020 written from scratch by a human, hence human intervention is The numerical calculation of Airy function was very tricky required. For this purpose the concept of parallel computing back in those days and even nowadays it is so. But in 1838, plays a crucial role. In parallel computing, many arithmetic the values of W for m varying from -4.0 to 4.0 were given by and logical operations are carried out simultaneously using Airy and in the year it was given for values ranging from -5.6 multi-core processors. Traditionally, parallel computing has to 5.6. The problem which arose was that the series converges been carried out using the CPU with a handful of cores. But, slowly as m increases [3]. In 1982, a scientist named Jeffrey’s we are using the capabilities of multi-core graphics processors introduced the notation Ai(x) which is used nowadays as for parallel computing. ∞ 1 t3 Even though the original purpose of GPU is for graphics Ai(x)= cos( + xt)dt (5) rendering, in recent years the GPU is increasingly being used π 0 2 for scientific computations. This practice of using GPU for general purpose computations is called General Purpose Com- Two linearly independent solutions of equation (1) which puting on Graphics Processing Unit (GPGPU) Technology. In are real when x is real are Ai(x) and Bi(x). For the function paper [4] a parallel GPU solution of the Caputo fractional Bi(x), the integral representation is, reaction-diffusion equation in one spatial dimension with ex- ∞ 3 3 plicit finite difference approximation has been provided. The 1 −t t optimized GPU solution obtained is faster than the optimized Bi(x)= e 3+xt + sin( + xt)dt (6) π 3 parallel CPU solution. So the power of parallel computing on 0 GPU for solving fractional applications can be recognized. The paper, see [5] gives a description of the numerical approach The solutions Ai(x) and Bi(x) satisfy the initial conditions 2 that has been done for the evolution of algorithms which can 3 3 do multiple operations in a given time, in order to solve the Ai(0) = 2 (7) fractional differential equations. The procedure accepted is Γ( 3 ) to fit the existing numerical schemes and to develop model −1 parallel algorithms by utilising Parallel Computing toolbox of 3 6 Bi(0) = (8) MATLAB. Unlike CPU, Graphics Processing Unit has parallel Γ( 2 ) arrays of hundreds of smaller processors which function in 3 parallel. We have utilised this parallel architecture of GPU to Also the behaviour of the first kind of Airy function which is accelerate the execution of the above mentioned special func- Ai(x) can be described as follows: tion. The solution methods for fractional differential equations For negative values, it has an oscillatory behaviour while are not present. This absence is the main reason behind using for positive values, it exponentially decays. It is also observed the models of integer-order. In recent years, the field Fractional that there is an interesting and unique smooth transition be- Calculus and its applications have drawn the interest of many tween the oscillatory behaviour and exponential decay without authors. any abrupt change in the transition. The rest of the paper is organized as follows: In section For the 2nd kind of Airy function Bi(x) the behaviour for 2, the basic concept of Airy function has been presented negative values is the same as the 1st kind but it is with a phase briefly. In section 3, a detailed explanation of GPU architecture π shift of 2 and for positive values it grows exponentially. Airy has been written which also includes the tools for MATLAB function is related to Bessel Functions [25] of non integer order computing with GPU. Section 4 represents the implementation of first kind Jα(x) and to non integer order of modified Bessel steps which were performed while designing the algorithm. 1 function Iα(x) and Kα(x) of order 3 which is implemented Finally all the results are given in section 5 and the conclusions 2 3 with change of the variable ζ x 2 . The relation between drawn from this work are presented in section 6. = 3 Airy functions and Bessel functions for x>0 is given as II. BASIC CONCEPT OF AIRY FUNCTION 1 x 2 3 Ai(x)= K 1 ( x 2 ) (9) The Airy function is named after Sir George Bidell Airy π 3 3 3 [3].He stumbled upon this following integral while calculating the intensity of light in the neighbourhood of a caustic.