Use less memory in `multi_normal_cholesky_lpdf`
Summary
I've converted the partial matrices to vectors and looped over them to update the derivatives.
Tests
No new tests.
I did run a benchmark against the develop branch and it shows that the speed is roughly the same.
Side Effects
None.
Release notes
Increase the memory efficiency of the multivariate normal Cholesky parameterized lpdf.
Checklist
-
[x] Copyright holder: Sean Pinkney
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses: - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause) - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
-
[x] the basic tests are passing
- unit tests pass (to run, use:
./runTests.py test/unit) - header checks pass, (
make test-headers) - dependencies checks pass, (
make test-math-dependencies) - docs build, (
make doxygen) - code passes the built in C++ standards checks (
make cpplint)
- unit tests pass (to run, use:
-
[x] the code is written in idiomatic C++ and changes are documented in the doxygen
-
[x] the new changes are tested