Vectorise (and varmat) `log_diff_exp` and `log_sum_exp` binary overloads
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
Description
The binary overload for log_sum_exp currently only accepts two scalar arguments (i.e., not two matrices to operate elementwise on). While the binary overload for log_diff_exp does accept two matrix/container arguments, the vectorisation is handled by apply_scalar_binary.
For both of these functions there are likely to be performance benefits from adding vectorised & varmat implementations
While not directly related, the context is for optimising (Gaussian) copula models
Current Version:
v4.4.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the binary overloads for log_sum_exp and log_diff_exp, along with the existing apply_scalar_binary path and nearby matrix/container implementations. Compare how vectorized and varmat operations are handled elsewhere in the library; done means both functions support the intended elementwise arguments without relying on the slower scalar-application path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100