diff options
-rw-r--r-- | gr-filter/lib/fir_filter.cc | 12 | ||||
-rw-r--r-- | gr-filter/lib/fir_filter_with_buffer.cc | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/gr-filter/lib/fir_filter.cc b/gr-filter/lib/fir_filter.cc index 233405824..6137dd269 100644 --- a/gr-filter/lib/fir_filter.cc +++ b/gr-filter/lib/fir_filter.cc @@ -34,7 +34,7 @@ namespace gr { const std::vector<float> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(float); + d_naligned = std::max((size_t)1, d_align / sizeof(float)); d_aligned_taps = NULL; set_taps(taps); @@ -139,7 +139,7 @@ namespace gr { const std::vector<float> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(gr_complex); + d_naligned = std::max((size_t)1, d_align / sizeof(gr_complex)); d_aligned_taps = NULL; set_taps(taps); @@ -246,7 +246,7 @@ namespace gr { const std::vector<gr_complex> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(float); + d_naligned = std::max((size_t)1, d_align / sizeof(float)); d_aligned_taps = NULL; set_taps(taps); @@ -352,7 +352,7 @@ namespace gr { const std::vector<gr_complex> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(gr_complex); + d_naligned = std::max((size_t)1, d_align / sizeof(gr_complex)); d_aligned_taps = NULL; set_taps(taps); @@ -457,7 +457,7 @@ namespace gr { const std::vector<gr_complex> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(short); + d_naligned = std::max((size_t)1, d_align / sizeof(short)); d_aligned_taps = NULL; set_taps(taps); @@ -563,7 +563,7 @@ namespace gr { const std::vector<float> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(float); + d_naligned = std::max((size_t)1, d_align / sizeof(float)); d_aligned_taps = NULL; set_taps(taps); diff --git a/gr-filter/lib/fir_filter_with_buffer.cc b/gr-filter/lib/fir_filter_with_buffer.cc index 7a35a9225..7bff8d4a7 100644 --- a/gr-filter/lib/fir_filter_with_buffer.cc +++ b/gr-filter/lib/fir_filter_with_buffer.cc @@ -38,7 +38,7 @@ namespace gr { fir_filter_with_buffer_fff::fir_filter_with_buffer_fff(const std::vector<float> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(float); + d_naligned = std::max((size_t)1, d_align / sizeof(float)); d_buffer_ptr = NULL; d_aligned_taps = NULL; @@ -191,7 +191,7 @@ namespace gr { fir_filter_with_buffer_ccc::fir_filter_with_buffer_ccc(const std::vector<gr_complex> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(gr_complex); + d_naligned = std::max((size_t)1, d_align / sizeof(gr_complex)); d_buffer_ptr = NULL; d_aligned_taps = NULL; @@ -344,7 +344,7 @@ namespace gr { fir_filter_with_buffer_ccf::fir_filter_with_buffer_ccf(const std::vector<float> &taps) { d_align = volk_get_alignment(); - d_naligned = d_align / sizeof(gr_complex); + d_naligned = std::max((size_t)1, d_align / sizeof(gr_complex)); d_buffer_ptr = NULL; d_aligned_taps = NULL; |