}
int CompilationBuilder::finish() {
- // Dummy Implementation
- return ANEURALNETWORKS_NO_ERROR;
-
- // Original code for reference
-#if 0
if (mFinished) {
- LOG(ERROR) << "ANeuralNetworksCompilation_finish called more than once";
+ // TODO-NNRT Uncomment when LOG is available
+ // LOG(ERROR) << "ANeuralNetworksCompilation_finish called more than once";
return ANEURALNETWORKS_BAD_STATE;
}
// TODO validate the rest
mFinished = true;
+ // TODO-NNRT The below original code is commented out because we don't actually do partitioning
+ // for now.
+#if 0 // REF-ANN
if (uint32_t p = DeviceManager::get()->getPartitioning()) {
// Get the list of HAL devices.
const std::vector<std::shared_ptr<Device>>& devices = DeviceManager::get()->getDrivers();
return n;
}
}
+#endif
return ANEURALNETWORKS_NO_ERROR;
-#endif
}
int CompilationBuilder::setPreference(int32_t preference) {
#include <iostream>
+#include "CompilationBuilder.h"
+
// TODO Include these files once availible
#if 0
#include "Callbacks.h"
}
int ANeuralNetworksCompilation_finish(ANeuralNetworksCompilation* compilation) {
- // Dummy Implementation
- return ANEURALNETWORKS_NO_ERROR;
-
- // Original code for reference
-#if 0
if (!compilation) {
- LOG(ERROR) << "ANeuralNetworksCompilation_finish passed a nullptr";
+ // TODO-NNRT Uncomment once LOG is available
+ // LOG(ERROR) << "ANeuralNetworksCompilation_finish passed a nullptr";
return ANEURALNETWORKS_UNEXPECTED_NULL;
}
CompilationBuilder* c = reinterpret_cast<CompilationBuilder*>(compilation);
return c->finish();
-#endif
}
int ANeuralNetworksExecution_create(ANeuralNetworksCompilation* compilation,