topic declaring as pure? in IntelĀ® oneAPI Math Kernel Library
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811552#M3970
I haven't used the routine you mentioned, but for one I have (to compute normal cdf), I just add the following interface in my (pure) subroutine which calls this.<BR /><BR /><PRE>[fortran]interface
pure subroutine vdcdfnorm(n,a,r)
integer,intent(in) :: n
real(kind=8),intent(in) :: a(n)
real(kind=8),intent(out) :: r(n)
end subroutine
end interface[/fortran]</PRE> <BR />Is this OK?Mon, 24 Oct 2011 14:39:00 GMTtracyx2011-10-24T14:39:00Zdeclaring as pure?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811550#M3968
I'm using some VML routines (for calculating things including the normal cdf, inverse normal cdf). I'd like to call these from functions/subroutines declared as pure. If I change the respective interface block to include the pure keyword, my code compiles and executes as expected. Is this safe? Thanks.Sun, 16 Oct 2011 22:13:50 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811550#M3968tracyx2011-10-16T22:13:50Zdeclaring as pure?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811551#M3969
<P>Hello, </P><P>How do you change the function declaration by adding pure? For example, for the following function, virngpoisson( method, stream, n, r, lambda )</P><P>Only the output vector, and stream may be changed after the function call. It has no other side effect. If they are taken as the output value, it is fine to define the subroutine as pure.</P><P>Thanks,<BR />Chao</P>Wed, 19 Oct 2011 07:17:02 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811551#M3969Chao_Y_Intel2011-10-19T07:17:02Zdeclaring as pure?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811552#M3970
I haven't used the routine you mentioned, but for one I have (to compute normal cdf), I just add the following interface in my (pure) subroutine which calls this.<BR /><BR /><PRE>[fortran]interface
pure subroutine vdcdfnorm(n,a,r)
integer,intent(in) :: n
real(kind=8),intent(in) :: a(n)
real(kind=8),intent(out) :: r(n)
end subroutine
end interface[/fortran]</PRE> <BR />Is this OK?Mon, 24 Oct 2011 14:39:00 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811552#M3970tracyx2011-10-24T14:39:00Zdeclaring as pure?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811553#M3971
Hello, <BR />It is fine for this one. r is the only output forthis function. <BR /><BR />Thanks,<BR />Chao<BR />Mon, 31 Oct 2011 02:16:18 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/declaring-as-pure/m-p/811553#M3971Chao_Y_Intel2011-10-31T02:16:18Z