MCPcopy Create free account
hub / github.com/MTG/essentia / deallocate_outputs

Function deallocate_outputs

src/python/pyalgorithm.cpp:167–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166
167void deallocate_outputs(vector<void*> outputs, vector<Edt> outputTypes) {
168 if (outputs.size() != outputTypes.size()) {
169 throw EssentiaException("PyAlgorithm: deallocate_outputs requires vector arguments of equal length");
170 }
171
172 for (int i=0; i<int(outputs.size()); ++i) {
173 if (outputs[i] == NULL) continue;
174 Edt tp = outputTypes[i];
175 if (tp != VECTOR_REAL && tp != VECTOR_COMPLEX && tp != VECTOR_INTEGER &&
176 tp != MATRIX_REAL && tp != POOL) {
177 dealloc(outputs[i], tp);
178 }
179 }
180}
181
182
183PyObject* PyAlgorithm::compute(PyAlgorithm* self, PyObject* args) {

Callers 1

computeMethod · 0.85

Calls 3

EssentiaExceptionClass · 0.85
deallocFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected