Lines Matching refs:operand
109 Operand& operand = mOperands[index]; in setOperandValue() local
116 operand.lifetime = OperandLifeTime::NO_VALUE; in setOperandValue()
118 operand.location = {.poolIndex = 0, .offset = 0, .length = 0}; in setOperandValue()
120 if (TypeManager::get()->isTensorType(operand.type) && in setOperandValue()
121 tensorHasUnspecifiedDimensions(operand)) { in setOperandValue()
132 if (operand.type != OperandType::OEM) { in setOperandValue()
133 uint32_t neededLength = TypeManager::get()->getSizeOfData(operand); in setOperandValue()
144 operand.lifetime = OperandLifeTime::CONSTANT_COPY; in setOperandValue()
145 operand.location = { in setOperandValue()
147 memcpy(&mSmallOperandValues[operand.location.offset], buffer, valueLength); in setOperandValue()
148 VLOG(MODEL) << "Copied small value to offset " << operand.location.offset; in setOperandValue()
151 operand.lifetime = OperandLifeTime::CONSTANT_REFERENCE; in setOperandValue()
153 typedef decltype(operand.location.poolIndex) PoolIndexType; in setOperandValue()
154 typedef decltype(operand.location.offset) OffsetType; in setOperandValue()
155 operand.location = {.poolIndex = ~PoolIndexType(0), in setOperandValue()
178 Operand& operand = mOperands[index]; in setOperandSymmPerChannelQuantParams() local
181 operand, channelQuant, in setOperandSymmPerChannelQuantParams()
185 switch (operand.type) { in setOperandSymmPerChannelQuantParams()
187 operand.extraParams.channelQuant({ in setOperandSymmPerChannelQuantParams()
195 << "invalid operand type " << static_cast<int32_t>(operand.type); in setOperandSymmPerChannelQuantParams()
211 Operand& operand = mOperands[index]; in setOperandExtensionData() local
223 if (!isExtensionOperandType(operand.type)) { in setOperandExtensionData()
226 << static_cast<int32_t>(operand.type); in setOperandExtensionData()
231 operand.extraParams.none(); in setOperandExtensionData()
233 operand.extraParams.extension( in setOperandExtensionData()
247 Operand& operand = mOperands[l.operandIndex]; in copyLargeValuesToSharedMemory() local
248 nnAssert(operand.lifetime == OperandLifeTime::CONSTANT_REFERENCE); in copyLargeValuesToSharedMemory()
249 poolSize += alignBytesNeeded(poolSize, operand.location.length); in copyLargeValuesToSharedMemory()
250 operand.location.offset = poolSize; in copyLargeValuesToSharedMemory()
251 poolSize += operand.location.length; in copyLargeValuesToSharedMemory()
270 Operand& operand = mOperands[l.operandIndex]; in copyLargeValuesToSharedMemory() local
271 operand.location.poolIndex = poolIndex; in copyLargeValuesToSharedMemory()
272 memcpy(memoryPointer + operand.location.offset, l.buffer, operand.location.length); in copyLargeValuesToSharedMemory()
291 Operand& operand = mOperands[index]; in setOperandValueFromMemory() local
292 if (TypeManager::get()->isTensorType(operand.type) && tensorHasUnspecifiedDimensions(operand)) { in setOperandValueFromMemory()
303 uint32_t neededLength = TypeManager::get()->getSizeOfData(operand); in setOperandValueFromMemory()
312 operand.lifetime = OperandLifeTime::CONSTANT_REFERENCE; in setOperandValueFromMemory()
313 operand.location = {.poolIndex = mMemories.add(memory), in setOperandValueFromMemory()
397 Operand& operand = mOperands[operandIndex]; in identifyInputsAndOutputs() local
398 if (operand.lifetime != OperandLifeTime::TEMPORARY_VARIABLE) { in identifyInputsAndOutputs()
405 operand.lifetime = lifetime; in identifyInputsAndOutputs()
564 for (const auto& operand : mOperands) { in getExtensionNameToPrefixMap() local
565 if (isExtensionOperandType(operand.type)) { in getExtensionNameToPrefixMap()
566 addExtensionWithPrefix(static_cast<uint32_t>(operand.type) >> kLowBitsType); in getExtensionNameToPrefixMap()