Skip to content

Commit c27fcf2

Browse files
committed
binding/f08: apply ignore_tkr(d) when available
Let nvfortran to ignore the device attribute.
1 parent efcce48 commit c27fcf2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

maint/local_python/binding_f08.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,10 @@ def dump_interface_function(func, name, c_name, is_large):
879879
def dump_mpi_f08(func, is_large):
880880
f08_mapping = get_kind_map('F08', is_large)
881881

882+
def dump_ignore_tkr_d(name, out):
883+
if G.opts['ignore-tkr-d'] == 'dir': # e.g. nvfortran
884+
out.append("!DIR$ IGNORE_TKR(d) " + name)
885+
882886
uses = {}
883887
f_param_list = []
884888
decl_list = []
@@ -889,6 +893,8 @@ def dump_mpi_f08(func, is_large):
889893
f_param_list.append(p['name'])
890894
decl = get_F_decl(p, f08_mapping)
891895
decl_list.append(decl)
896+
if 'ignore-tkr-d' in G.opts and p['kind'] == 'BUFFER':
897+
dump_ignore_tkr_d(p['name'], decl_list)
892898
check_decl_uses(decl, uses)
893899
if 'return' not in func:
894900
f_param_list.append("ierror")

0 commit comments

Comments
 (0)