- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Considering
real A(10000), B(10000)
If A and B are on host (CPU), copying A to B is easy:
B=A
What if A and B are on device (GPU) ? Code below is not neat enough:
!$OMP TARGET DEFAULTMAP(present: aggregate)
!$OMP TEAMS DISTRIBUTE PARALLEL DO
do i=1,10000
B(i)=A(i)
enddo
!$OMP END TARGET
Is there any neat expression?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OpenMP doesn't recognize Fortran array expressions as loopnests, to allow them under OMP DO directives.
What you have here is about the "neatest" idiom you can use.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OpenMP doesn't recognize Fortran array expressions as loopnests, to allow them under OMP DO directives.
What you have here is about the "neatest" idiom you can use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>OpenMP doesn't recognize Fortran array expressions as loopnests,
This should be fixable. IOW the language features supported on the host should be available on the target.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page