Context
Methods of UM-Bridge models take an optional json parameter which may be used to change the behavior of a model (e.g. setting different fidelity levels). Some methods defined in the current C++ implementation (see umbridge.h) use pass-by-reference (e.g. GetInputSizes) while others use pass-by-value (e.g. Evaluate) for the json config argument.
Proposed Solution
This behavior is likely unintentional: Instead, all model methods should accept a const reference for the json config argument, since there is no reason for the method to modify the config and we want to avoid copying (potentially large) json objects.
Context
Methods of UM-Bridge models take an optional json parameter which may be used to change the behavior of a model (e.g. setting different fidelity levels). Some methods defined in the current C++ implementation (see
umbridge.h) use pass-by-reference (e.g.GetInputSizes) while others use pass-by-value (e.g.Evaluate) for the json config argument.Proposed Solution
This behavior is likely unintentional: Instead, all model methods should accept a const reference for the json config argument, since there is no reason for the method to modify the config and we want to avoid copying (potentially large) json objects.