• Home
  • Raw
  • Download

Lines Matching refs:sourceOperandIndex

190 std::string toString(SourceOperandIndex sourceOperandIndex) {  in toString()  argument
191 return "(" + std::to_string(sourceOperandIndex.first) + ", " + in toString()
192 std::to_string(sourceOperandIndex.second) + ")"; in toString()
286 void DynamicTemporaries::declare(SourceOperandIndex sourceOperandIndex, uint32_t stepIndex, in declare() argument
290 << toString(sourceOperandIndex) << ", stepIndex = " << stepIndex in declare()
298 sourceOperandIndex, InternalLocationAndShape{stepIndex, 0, initialDimensions, in declare()
301 mStepIndexToSourceOperandIndexes[stepIndex].emplace_back(sourceOperandIndex); in declare()
304 bool DynamicTemporaries::redeclare(SourceOperandIndex sourceOperandIndex, in redeclare() argument
306 auto createAndLogResult = [sourceOperandIndex, &newDimensions, newLength](bool changedShape) { in redeclare()
308 << toString(sourceOperandIndex) in redeclare()
317 InternalLocationAndShape& temp = mSourceOperandToTemporary.at(sourceOperandIndex); in redeclare()
346 for (const auto& sourceOperandIndex : sourceOperandIndexesI->second) { in allocate() local
347 InternalLocationAndShape& temp = mSourceOperandToTemporary.at(sourceOperandIndex); in allocate()
384 SourceOperandIndex sourceOperandIndex, bool mustBeAllocated) const { in lookup() argument
386 if (auto it = mSourceOperandToTemporary.find(sourceOperandIndex); in lookup()
391 CHECK(isAllocated) << "Source operand " << toString(sourceOperandIndex) in lookup()
415 int ExecutionStep::addOperand(uint32_t sourceOperandIndex, uint32_t* stepOperandIndex, in addOperand() argument
418 auto i = mOperandMap.find(sourceOperandIndex); in addOperand()
427 mOperandMap.emplace(sourceOperandIndex, *stepOperandIndex); in addOperand()
431 const Operand& operand = sourceModel.getOperand(sourceOperandIndex); in addOperand()
471 mTempsAsStepModelInputs.emplace_back(sourceOperandIndex, *stepOperandIndex); in addOperand()
476 mPlan->recordTemporaryDef(SourceOperandIndex(mSourceModelIndex, sourceOperandIndex), in addOperand()
481 mModelInputs.emplace_back(sourceOperandIndex, *stepOperandIndex); in addOperand()
488 mOutputsAsStepModelInputs.emplace_back(sourceOperandIndex, *stepOperandIndex); in addOperand()
492 mModelOutputs.emplace_back(sourceOperandIndex, *stepOperandIndex); in addOperand()
495 mPlan->recordOutputDef(SourceOperandIndex(mSourceModelIndex, sourceOperandIndex), in addOperand()
560 SourceOperandIndex sourceOperandIndex(mSourceModelIndex, stepModelOperandIndex); in mapInputsAndOutputs() local
561 if (auto it = sourceOperandToLocationOfTemporary.find(sourceOperandIndex); in mapInputsAndOutputs()
566 } else if (auto loc = dynamicTemporaries.lookup(sourceOperandIndex); loc != std::nullopt) { in mapInputsAndOutputs()
569 } else if (auto it = sourceOperandToInputIndex.find(sourceOperandIndex); in mapInputsAndOutputs()
572 } else if (auto it = sourceOperandToOutputIndex.find(sourceOperandIndex); in mapInputsAndOutputs()
578 } else if (auto it = sourceOperandToConstantReference.find(sourceOperandIndex); in mapInputsAndOutputs()
586 << toString(sourceOperandIndex); in mapInputsAndOutputs()
590 SourceOperandIndex sourceOperandIndex(mSourceModelIndex, stepModelOperandIndex); in mapInputsAndOutputs() local
591 if (auto it = sourceOperandToLocationOfTemporary.find(sourceOperandIndex); in mapInputsAndOutputs()
596 } else if (auto loc = dynamicTemporaries.lookup(sourceOperandIndex); loc != std::nullopt) { in mapInputsAndOutputs()
599 } else if (auto it = sourceOperandToOutputIndex.find(sourceOperandIndex); in mapInputsAndOutputs()
604 << toString(sourceOperandIndex); in mapInputsAndOutputs()
617 [this](const SourceOperandIndex& sourceOperandIndex) { in findModelOutputsThatAreDownstreamInputs() argument
618 const auto it = mOutputToDefiningExecutionStep.find(sourceOperandIndex); in findModelOutputsThatAreDownstreamInputs()
625 << toString(sourceOperandIndex) << ")"; in findModelOutputsThatAreDownstreamInputs()
626 CHECK(mSourceOperandToOutputIndex.find(sourceOperandIndex) != in findModelOutputsThatAreDownstreamInputs()
629 mSourceOperandToOutputIndex.at(sourceOperandIndex)); in findModelOutputsThatAreDownstreamInputs()
634 SourceOperandIndex sourceOperandIndex(step->getSourceModelIndex(), output.first); in findModelOutputsThatAreDownstreamInputs() local
635 declareModelOutputIsDownstreamInput(sourceOperandIndex); in findModelOutputsThatAreDownstreamInputs()
642 auto recordAsOutputIfTemporary = [this](const SourceOperandIndex& sourceOperandIndex) { in findTempsAsStepModelOutputs() argument
643 const auto it = mTemporaryToDefiningExecutionStep.find(sourceOperandIndex); in findTempsAsStepModelOutputs()
652 mSteps[stepIndex]->executionStep()->recordTempAsStepModelOutput(sourceOperandIndex.second); in findTempsAsStepModelOutputs()
657 SourceOperandIndex sourceOperandIndex(step->getSourceModelIndex(), input.first); in findTempsAsStepModelOutputs() local
658 recordAsOutputIfTemporary(sourceOperandIndex); in findTempsAsStepModelOutputs()
662 for (const SourceOperandIndex& sourceOperandIndex : step->outerInputOperands) { in findTempsAsStepModelOutputs() local
663 recordAsOutputIfTemporary(sourceOperandIndex); in findTempsAsStepModelOutputs()
666 for (const SourceOperandIndex& sourceOperandIndex : step->outerInputOperands) { in findTempsAsStepModelOutputs() local
667 recordAsOutputIfTemporary(sourceOperandIndex); in findTempsAsStepModelOutputs()
794 uint32_t sourceOperandIndex = e.first; in finishStepModel() local
795 return mainModelOperandToInputIndex[sourceOperandIndex]; in finishStepModel()
804 uint32_t sourceOperandIndex = e.first; in finishStepModel() local
805 return mainModelOperandToOutputIndex[sourceOperandIndex]; in finishStepModel()
814 uint32_t sourceOperandIndex = e.first; in finishStepModel() local
815 return mainModelOperandToOutputIndex[sourceOperandIndex]; in finishStepModel()
883 for (const auto& sourceOperandIndex : operands) { in finish() local
884 const ModelBuilder* sourceModel = sourceModels->getModel(sourceOperandIndex.first); in finish()
885 const Operand& operand = sourceModel->getOperand(sourceOperandIndex.second); in finish()
969 sourceModels](const SourceOperandIndex& sourceOperandIndex) { in findControlFlowBoundaryConstants() argument
970 const ModelBuilder* sourceModel = sourceModels->getModel(sourceOperandIndex.first); in findControlFlowBoundaryConstants()
971 const Operand& operand = sourceModel->getOperand(sourceOperandIndex.second); in findControlFlowBoundaryConstants()
974 mSourceOperandToBoundaryConstantCopy[sourceOperandIndex] = { in findControlFlowBoundaryConstants()
979 mSourceOperandToBoundaryConstantCopy[sourceOperandIndex] = { in findControlFlowBoundaryConstants()
984 mSourceOperandToBoundaryConstantReference[sourceOperandIndex] = { in findControlFlowBoundaryConstants()
994 for (const auto& sourceOperandIndex : step->outerInputOperands) { in findControlFlowBoundaryConstants() local
995 handleBoundaryConstants(sourceOperandIndex); in findControlFlowBoundaryConstants()
998 for (const auto& sourceOperandIndex : step->outerInputOperands) { in findControlFlowBoundaryConstants() local
999 handleBoundaryConstants(sourceOperandIndex); in findControlFlowBoundaryConstants()
1148 for (const auto& [sourceOperandIndex, location] : sourceOperandToConstantCopy) { in Controller()
1150 mSourceOperandToLocationOfTemporary[sourceOperandIndex].offset, in Controller()
1244 const SourceOperandIndex& sourceOperandIndex, in makeController()
1251 const Operand& sourceOperand = executionBuilder->getSourceOperand(sourceOperandIndex); in makeController()
1261 body->getMemoryPreferenceOfSourceOperand(sourceOperandIndex); in makeController()
1264 auto [_, isNew] = sourceOperandToLocationOfTemporary->emplace(sourceOperandIndex, loc); in makeController()
1266 VLOG(EXECUTION) << "temp: operand " << toString(sourceOperandIndex) in makeController()
1316 for (const auto& sourceOperandIndex : step->outerOutputOperands) { in makeController() local
1317 mapTemporary(sourceOperandIndex, &sourceOperandToLocationOfTemporary); in makeController()
1333 for (const auto& sourceOperandIndex : step->outerOutputOperands) { in makeController() local
1334 mapTemporary(sourceOperandIndex, &sourceOperandToLocationOfTemporary); in makeController()
1339 for (const auto& sourceOperandIndex : step->bodyOutputOperands) { in makeController() local
1340 mapTemporary(sourceOperandIndex, &sourceOperandToLocationOfTemporary, in makeController()
1343 mapTemporary(sourceOperandIndex, &sourceOperandToLocationOfTemporary2, in makeController()
1355 for (const auto& [sourceOperandIndex, location] : body->mSourceOperandToBoundaryConstantCopy) { in makeController()
1356 const auto memoryPreference = body->getMemoryPreferenceOfSourceOperand(sourceOperandIndex); in makeController()
1359 sourceOperandToLocationOfTemporary.emplace(sourceOperandIndex, loc); in makeController()
1360 VLOG(EXECUTION) << "temp (boundary constant): operand " << toString(sourceOperandIndex) in makeController()
1368 SourceOperandIndex sourceOperandIndex, in makeController()
1371 const auto memoryPreference = body->getMemoryPreferenceOfSourceOperand(sourceOperandIndex); in makeController()
1375 dynamicTemporaries.declare(sourceOperandIndex, definingStepIndex, sourceOperand.dimensions, in makeController()
1893 void ExecutionPlan::recordOutputDef(SourceOperandIndex sourceOperandIndex, uint32_t stepIndex) { in recordOutputDef() argument
1895 compound()->mOutputToDefiningExecutionStep.emplace(sourceOperandIndex, stepIndex); in recordOutputDef()
1897 << toString(sourceOperandIndex) << " already defined by step " << it->second; in recordOutputDef()
1900 void ExecutionPlan::recordTemporaryDef(SourceOperandIndex sourceOperandIndex, uint32_t stepIndex) { in recordTemporaryDef() argument
1902 compound()->mTemporaryToDefiningExecutionStep.emplace(sourceOperandIndex, stepIndex); in recordTemporaryDef()
1904 << toString(sourceOperandIndex) << " already defined by step " << it->second; in recordTemporaryDef()
2016 const auto sourceOperandIndex = mPlan->getInputSourceOperand(index); in forEachStepRoleOfInput() local
2017 forEachStepRoleOfSourceOperand(sourceOperandIndex, callback); in forEachStepRoleOfInput()
2023 const auto sourceOperandIndex = mPlan->getOutputSourceOperand(index); in forEachStepRoleOfOutput() local
2024 forEachStepRoleOfSourceOperand(sourceOperandIndex, callback); in forEachStepRoleOfOutput()
2043 const auto sourceOperandIndex = type == IOType::INPUT ? getInputSourceOperand(index) in getMemoryPreference() local
2045 return compound()->getMemoryPreferenceOfSourceOperand(sourceOperandIndex); in getMemoryPreference()
2073 const auto sourceOperandIndex = SourceOperandIndex(sourceModelIndex, entry.first); in forEachDynamicTemporary() local
2074 const auto& sourceOperand = getSourceOperand(sourceOperandIndex); in forEachDynamicTemporary()
2076 fn(sourceOperandIndex, sourceOperand, stepIndex); in forEachDynamicTemporary()