MCPcopy Create free account
hub / github.com/audeering/opensmile / myTick

Method myTick

src/rnn/rnnProcessor.cpp:198–222  ·  view source on GitHub ↗

a derived class should override this method, in order to implement the actual processing

Source from the content-addressed store, hash-verified

196
197// a derived class should override this method, in order to implement the actual processing
198eTickResult cRnnProcessor::myTick(long long t)
199{
200 if (!writer_->checkWrite(1))
201 return TICK_DEST_NO_SPACE;
202
203 cVector * frame = reader_->getNextFrame();
204 if (frame == NULL) return TICK_SOURCE_NOT_AVAIL;
205
206 // pass current vector to net
207 long i, N=0;
208 for (i=0; i<MIN(frame->N,net.inputSize); i++) { in[i] = (FLOAT_NN)(frame->data[i]); }
209 rnn->forward(in, MIN(frame->N,net.inputSize));
210
211 // get output
212 const FLOAT_NN *outp = rnn->getOutput(&N);
213
214 //copy to *dst;
215 for (i=0; i<MIN(frameO->N,N); i++) {
216 frameO->data[i] = (FLOAT_DMEM)outp[i];
217 }
218
219 writer_->setNextFrame(frameO);
220
221 return TICK_SUCCESS;
222}
223
224cRnnProcessor::~cRnnProcessor()
225{

Callers

nothing calls this directly

Calls 5

getNextFrameMethod · 0.80
setNextFrameMethod · 0.80
checkWriteMethod · 0.45
forwardMethod · 0.45
getOutputMethod · 0.45

Tested by

no test coverage detected