cosmetic: Fix trailing whitespace in several files
Change-Id: Ifafb68353960fc5046661854ccfb8d783b0efb14
This commit is contained in:
parent
e6319ed32a
commit
bdb970e495
|
@ -53,7 +53,7 @@ template <class T, class Fifo=PointerFIFO> class InterthreadQueue {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Fifo mQ;
|
Fifo mQ;
|
||||||
mutable Mutex mLock;
|
mutable Mutex mLock;
|
||||||
mutable Signal mWriteSignal;
|
mutable Signal mWriteSignal;
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ template <class T, class Fifo=PointerFIFO> class InterthreadQueue2 {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Fifo mQ;
|
Fifo mQ;
|
||||||
mutable Mutex mLock;
|
mutable Mutex mLock;
|
||||||
mutable Signal mWriteSignal;
|
mutable Signal mWriteSignal;
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ template <class T, class Fifo=PointerFIFO> class InterthreadQueue2 {
|
||||||
// This recurs (and the InterthreadQueue fills up with data)
|
// This recurs (and the InterthreadQueue fills up with data)
|
||||||
// until the read thread's accumulated temporary priority causes it to
|
// until the read thread's accumulated temporary priority causes it to
|
||||||
// get a second pre-emptive activation over the writing thread,
|
// get a second pre-emptive activation over the writing thread,
|
||||||
// resulting in bursts of activity by the read thread.
|
// resulting in bursts of activity by the read thread.
|
||||||
{ ScopedLock lock(mLock);
|
{ ScopedLock lock(mLock);
|
||||||
mQ.put(val);
|
mQ.put(val);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ template <class T> class InterthreadQueueWithWait {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
PointerFIFO mQ;
|
PointerFIFO mQ;
|
||||||
mutable Mutex mLock;
|
mutable Mutex mLock;
|
||||||
mutable Signal mWriteSignal;
|
mutable Signal mWriteSignal;
|
||||||
mutable Signal mReadSignal;
|
mutable Signal mReadSignal;
|
||||||
|
|
|
@ -81,7 +81,7 @@ long Timeval::delta(const Timeval& other) const
|
||||||
int32_t deltaNs = other.nsec() - nsec();
|
int32_t deltaNs = other.nsec() - nsec();
|
||||||
return 1000*deltaS + deltaNs/1000000;
|
return 1000*deltaS + deltaNs/1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ class Time {
|
||||||
unsigned newTN = (mTN + other.mTN) % 8;
|
unsigned newTN = (mTN + other.mTN) % 8;
|
||||||
uint64_t newFN = (mFN+other.mFN + (mTN + other.mTN)/8) % gHyperframe;
|
uint64_t newFN = (mFN+other.mFN + (mTN + other.mTN)/8) % gHyperframe;
|
||||||
return Time(newFN,newTN);
|
return Time(newFN,newTN);
|
||||||
}
|
}
|
||||||
|
|
||||||
int operator-(const Time& other) const
|
int operator-(const Time& other) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Polyphase channelizer
|
* Polyphase channelizer
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2014 Tom Tsou <tom@tsou.cc>
|
* Copyright (C) 2012-2014 Tom Tsou <tom@tsou.cc>
|
||||||
* Copyright (C) 2015 Ettus Research LLC
|
* Copyright (C) 2015 Ettus Research LLC
|
||||||
*
|
*
|
||||||
|
@ -63,7 +63,7 @@ float *Channelizer::outputBuffer(size_t chan) const
|
||||||
return hInputs[chan];
|
return hInputs[chan];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implementation based on material found in:
|
* Implementation based on material found in:
|
||||||
*
|
*
|
||||||
* "harris, fred, Multirate Signal Processing, Upper Saddle River, NJ,
|
* "harris, fred, Multirate Signal Processing, Upper Saddle River, NJ,
|
||||||
|
@ -78,8 +78,8 @@ bool Channelizer::rotate(const float *in, size_t len)
|
||||||
|
|
||||||
deinterleave(in, len, hInputs, blockLen, m);
|
deinterleave(in, len, hInputs, blockLen, m);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convolve through filterbank while applying and saving sample history
|
* Convolve through filterbank while applying and saving sample history
|
||||||
*/
|
*/
|
||||||
for (size_t i = 0; i < m; i++) {
|
for (size_t i = 0; i < m; i++) {
|
||||||
memcpy(&hInputs[i][2 * -hLen], hist[i], hSize);
|
memcpy(&hInputs[i][2 * -hLen], hist[i], hSize);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Polyphase channelizer
|
* Polyphase channelizer
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2014 Tom Tsou <tom@tsou.cc>
|
* Copyright (C) 2012-2014 Tom Tsou <tom@tsou.cc>
|
||||||
* Copyright (C) 2015 Ettus Research LLC
|
* Copyright (C) 2015 Ettus Research LLC
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
@ -55,10 +55,10 @@ static void reverse(float *buf, size_t len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create polyphase filterbank
|
* Create polyphase filterbank
|
||||||
*
|
*
|
||||||
* Implementation based material found in,
|
* Implementation based material found in,
|
||||||
*
|
*
|
||||||
* "harris, fred, Multirate Signal Processing, Upper Saddle River, NJ,
|
* "harris, fred, Multirate Signal Processing, Upper Saddle River, NJ,
|
||||||
* Prentice Hall, 2006."
|
* Prentice Hall, 2006."
|
||||||
|
@ -70,7 +70,7 @@ bool ChannelizerBase::initFilters()
|
||||||
float sum = 0.0f, scale = 0.0f;
|
float sum = 0.0f, scale = 0.0f;
|
||||||
float midpt = (float) (protoLen - 1.0) / 2.0;
|
float midpt = (float) (protoLen - 1.0) / 2.0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate 'M' partition filters and the temporary prototype
|
* Allocate 'M' partition filters and the temporary prototype
|
||||||
* filter. Coefficients are real only and must be 16-byte memory
|
* filter. Coefficients are real only and must be 16-byte memory
|
||||||
* aligned for SSE usage.
|
* aligned for SSE usage.
|
||||||
|
@ -90,7 +90,7 @@ bool ChannelizerBase::initFilters()
|
||||||
memalign(16, hLen * 2 * sizeof(float));
|
memalign(16, hLen * 2 * sizeof(float));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate the prototype filter with a Blackman-harris window.
|
* Generate the prototype filter with a Blackman-harris window.
|
||||||
* Scale coefficients with DC filter gain set to unity divided
|
* Scale coefficients with DC filter gain set to unity divided
|
||||||
* by the number of channels.
|
* by the number of channels.
|
||||||
|
@ -110,7 +110,7 @@ bool ChannelizerBase::initFilters()
|
||||||
}
|
}
|
||||||
scale = (float) m / sum;
|
scale = (float) m / sum;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Populate partition filters and reverse the coefficients per
|
* Populate partition filters and reverse the coefficients per
|
||||||
* convolution requirements.
|
* convolution requirements.
|
||||||
*/
|
*/
|
||||||
|
@ -174,7 +174,7 @@ bool ChannelizerBase::mapBuffers()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup filterbank internals
|
* Setup filterbank internals
|
||||||
*/
|
*/
|
||||||
bool ChannelizerBase::init()
|
bool ChannelizerBase::init()
|
||||||
|
@ -222,7 +222,7 @@ bool ChannelizerBase::checkLen(size_t innerLen, size_t outerLen)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup channelizer paramaters
|
* Setup channelizer paramaters
|
||||||
*/
|
*/
|
||||||
ChannelizerBase::ChannelizerBase(size_t m, size_t blockLen, size_t hLen)
|
ChannelizerBase::ChannelizerBase(size_t m, size_t blockLen, size_t hLen)
|
||||||
|
|
|
@ -51,7 +51,7 @@ void Resampler::initFilters(float bw)
|
||||||
float cutoff;
|
float cutoff;
|
||||||
float sum = 0.0f, scale = 0.0f;
|
float sum = 0.0f, scale = 0.0f;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate partition filters and the temporary prototype filter
|
* Allocate partition filters and the temporary prototype filter
|
||||||
* according to numerator of the rational rate. Coefficients are
|
* according to numerator of the rational rate. Coefficients are
|
||||||
* real only and must be 16-byte memory aligned for SSE usage.
|
* real only and must be 16-byte memory aligned for SSE usage.
|
||||||
|
@ -60,10 +60,10 @@ void Resampler::initFilters(float bw)
|
||||||
for (auto &part : partitions)
|
for (auto &part : partitions)
|
||||||
part = (complex<float> *) memalign(16, filt_len * sizeof(complex<float>));
|
part = (complex<float> *) memalign(16, filt_len * sizeof(complex<float>));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate the prototype filter with a Blackman-harris window.
|
* Generate the prototype filter with a Blackman-harris window.
|
||||||
* Scale coefficients with DC filter gain set to unity divided
|
* Scale coefficients with DC filter gain set to unity divided
|
||||||
* by the number of filter partitions.
|
* by the number of filter partitions.
|
||||||
*/
|
*/
|
||||||
float a0 = 0.35875;
|
float a0 = 0.35875;
|
||||||
float a1 = 0.48829;
|
float a1 = 0.48829;
|
||||||
|
@ -137,8 +137,8 @@ int Resampler::rotate(const float *in, size_t in_len, float *out, size_t out_len
|
||||||
|
|
||||||
/* Generate output from precomputed input/output paths */
|
/* Generate output from precomputed input/output paths */
|
||||||
for (size_t i = 0; i < out_len; i++) {
|
for (size_t i = 0; i < out_len; i++) {
|
||||||
n = in_index[i];
|
n = in_index[i];
|
||||||
path = out_path[i];
|
path = out_path[i];
|
||||||
|
|
||||||
convolve_real(in, in_len,
|
convolve_real(in, in_len,
|
||||||
reinterpret_cast<float *>(partitions[path]),
|
reinterpret_cast<float *>(partitions[path]),
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
/* Constructor for rational sample rate conversion
|
/* Constructor for rational sample rate conversion
|
||||||
* @param p numerator of resampling ratio
|
* @param p numerator of resampling ratio
|
||||||
* @param q denominator of resampling ratio
|
* @param q denominator of resampling ratio
|
||||||
* @param filt_len length of each polyphase subfilter
|
* @param filt_len length of each polyphase subfilter
|
||||||
*/
|
*/
|
||||||
Resampler(size_t p, size_t q, size_t filt_len = 16);
|
Resampler(size_t p, size_t q, size_t filt_len = 16);
|
||||||
~Resampler();
|
~Resampler();
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
int rotate(const float *in, size_t in_len, float *out, size_t out_len);
|
int rotate(const float *in, size_t in_len, float *out, size_t out_len);
|
||||||
|
|
||||||
/* Get filter length
|
/* Get filter length
|
||||||
* @return number of taps in each filter partition
|
* @return number of taps in each filter partition
|
||||||
*/
|
*/
|
||||||
size_t len();
|
size_t len();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Polyphase synthesis filter
|
* Polyphase synthesis filter
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2014 Tom Tsou <tom@tsou.cc>
|
* Copyright (C) 2012-2014 Tom Tsou <tom@tsou.cc>
|
||||||
* Copyright (C) 2015 Ettus Research LLC
|
* Copyright (C) 2015 Ettus Research LLC
|
||||||
*
|
*
|
||||||
|
@ -74,7 +74,7 @@ bool Synthesis::resetBuffer(size_t chan)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implementation based on material found in:
|
* Implementation based on material found in:
|
||||||
*
|
*
|
||||||
* "harris, fred, Multirate Signal Processing, Upper Saddle River, NJ,
|
* "harris, fred, Multirate Signal Processing, Upper Saddle River, NJ,
|
||||||
|
@ -92,8 +92,8 @@ bool Synthesis::rotate(float *out, size_t len)
|
||||||
|
|
||||||
cxvec_fft(fftHandle);
|
cxvec_fft(fftHandle);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convolve through filterbank while applying and saving sample history
|
* Convolve through filterbank while applying and saving sample history
|
||||||
*/
|
*/
|
||||||
for (size_t i = 0; i < m; i++) {
|
for (size_t i = 0; i < m; i++) {
|
||||||
memcpy(&hInputs[i][2 * -hLen], hist[i], hSize);
|
memcpy(&hInputs[i][2 * -hLen], hist[i], hSize);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* NEON complex multiplication
|
* NEON complex multiplication
|
||||||
* Copyright (C) 2012,2013 Thomas Tsou <tom@tsou.cc>
|
* Copyright (C) 2012,2013 Thomas Tsou <tom@tsou.cc>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -31,4 +31,3 @@ void base_convert_short_float(float *out, const short *in, int len)
|
||||||
for (int i = 0; i < len; i++)
|
for (int i = 0; i < len; i++)
|
||||||
out[i] = in[i];
|
out[i] = in[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/*
|
/*
|
||||||
* Fast Fourier transform
|
* Fast Fourier transform
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Tom Tsou <tom@tsou.cc>
|
* Copyright (C) 2012 Tom Tsou <tom@tsou.cc>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
* See the COPYING file in the main directory for details.
|
* See the COPYING file in the main directory for details.
|
||||||
|
@ -32,9 +32,9 @@ struct fft_hdl {
|
||||||
fftwf_plan fft_plan;
|
fftwf_plan fft_plan;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Initialize FFT backend
|
/*! \brief Initialize FFT backend
|
||||||
* \param[in] reverse FFT direction
|
* \param[in] reverse FFT direction
|
||||||
* \param[in] m FFT length
|
* \param[in] m FFT length
|
||||||
* \param[in] istride input stride count
|
* \param[in] istride input stride count
|
||||||
* \param[in] ostride output stride count
|
* \param[in] ostride output stride count
|
||||||
* \param[in] in input buffer (FFTW aligned)
|
* \param[in] in input buffer (FFTW aligned)
|
||||||
|
@ -92,7 +92,7 @@ void fft_free(void *ptr)
|
||||||
free(ptr);
|
free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Free FFT backend resources
|
/*! \brief Free FFT backend resources
|
||||||
*/
|
*/
|
||||||
void free_fft(struct fft_hdl *hdl)
|
void free_fft(struct fft_hdl *hdl)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,7 +96,7 @@ const float *RadioBuffer::getReadSegment()
|
||||||
/*
|
/*
|
||||||
* Output direction
|
* Output direction
|
||||||
*
|
*
|
||||||
* Write a non-segment length of samples to the buffer.
|
* Write a non-segment length of samples to the buffer.
|
||||||
*/
|
*/
|
||||||
bool RadioBuffer::write(const float *wr, size_t len)
|
bool RadioBuffer::write(const float *wr, size_t len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "BitVector.h"
|
#include "BitVector.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue