This isn’t official, but sin at least seems to work in accelerator pragma space:
(246) > cat test.F90
program test
implicit none
complex, dimension(10,10) :: theta,sintheta,hostsintheta
integer :: i, j
do i = 1, 10
do j = 1, 10
theta(i,j) = cmplx(real(i),real(j))
end do
end do
hostsintheta = sin(theta)
!$acc region
do i = 1, 10
do j = 1, 10
sintheta(i,j) = sin(theta(i,j))
end do
end do
!$acc end region
write (*,*) 'sin(theta) on accelerator: ', sintheta(1,:)
write (*,*) 'sin(theta) on host : ', hostsintheta(1,:)
end program test
(247) > pgfortran -ta=nvidia,time -Minfo=all test.F90
test:
16, Generating copyout(sintheta(:,:))
Generating copyin(theta(:,:))
Generating compute capability 1.0 binary
Generating compute capability 2.0 binary
17, Loop is parallelizable
18, Loop is parallelizable
Accelerator kernel generated
17, !$acc do parallel, vector(10) ! blockidx%x threadidx%x
18, !$acc do parallel, vector(10) ! blockidx%y threadidx%y
CC 1.0 : 15 registers; 40 shared, 160 constant, 56 local memory bytes
CC 2.0 : 20 registers; 8 shared, 140 constant, 4 local memory bytes
(248) > ./a.out
sin(theta) on accelerator: (1.298458,0.6349639) (3.165779,1.959601)
(8.471646,5.412681) (22.97909,14.74480) (62.44553,40.09216)
(169.7379,108.9861) (461.3929,296.2565) (1254.195,805.3091)
(3409.255,2189.057) (9267.316,5950.475)
sin(theta) on host : (1.298458,0.6349639) (3.165779,1.959601)
(8.471645,5.412681) (22.97909,14.74480) (62.44552,40.09216)
(169.7379,108.9861) (461.3929,296.2564) (1254.195,805.3091)
(3409.255,2189.057) (9267.316,5950.475)
Accelerator Kernel Timing data
/home/mathomp4/F90Files/ComplexSin/test.F90
test
16: region entered 1 time
time(us): total=314182 init=313134 region=1048
kernels=27 data=145
w/o init: total=1048 max=1048 min=1048 avg=1048
18: kernel launched 1 times
grid: [1] block: [10x10]
time(us): total=27 max=27 min=27 avg=27