Files
SDRPlusPlus/core/src/dsp/taps/tap.h
AlexandreRouma d1318d3a0f even more stuff
2022-06-15 16:08:54 +02:00

29 lines
613 B
C++

#pragma once
#include <volk/volk.h>
namespace dsp {
template<class T>
class tap {
public:
T* taps = NULL;
unsigned int size = 0;
};
namespace taps {
template<class T>
inline tap<T> alloc(int count) {
tap<T> taps;
taps.size = count;
taps.taps = buffer::alloc<T>(count);
return taps;
}
template<class T>
inline void free(tap<T>& taps) {
if (!taps.taps) { return; }
buffer::free(taps.taps);
taps.taps = NULL;
taps.size = 0;
}
}
}