Closed WardBrian closed 10 months ago
There is a corresponding C++ branch here: https://github.com/stan-dev/stan/tree/model-base-get-sizes/
This isn't strictly necessary for tuples (this final usage of get_dims
can be hacked around) so I'm happy to avoid it for the time being.
This PR splits off some small changes from #1100 and adds a new function called
get_param_sizes
with signature:This function is forward-compatible with all future types we have discussed for Stan (they will always have a size), and makes it possible to re-write things like
random_var_context
to not depend onget_dims
, which is not forward compatible and assumes rectangular dimensions.Submission Checklist
Release notes
Added code-generation for a new function
get_param_sizes
Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)