OpenACC: Difference between revisions

Jump to navigation Jump to search
Line 21: Line 21:


= Code examples =
= Code examples =
OpenACC can be used in [[Fortran]], [[C]] and [[C++]].
OpenACC can be used in [[Fortran]], [[C]] and [[C++]], which we illustrate here using the simple example of a definite integral to compute an approximation for the value of <math>\pi</math>,
 
<tabs>
<tabs>
<tab name="C">
<tab name="C">
The following example computes an approximation of the transcendental number <math>/pi</math>, using an approximation to a definite integral,
{{File
{{File
   |name=pi.c
   |name=pi.c
Bureaucrats, cc_docs_admin, cc_staff
2,314

edits

Navigation menu