comp-imaging / ProxImaL

A domain-specific language for image optimization.
MIT License
112 stars 29 forks source link

Compute residuals with C++20 ranges::transform #78

Closed antonysigma closed 1 year ago

antonysigma commented 1 year ago

Refactor the code to compute the primal and dual residuals, such that the residual values is captured in the main Halide pipeline.

On clang14+MacOS of the Github CI server, we previously encountered a problem that the residual stage "r" is captured by r-value, so the expression for computing the residual was destroyed on the fly. We need to capture the l-value reference instead. Hence the rewrite.

See also: #72 .