From be1be5c7d67b0bbd4cea7053af6bc1c6ce5ea85f Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Sat, 26 Oct 2024 05:10:13 +0000 Subject: [PATCH] Types: Mark intrinsic functions on symbol-attrs for scheduler lookup --- loki/batch/item.py | 2 +- loki/frontend/fparser.py | 2 +- loki/frontend/omni.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loki/batch/item.py b/loki/batch/item.py index f8428a3ae..3ce14b39b 100644 --- a/loki/batch/item.py +++ b/loki/batch/item.py @@ -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 diff --git a/loki/frontend/fparser.py b/loki/frontend/fparser.py index 5202b3272..db45d725f 100644 --- a/loki/frontend/fparser.py +++ b/loki/frontend/fparser.py @@ -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) diff --git a/loki/frontend/omni.py b/loki/frontend/omni.py index a857bf1f6..833cb5ffa 100644 --- a/loki/frontend/omni.py +++ b/loki/frontend/omni.py @@ -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)