Which one is better: kernels or kernels loop

Suppose a subroutine has two loops

loop1
loop2

Which way of writing the OpenACC directives is better? and why?

method 1

!$acc kernels
loop1
loop2
!$end acc kernels

method 2

!$acc kernels loop
loop1
!$acc kernels loop
loop2

Thanks,

Ping

Which way of writing the OpenACC directives is better? and why?

Neither is better than the other. It’s more personal preference and what works better for the particular context.

  • Mat