|
14 | 14 |
|
15 | 15 | #:def ALLOCATE(*args) |
16 | 16 | @:LOG({'@:ALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'}) |
17 | | - allocate (${', '.join(args)}$) |
18 | | - !$acc enter data create(${', '.join(args)}$) |
| 17 | + #:set allocated_variables = ', '.join(args) |
| 18 | + allocate (${allocated_variables}$) |
| 19 | + $:GPU_ENTER_DATA(create=('[' + allocated_variables + ']')) |
19 | 20 | #:enddef ALLOCATE |
20 | 21 |
|
21 | 22 | #:def DEALLOCATE(*args) |
22 | 23 | @:LOG({'@:DEALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'}) |
23 | | - !$acc exit data delete(${', '.join(args)}$) |
24 | | - deallocate (${', '.join(args)}$) |
| 24 | + #:set allocated_variables = ', '.join(args) |
| 25 | + $:GPU_EXIT_DATA(delete=('[' + allocated_variables + ']')) |
| 26 | + deallocate (${allocated_variables}$) |
25 | 27 | #:enddef DEALLOCATE |
26 | 28 |
|
27 | 29 | #:def ACC_SETUP_VFs(*args) |
|
32 | 34 | @:LOG({'@:ACC_SETUP_VFs(${', '.join(args)}$)'}) |
33 | 35 |
|
34 | 36 | #:for arg in args |
35 | | - !$acc enter data copyin(${arg}$) |
36 | | - !$acc enter data copyin(${arg}$%vf) |
| 37 | + $:GPU_ENTER_DATA(copyin=('[' + arg + ']')) |
| 38 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%vf]')) |
37 | 39 | if (allocated(${arg}$%vf)) then |
38 | 40 | do macros_setup_vfs_i = lbound(${arg}$%vf, 1), ubound(${arg}$%vf, 1) |
39 | 41 | if (associated(${arg}$%vf(macros_setup_vfs_i)%sf)) then |
40 | | - !$acc enter data copyin(${arg}$%vf(macros_setup_vfs_i)) |
41 | | - !$acc enter data create(${arg}$%vf(macros_setup_vfs_i)%sf) |
| 42 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%vf(macros_setup_vfs_i)]')) |
| 43 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%vf(macros_setup_vfs_i)%sf]')) |
42 | 44 | end if |
43 | 45 | end do |
44 | 46 | end if |
|
54 | 56 | @:LOG({'@:ACC_SETUP_SFs(${', '.join(args)}$)'}) |
55 | 57 |
|
56 | 58 | #:for arg in args |
57 | | - !$acc enter data copyin(${arg}$) |
| 59 | + $:GPU_ENTER_DATA(copyin=('[' + arg + ']')) |
58 | 60 | if (associated(${arg}$%sf)) then |
59 | | - !$acc enter data create(${arg}$%sf) |
| 61 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%sf]')) |
60 | 62 | end if |
61 | 63 | #:endfor |
62 | 64 | end block |
|
70 | 72 | @:LOG({'@:ACC_SETUP_source_spatials(${', '.join(args)}$)'}) |
71 | 73 |
|
72 | 74 | #:for arg in args |
73 | | - !$acc enter data copyin(${arg}$) |
| 75 | + $:GPU_ENTER_DATA(copyin=('[' + arg + ']')) |
74 | 76 | if (allocated(${arg}$%coord)) then |
75 | | - !$acc enter data create(${arg}$%coord) |
| 77 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%coord]')) |
76 | 78 | end if |
77 | 79 | if (allocated(${arg}$%val)) then |
78 | | - !$acc enter data create(${arg}$%val) |
| 80 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%val]')) |
79 | 81 | end if |
80 | 82 | if (allocated(${arg}$%angle)) then |
81 | | - !$acc enter data create(${arg}$%angle) |
| 83 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%angle]')) |
82 | 84 | end if |
83 | 85 | if (allocated(${arg}$%xyz_to_r_ratios)) then |
84 | | - !$acc enter data create(${arg}$%xyz_to_r_ratios) |
| 86 | + $:GPU_ENTER_DATA(copyin=('[' + arg + '%xyz_to_r_ratios]')) |
85 | 87 | end if |
86 | 88 | #:endfor |
87 | 89 | end block |
|
0 commit comments