Skip to content

umridge.h: Pass json config by const reference #81

@Schlevidon

Description

@Schlevidon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Future todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions