Skip to content

Commit

Permalink
Only start num_samples_left threads instead of size(signal, 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsoerenm committed May 19, 2023
1 parent 2c5daa0 commit a7f414c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gpu_downconvert_and_correlate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ function downconvert_and_correlate!(
) where M
# Assume 1024 to be the max number of threads
# TODO: Evaluate this at run time
threads = min(size(signal, 1), 1024)
blocks = cld(size(signal, 1), threads)
threads = min(num_samples_left, 1024)
blocks = cld(num_samples_left, threads)
num_correlators = size(downconverted_and_decoded_signal, 3)
@cuda threads=threads blocks=blocks downconvert_and_decode_prn_kernel!(
downconverted_and_decoded_signal,
Expand Down

0 comments on commit a7f414c

Please sign in to comment.