From f678b355f6c13d17266ba6539f85d6782b0d0cec Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Jul 2015 09:45:41 -0700 Subject: [PATCH] fix fft length for CUDA --- mne/filter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mne/filter.py b/mne/filter.py index f2d81cebcfe..ad855b5b79a 100644 --- a/mne/filter.py +++ b/mne/filter.py @@ -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