diff --git a/Project.toml b/Project.toml index 1da9d61..74510d6 100644 --- a/Project.toml +++ b/Project.toml @@ -6,6 +6,7 @@ version = "0.2.0" [deps] DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/src/ISM.jl b/src/ISM.jl index 2ec2bb5..580cb15 100644 --- a/src/ISM.jl +++ b/src/ISM.jl @@ -196,10 +196,11 @@ function ISM_RectangularRoom_core!( i_e = min(floor(Int, (τ + Wd / 2) * fs) + 1, Nh) # end # Insert yet another impulse into transfer function - for i ∈ i_s:i_e + @turbo for i ∈ i_s:i_e t = (i - 1) / fs - τ # time signature w = 0.5 * (1.0 + cos(2π * t / Wd)) # Hann window - h[i] += w * A * sinc(fs * t) # sinc + x = π * fs * t + eps() + h[i] += w * A * sin(x)/x end end end