This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= one can use these to test fastmath-like path in controlled way | |
@inline mul_fast(x::T, y::T) where {T<:Complex} = | |
T(complex(muladd(-imag(x), imag(y), real(x)*real(y)), | |
muladd( real(x), imag(y), imag(x)*real(y)))) | |
@inline abs2_fast(z::Complex) = muladd(real(z), real(z), imag(z)*imag(z)) | |
=# | |
function run_julia(height, width) | |
y = range(-1.0f0, 0.0f0; length = height) |