Skip to content

Commit

Permalink
fix fft length for CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
rkmaddox authored and larsoner committed Jul 5, 2015
1 parent beedbfb commit f678b35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mne/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ def _overlap_add_filter(x, h, n_fft=None, zero_phase=True, picks=None,
def _1d_overlap_filter(x, h_fft, n_h, n_edge, zero_phase, cuda_dict):
"""Do one-dimensional overlap-add FFT FIR filtering"""
# pad to reduce ringing
n_fft = len(h_fft)
if cuda_dict['use_cuda']:
n_fft = cuda_dict['x'].size # account for CUDA's modification of h_fft
else:
n_fft = len(h_fft)
x_ext = _smart_pad(x, n_edge)
n_x = len(x_ext)
filter_input = x_ext
Expand Down

0 comments on commit f678b35

Please sign in to comment.