Skip to content

FR: model_base methods - use Eigen::Ref<Eigen::VectorXd> #3289

Description

@andrjohns

Summary:

The Eigen overloads for model base methods like log_prob and unconstrain_array only accept Eigen::VectorXd inputs, which can require some data-reshaping/copying for downstream interfaces.

If these could be changed to Eigen::Ref<Eigen::VectorXd> (or overloads for these added), then the current Stan behaviour would be unchanged but interfaces could then pass Eigen::Map<Eigen::VectorXd> types and avoid extra copies

Current Version:

v2.35.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions