Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
openacc [2016/12/05 18:37] – [Benchmarks] adminopenacc [2022/05/24 16:07] (Version actuelle) – admin
Ligne 1: Ligne 1:
 +FIXME Broken 
 +
 ====== OpenACC by example ====== ====== OpenACC by example ======
  
Ligne 78: Ligne 80:
 A parallel function A parallel function
 that runs on the **GPU**</note> that runs on the **GPU**</note>
-<note>Most often **parallel** will be used as **parallel loop**</note>+<note>Most often **parallel** directive will be used as **parallel loop**</note>
 ==== Kernels Directive ==== ==== Kernels Directive ====
 The kernels construct expresses that a region may contain parallelism and the compiler determines what can safely be The kernels construct expresses that a region may contain parallelism and the compiler determines what can safely be
Ligne 124: Ligne 126:
 !$acc data !$acc data
 do i=1,n do i=1,n
-a(i) = 0.0 +  a(i) = 0.0 
-b(i) = 1.0 +  b(i) = 1.0 
-c(i) = 2.0+  c(i) = 2.0
 end do end do
 +
 do i=1,n do i=1,n
-a(i) = b(i) + c(i)+  a(i) = b(i) + c(i)
 end do end do
 +
 !$acc end data !$acc end data
 </code> </code>
Ligne 139: Ligne 143:
 === Data clause === === Data clause ===
  
-|''copy (list)''|Allocates memory on GPU and copies data from host to GPU when entering region and copies data to the host when exiting region| +|''copy (list)'' |Allocates memory on GPU and copies data from host to GPU when entering region and copies data to the host when exiting region| 
-|''copyin ( list )''| Allocates memory on GPU and copies data from host to GPU when entering region| +|''copyin ( list )'' | Allocates memory on GPU and copies data from host to GPU when entering region| 
-|''copyout ( list )''|Allocates memory on GPU and copies data to the host when exiting region| +|''copyout ( list )'' |Allocates memory on GPU and copies data to the host when exiting region| 
-|''create ( list )''|Allocates memory on GPU but does not copy| +|''create ( list )'' |Allocates memory on GPU but does not copy| 
-|''present ( list )''|Data is already present on GPU from another containing data region|+|''present ( list )'' |Data is already present on GPU from another containing data region|
  
 ===== Compile & Run===== ===== Compile & Run=====
  • openacc.1480963048.txt.gz
  • Dernière modification : 2016/12/05 18:37
  • de admin