Skip to content

Commit 01503b9

Browse files
Fixing crashing test on Windows
1 parent afbeac1 commit 01503b9

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@
66
`chowdsp_convolution` is a library for performing frequency-domain
77
convolution using [`chowdsp_fft`](https://github.com/Chowdhury-DSP/chowdsp_fft).
88

9+
## TODO
10+
- Renaming state to specify uniform partitioning
11+
- Implement process w/ latency
12+
913
## License
1014
`chowdsp_convolution` is licensed under the BSD 3-clause license. Enjoy!

chowdsp_convolution.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,20 @@ void process_samples (const Config* config,
194194

195195
// Add overlap
196196
{
197-
const auto vec_width_x2 = 2 * fft::fft_simd_width_bytes (config->fft) / static_cast<int> (sizeof (float));
198-
const auto n_samples_vec = (samples_to_process / vec_width_x2) * vec_width_x2;
199-
fft::fft_accumulate (config->fft,
200-
state->output_data + state->input_data_pos,
201-
state->overlap_data + state->input_data_pos,
202-
output + num_samples_processed,
203-
n_samples_vec);
204-
for (int i = n_samples_vec; i < samples_to_process; ++i) // extra data that can't be SIMD-ed
197+
// Using SIMD for this operation is tricky, because
198+
// we can't guarantee that the pointers will be aligned.
199+
200+
// const auto vec_width_x2 = 2 * fft::fft_simd_width_bytes (config->fft) / static_cast<int> (sizeof (float));
201+
// const auto n_samples_vec = (samples_to_process / vec_width_x2) * vec_width_x2;
202+
// fft::fft_accumulate (config->fft,
203+
// state->output_data + state->input_data_pos,
204+
// state->overlap_data + state->input_data_pos,
205+
// output + num_samples_processed,
206+
// n_samples_vec);
207+
// for (int i = n_samples_vec; i < samples_to_process; ++i) // extra data that can't be SIMD-ed
208+
// output[num_samples_processed + i] = state->output_data[state->input_data_pos + i] + state->overlap_data[state->input_data_pos + i];
209+
210+
for (int i = 0; i < samples_to_process; ++i)
205211
output[num_samples_processed + i] = state->output_data[state->input_data_pos + i] + state->overlap_data[state->input_data_pos + i];
206212
}
207213

0 commit comments

Comments
 (0)