ONE - On-device Neural Engine
|
#include <ExecutionBuilder.h>
Public Member Functions | |
ExecutionBuilder (const ModelBuilder *) | |
int | setInput (uint32_t index, const ANeuralNetworksOperandType *type, const void *buffer, size_t length) |
int | setInputFromMemory (uint32_t index, const ANeuralNetworksOperandType *type, const Memory *memory, size_t offset, size_t length) |
int | setOutput (uint32_t index, const ANeuralNetworksOperandType *type, void *buffer, size_t length) |
int | setOutputFromMemory (uint32_t index, const ANeuralNetworksOperandType *type, const Memory *memory, size_t offset, size_t length) |
int | startCompute (void) |
Definition at line 32 of file ExecutionBuilder.h.
ExecutionBuilder::ExecutionBuilder | ( | const ModelBuilder * | model | ) |
int ExecutionBuilder::setInput | ( | uint32_t | index, |
const ANeuralNetworksOperandType * | type, | ||
const void * | buffer, | ||
size_t | length | ||
) |
Definition at line 65 of file ExecutionBuilder.cpp.
References ANEURALNETWORKS_BAD_DATA, ANEURALNETWORKS_NO_ERROR, ModelBuilder::getInputOperand(), LOG, and validateOperandType().
int ExecutionBuilder::setInputFromMemory | ( | uint32_t | index, |
const ANeuralNetworksOperandType * | type, | ||
const Memory * | memory, | ||
size_t | offset, | ||
size_t | length | ||
) |
Definition at line 92 of file ExecutionBuilder.cpp.
References MemoryTracker::add(), ANEURALNETWORKS_BAD_DATA, ModelBuilder::getInputOperand(), LOG, offset(), and Memory::validateSize().
int ExecutionBuilder::setOutput | ( | uint32_t | index, |
const ANeuralNetworksOperandType * | type, | ||
void * | buffer, | ||
size_t | length | ||
) |
Definition at line 110 of file ExecutionBuilder.cpp.
References ANEURALNETWORKS_BAD_DATA, ANEURALNETWORKS_NO_ERROR, ModelBuilder::getOutputOperand(), LOG, and validateOperandType().
int ExecutionBuilder::setOutputFromMemory | ( | uint32_t | index, |
const ANeuralNetworksOperandType * | type, | ||
const Memory * | memory, | ||
size_t | offset, | ||
size_t | length | ||
) |
Definition at line 136 of file ExecutionBuilder.cpp.
References MemoryTracker::add(), ANEURALNETWORKS_BAD_DATA, ModelBuilder::getOutputOperand(), LOG, offset(), and Memory::validateSize().
int ExecutionBuilder::startCompute | ( | void | ) |
Definition at line 158 of file ExecutionBuilder.cpp.
References ANEURALNETWORKS_UNMAPPABLE, RunTimePoolInfo::buffer, Request::inputs, Request::outputs, ModelArgumentInfo::POINTER, ModelBuilder::publish(), Executor::run(), setRunTimePoolInfosFromMemories(), and MemoryTracker::size().