brintos

brintos / llvm-project-archived public Read only

0
0
Text · 859 B · 6d9c497 Raw
37 lines · plain
1! Offloading test checking interaction of pointer and target with target where2! 3-D bounds have been specified3! REQUIRES: flang, amdgpu4 5! RUN: %libomptarget-compile-fortran-run-and-check-generic6program main7    integer, pointer :: inArray(:,:,:)8    integer, pointer :: outArray(:,:,:)9    integer, target :: in(3,3,3)10    integer, target :: out(3,3,3)11 12    inArray => in13    outArray => out14 15    do i = 1, 316      do j = 1, 317        do k = 1, 318            inArray(i, j, k) = 4219            outArray(i, j, k) = 020        end do21       end do22    end do23 24!$omp target map(tofrom:inArray(1:3, 1:3, 2:2), outArray(1:3, 1:3, 1:3))25    do j = 1, 326      do k = 1, 327        outArray(k, j, 2) = inArray(k, j, 2)28      end do29    end do30!$omp end target31 32 print *, outArray33 34end program35 36! CHECK: 0 0 0 0 0 0 0 0 0 42 42 42 42 42 42 42 42 42 0 0 0 0 0 0 0 0 037