Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
2 files
+ 3382
3843
Compare changes
  • Side-by-side
  • Inline

Files

@@ -7,7 +7,8 @@ import json
from scripts.Infrastructure.MPIAPIInfo.MPIAPIParameters import get_mpi_version_dict
template = """
def @{FUNC_KEY}@(self, *args):
@staticmethod
def @{FUNC_KEY}@(*args):
return MPI_Call("@{FUNC_NAME}@", OrderedDict(@{PARAM_DICT}@), "@{VERSION}@")
"""
@@ -18,8 +19,9 @@ from scripts.Infrastructure.MPICall import MPI_Call
class MPICallFactory:
def get(self, func: str, *args):
f_to_call = getattr(self, func)
@staticmethod
def get(func: str, *args):
f_to_call = getattr(MPICallFactory, func)
return f_to_call(*args)
"""
@@ -30,13 +32,15 @@ from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory
class CorrectMPICallFactory:
def get(self, func: str):
f_to_call = getattr(self, func)
@staticmethod
def get(func: str):
f_to_call = getattr(CorrectMPICallFactory, func)
return f_to_call()
"""
template_correct = """
def @{FUNC_KEY}@(self):
@staticmethod
def @{FUNC_KEY}@():
correct_params = CorrectParameterFactory()
return MPICallFactory().@{FUNC_KEY}@(@{PARAMS}@)
"""
Loading