Line data Source code
1 : /** 2 : * \file BufferFilter.cpp 3 : */ 4 : 5 : #include "BufferFilter.h" 6 : 7 : #include <cmath> 8 : #include <complex> 9 : #include <cstdint> 10 : 11 : namespace ATK 12 : { 13 : template<typename DataType_> 14 1 : BufferFilter<DataType_>::BufferFilter(gsl::index nb_channels) 15 1 : :Parent(nb_channels, nb_channels) 16 : { 17 1 : } 18 : 19 : template<typename DataType_> 20 1 : void BufferFilter<DataType_>::process_impl(gsl::index size) const 21 : { 22 2 : for(gsl::index channel = 0; channel < nb_input_ports; ++channel) 23 : { 24 1 : const DataType* ATK_RESTRICT input = converted_inputs[channel]; 25 1 : DataType* ATK_RESTRICT output = outputs[channel]; 26 1025 : for(gsl::index i = 0; i < size; ++i) 27 : { 28 1024 : output[i] = input[i]; 29 : } 30 : } 31 1 : } 32 : 33 : #if ATK_ENABLE_INSTANTIATION 34 : template class BufferFilter<std::int16_t>; 35 : template class BufferFilter<std::int32_t>; 36 : template class BufferFilter<std::int64_t>; 37 : template class BufferFilter<float>; 38 : template class BufferFilter<std::complex<float>>; 39 : template class BufferFilter<std::complex<double>>; 40 : #endif 41 : template class BufferFilter<double>; 42 : }