math icon indicating copy to clipboard operation
math copied to clipboard

Use less memory in `multi_normal_cholesky_lpdf`

Open spinkney opened this issue 2 years ago • 0 comments

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.

multi_normal_cholesky_compare

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)
  • [x] the code is written in idiomatic C++ and changes are documented in the doxygen

  • [x] the new changes are tested

spinkney avatar Dec 06 '23 17:12 spinkney