Skip to content

Commit

Permalink
Use LoopVectorization for downconvert
Browse files Browse the repository at this point in the history
  • Loading branch information
zsoerenm committed Feb 17, 2020
1 parent 8ba27ac commit b734d80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
[compat]
DocStringExtensions = "0.6, 0.7, 0.8"
GNSSSignals = "0.11"
LoopVectorization = "0.6"
LoopVectorization = "0.6.11"
StaticArrays = "0.9, 0.10, 0.11, 0.12"
StructArrays = "0.4"
TrackingLoopFilters = "0.1"
Unitful = "0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 1.0"
julia = "1.1"
julia = "1"

[extras]
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand Down
6 changes: 2 additions & 4 deletions src/downconvert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ function downconvert!(
start_sample::Integer,
num_samples_left::Integer
)
end_sample = num_samples_left + start_sample - 1
@inbounds for i = start_sample:end_sample
@avx for i = start_sample:num_samples_left + start_sample - 1
downconverted_signal_re[i] = signal_re[i] * carrier_re[i] +
signal_im[i] * carrier_im[i]
downconverted_signal_im[i] = signal_im[i] * carrier_re[i] -
Expand All @@ -27,8 +26,7 @@ function downconvert!(
start_sample::Integer,
num_samples_left::Integer
)
end_sample = num_samples_left + start_sample - 1
@inbounds for i = start_sample:end_sample, j = 1:size(signal_re, 2)
@avx for i = start_sample:num_samples_left + start_sample - 1, j = 1:size(signal_re, 2)
# Calculate signal * carrier'
downconverted_signal_re[i, j] = signal_re[i, j] * carrier_re[i] +
signal_im[i, j] * carrier_im[i]
Expand Down

2 comments on commit b734d80

@zsoerenm
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/9625

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.1 -m "<description of version>" b734d808d1af75f20509affef4435da48214fa0c
git push origin v0.12.1

Please sign in to comment.