20 #ifndef ESSENTIA_POOLSTORAGE_H
21 #define ESSENTIA_POOLSTORAGE_H
23 #include "../streamingalgorithm.h"
24 #include "../../pool.h"
51 template <
typename TokenType,
typename StorageType = TokenType>
72 _descriptor.buffer().bufferInfo().maxContiguousElements);
73 ntokens = std::max(ntokens, 1);
77 EXEC_DEBUG(
"trying to acquire " << ntokens <<
" tokens");
99 for (
int i=0; i<(int)value.size();++i)
110 template <
typename T>
116 template <
typename T>
128 template <
typename T>
135 throw EssentiaException(
"PoolStorage::addToPool, setting StereoSample as single value"
136 " is not supported by Pool.");
151 const std::string& descriptorName);
164 #define PC essentia::streaming::PoolConnector
178 const std::string& descriptorName);
184 const std::string& descriptorName);
Definition: tnt_array2d.h:38
void setName(const std::string &name)
Definition: configurable.h:53
void append(const std::string &name, const std::vector< T > &values)
void add(const std::string &name, const Real &value, bool validityCheck=false)
void set(const std::string &name, const Real &value, bool validityCheck=false)
Sets the value of a descriptor name.
Definition: streamingalgorithm.h:140
void declareInput(SinkBase &sink, const std::string &name, const std::string &desc)
Definition: poolstorage.h:153
PoolConnector(Pool &p, const std::string &descName)
Definition: poolstorage.h:159
friend void operator>>(SourceBase &source, const PoolConnector &pc)
Definition: poolstorage.h:168
std::string name
Definition: poolstorage.h:156
Pool & pool
Definition: poolstorage.h:155
Definition: poolstorage.h:29
~PoolStorageBase()
Definition: poolstorage.h:39
PoolStorageBase(Pool *pool, const std::string &descriptorName, bool setSingle=false)
Definition: poolstorage.h:36
bool _setSingle
Definition: poolstorage.h:33
Pool * _pool
Definition: poolstorage.h:31
std::string _descriptorName
Definition: poolstorage.h:32
const std::string & descriptorName() const
Definition: poolstorage.h:41
Pool * pool() const
Definition: poolstorage.h:45
Definition: poolstorage.h:52
void addToPool(const Tensor< T > &value)
Definition: poolstorage.h:129
~PoolStorage()
Definition: poolstorage.h:64
void addToPool(const std::vector< Real > &value)
Definition: poolstorage.h:105
void addToPool(const TNT::Array2D< T > &value)
Definition: poolstorage.h:117
AlgorithmStatus process()
Definition: poolstorage.h:68
PoolStorage(Pool *pool, const std::string &descriptorName, bool setSingle=false)
Definition: poolstorage.h:57
void addToPool(const T &value)
Definition: poolstorage.h:111
Sink< TokenType > _descriptor
Definition: poolstorage.h:54
void addToPool(const std::vector< T > &value)
Definition: poolstorage.h:97
void declareParameters()
Definition: poolstorage.h:66
void addToPool(const StereoSample &value)
Definition: poolstorage.h:133
Definition: sourcebase.h:52
#define EXEC_DEBUG(msg)
Definition: debugging.h:161
void connectSingleValue(SourceBase &source, Pool &pool, const std::string &descriptorName)
void disconnect(SourceBase &source, DevNullConnector devnull)
void operator>>(SourceBase &source, DevNullConnector devnull)
Definition: devnull.h:81
void connect(SourceBase &source, DevNullConnector devnull)
AlgorithmStatus
Definition: streamingalgorithm.h:106
@ OK
Definition: streamingalgorithm.h:107
@ NO_INPUT
Definition: streamingalgorithm.h:111
Definition: algorithm.h:28
Eigen::Tensor< T, 4, Eigen::RowMajor > Tensor
Definition: types.h:384