Skip to content

Commit

Permalink
compiler: Add opkwargs property to ArgumentsMap
Browse files Browse the repository at this point in the history
  • Loading branch information
ccuetom authored and mloubout committed Jun 28, 2023
1 parent 772243b commit 2819421
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions devito/operator/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,16 @@ def comm(self):
"""The MPI communicator the arguments are collective over."""
return self.grid.comm if self.grid is not None else MPI.COMM_NULL

@property
def opkwargs(self):
temp_registry = {v: k for k, v in platform_registry.items()}
platform = temp_registry[self.platform]

temp_registry = {v: k for k, v in compiler_registry.items()}
compiler = temp_registry[self.compiler.__class__]

return {'platform': platform, 'compiler': compiler, 'language': self.language}


def parse_kwargs(**kwargs):
"""
Expand Down

0 comments on commit 2819421

Please sign in to comment.