HI,
In the release notes for 18.10, the issue with array operations with the new 2003 allocatables are mentioned:
real, allocatable, dimension(:) :: a, b
allocate(a(100), b(100))
a = 3.14
!$acc kernels
a = b
!$acc end kernels
The example code can be modified to use an array section assignment instead; the compiler can parallelize the array section assignment and the lost performance is regained.
a(:) = b(:)
My question is: Does the trick of using “(:)” work to avoid the slowdown for scalar assignments as well?
Such as:
a(:)=1.0
?