Remove functions used in only ExecutionPlan in ExecutionBuilder (#546)
author김수진/동작제어Lab(SR)/Engineer/삼성전자 <sjsujin.kim@samsung.com>
Wed, 11 Apr 2018 01:51:24 +0000 (10:51 +0900)
committer최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 <hk0110.choi@samsung.com>
Wed, 11 Apr 2018 01:51:24 +0000 (10:51 +0900)
This commit removes functions used in only ExecutionPlan in ExecutionBuilder

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
src/runtime/ref/nn/runtime/ExecutionBuilder.cpp
src/runtime/ref/nn/runtime/ExecutionBuilder.h

index 7560768..2c8d380 100644 (file)
@@ -72,18 +72,6 @@ int ModelArgumentInfo::setFromMemory(const Operand& operand, const ANeuralNetwor
     return ANEURALNETWORKS_NO_ERROR;
 }
 
-#if 0 // REF-ANN
-int ModelArgumentInfo::setFromTemporaryMemory(const Operand& operand,
-                                              uint32_t poolIndex, uint32_t offset) {
-    dimensions = operand.dimensions;
-    state = ModelArgumentInfo::MEMORY;
-    locationAndLength =
-            {.poolIndex = poolIndex, .offset = offset, .length = sizeOfData(operand)};
-    buffer = nullptr;
-    return ANEURALNETWORKS_NO_ERROR;
-}
-
-#endif
 int ModelArgumentInfo::updateDimensionInfo(const Operand& operand,
                                            const ANeuralNetworksOperandType* newType) {
     if (newType == nullptr) {
@@ -482,16 +470,6 @@ void StepExecutor::mapInputOrOutput(const ModelArgumentInfo& builderInputOrOutpu
     }
 }
 
-int StepExecutor::setInputOrOutputFromTemporaryMemory(const Operand& inputOrOutputOperand,
-                                                      const Memory* memory, uint32_t offset,
-                                                      ModelArgumentInfo* inputOrOutputInfo) {
-    // Should be similar to
-    //     ExecutionBuilder::setInputFromMemory()
-    //     ExecutionBuilder::setOutputFromMemory()
-
-    uint32_t poolIndex = mMemories.add(memory);
-    return inputOrOutputInfo->setFromTemporaryMemory(inputOrOutputOperand, poolIndex, offset);
-}
 #endif // REF-ANN
 int StepExecutor::startCompute(sp<ExecutionCallback>* synchronizationCallback) {
 #if 0 // REF-ANN
index 9b34855..c6dd929 100644 (file)
@@ -67,9 +67,6 @@ struct ModelArgumentInfo {
                        uint32_t length);
     int setFromMemory(const Operand& operand, const ANeuralNetworksOperandType* type,
                       uint32_t poolIndex, uint32_t offset, uint32_t length);
-#if 0 // REF-ANN
-    int setFromTemporaryMemory(const Operand& operand, uint32_t poolIndex, uint32_t offset);
-#endif
     int updateDimensionInfo(const Operand& operand, const ANeuralNetworksOperandType* newType);
 };
 
@@ -150,18 +147,6 @@ public:
                          &mOutputs[executorIndex]);
     }
 
-    // The input or output is assumed to have the size of the
-    // corresponding operand.
-    int setInputFromTemporaryMemory(uint32_t inputIndex, const Memory* memory, uint32_t offset) {
-        return setInputOrOutputFromTemporaryMemory(mModel->getInputOperand(inputIndex),
-                                                   memory, offset,
-                                                   &mInputs.at(inputIndex));
-    }
-    int setOutputFromTemporaryMemory(uint32_t outputIndex, const Memory* memory, uint32_t offset) {
-        return setInputOrOutputFromTemporaryMemory(mModel->getOutputOperand(outputIndex),
-                                                   memory, offset,
-                                                   &mOutputs.at(outputIndex));
-    }
 #endif // REF-ANN
     // Executes using the (driver, preparedModel) specified at construction time.
     int startCompute(sp<ExecutionCallback>* synchronizationCallback);
@@ -179,10 +164,6 @@ private:
     void mapInputOrOutput(const ModelArgumentInfo& builderInputOrOutput,
                           ModelArgumentInfo* executorInputOrOutput);
 
-    int setInputOrOutputFromTemporaryMemory(const Operand& inputOrOutputOperand,
-                                            const Memory* memory, uint32_t offset,
-                                            ModelArgumentInfo* inputOrOutputInfo);
-
     // describes the full (possibly multiple-"step") execution
 #endif // REF-ANN
 private: