Skip to content

Commit

Permalink
Types: Mark intrinsic functions on symbol-attrs for scheduler lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange05 committed Oct 28, 2024
1 parent ec3bbe6 commit be1be5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion loki/batch/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def _dependencies(self):
inline_calls = tuple({
call.function.name: call.function
for call in FindInlineCalls().visit(self.ir.ir)
if isinstance(call.function, ProcedureSymbol) and not call.function.type.dtype.is_intrinsic
if isinstance(call.function, ProcedureSymbol) and not call.function.type.is_intrinsic
}.values())
imports = tuple(
imprt for imprt in self.ir.imports
Expand Down
2 changes: 1 addition & 1 deletion loki/frontend/fparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,7 @@ def visit_Intrinsic_Function_Reference(self, o, **kwargs):
proc_type = ProcedureType(
name=pname, is_function=True, is_intrinsic=True, procedure=None
)
kwargs['scope'].symbol_attrs[pname] = SymbolAttributes(dtype=proc_type)
kwargs['scope'].symbol_attrs[pname] = SymbolAttributes(dtype=proc_type, is_intrinsic=True)

# Look up the function symbol
name = self.visit(o.children[0], **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion loki/frontend/omni.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ def visit_functionCall(self, o, **kwargs):
proc_type = ProcedureType(
name=pname, is_function=True, is_intrinsic=True, procedure=None
)
kwargs['scope'].symbol_attrs[pname] = SymbolAttributes(dtype=proc_type)
kwargs['scope'].symbol_attrs[pname] = SymbolAttributes(dtype=proc_type, is_intrinsic=True)

if o.find('name') is not None:
name = self.visit(o.find('name'), **kwargs)
Expand Down

0 comments on commit be1be5c

Please sign in to comment.