MCPcopy Create free account
hub / github.com/Yaafe/Yaafe / engine_output_read

Function engine_output_read

src_cpp/yaafe-python/yaafecoreEngine.cpp:158–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158int engine_output_read(void* engine, char* output, double* data, int size, int maxtokens) {
159 Engine* e = static_cast<Engine*>(engine);
160 InputBuffer* buf = e->getOutput(output);
161 if (buf==NULL) {
162 cerr << "ERROR: unknown output " << output << endl;
163 return -1;
164 }
165 if (size!=buf->info().size) {
166 cerr << "ERROR: invalid output size ! output '" << output << "' has size " << buf->info().size << endl;
167 return -1;
168 }
169 int read = buf->read(data,maxtokens);
170 buf->consumeTokens(read);
171 return read;
172}
173
174void engine_reset(void* engine) {
175 Engine* e = static_cast<Engine*>(engine);

Callers

nothing calls this directly

Calls 3

getOutputMethod · 0.80
readMethod · 0.80
consumeTokensMethod · 0.80

Tested by

no test coverage detected