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

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

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