Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement elementwise complex value division #7848

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

antonysigma
Copy link
Contributor

@antonysigma antonysigma commented Sep 14, 2023

Implement the logic: (a + bj) / (c + dj) as an inline operator/() function.

Use case: direct FFT method to solve linear least square problem, namely:

$$\begin{align} f(x) &=\Vert F^T D F x - b \Vert_2^2 \\\ \arg \min_{x \in \mathbb{R}} f(x) &= F^T \left[ D^{-1} F b \right] \end{align}$$

where D is a diagonal complex-valued matrix representing image blur kernel in Fourier domain, b is an ordinary image in vectorized form.

See also: #7456 , #5318 .

@antonysigma
Copy link
Contributor Author

Rebased to the top of tree (i.e. the main branch) to eliminate all CI errors.

Implement the logic: (a + bj) / (c + dj) as an inline operator/()
function.

Use case: direct FFT method to solve linear least square problem,
namely:

```math
\begin{align}
 f(x) &=\Vert F^T D F x - b \Vert_2^2 \\
\arg \min_{x \in \mathbb{R}} f(x)
&= F^T \left[ D^{-1} F b \right]
\end{align}
```
where `D` is a diagonal complex-valued matrix representing image blur
kernel, `b` is an ordinary image in vectorized form.
@antonysigma antonysigma force-pushed the complex-value-division branch from d499625 to e627e97 Compare October 5, 2023 19:42
@antonysigma
Copy link
Contributor Author

Re-basing to top-of-tree again.

@abadams abadams merged commit 509140a into halide:main Oct 9, 2023
3 checks passed
@abadams
Copy link
Member

abadams commented Oct 9, 2023

Thanks!

ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
Implement the logic: (a + bj) / (c + dj) as an inline operator/()
function.

Use case: direct FFT method to solve linear least square problem,
namely:

```math
\begin{align}
 f(x) &=\Vert F^T D F x - b \Vert_2^2 \\
\arg \min_{x \in \mathbb{R}} f(x)
&= F^T \left[ D^{-1} F b \right]
\end{align}
```
where `D` is a diagonal complex-valued matrix representing image blur
kernel, `b` is an ordinary image in vectorized form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants