LCOV - code coverage report
Current view: top level - Tools - MSFilter.hxx (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 14 14 100.0 %
Date: 2021-02-18 20:07:22 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /**
       2             :  * \file MSFilter.hxx
       3             :  */
       4             : 
       5             : #include "MSFilter.h"
       6             : 
       7             : namespace ATK
       8             : {
       9             :   template<typename DataType_>
      10           2 :   MiddleSideFilter<DataType_>::MiddleSideFilter(gsl::index nb_channels)
      11           2 :     :Parent(2 * nb_channels, 2 * nb_channels)
      12             :   {
      13           2 :   }
      14             :   
      15             :   template<typename DataType_>
      16           2 :   void MiddleSideFilter<DataType_>::process_impl(gsl::index size) const
      17             :   {
      18           2 :     assert(nb_input_ports == nb_output_ports);
      19             : 
      20           4 :     for (gsl::index channel = 0; channel < nb_output_ports / 2; ++channel)
      21             :     {
      22           2 :       const DataType* ATK_RESTRICT input0 = converted_inputs[2 * channel];
      23           2 :       const DataType* ATK_RESTRICT input1 = converted_inputs[2 * channel + 1];
      24           2 :       DataType* ATK_RESTRICT output0 = outputs[2 * channel];
      25           2 :       DataType* ATK_RESTRICT output1 = outputs[2 * channel + 1];
      26             : 
      27        2050 :       for (gsl::index i = 0; i < size; ++i)
      28             :       {
      29        2048 :         output0[i] = input0[i] + input1[i];
      30        2048 :         output1[i] = input0[i] - input1[i];
      31             :       }
      32             :     }
      33           2 :   }
      34             : }

Generated by: LCOV version TK-3.3.0-4-gdba42eea