ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Operand.h File Reference
#include "OperandType.h"
#include <cstdint>
#include <vector>

Go to the source code of this file.

Data Structures

struct  DataLocation
 
struct  Operand
 

Enumerations

enum class  OperandLifeTime : int32_t {
  TEMPORARY_VARIABLE = 0 , MODEL_INPUT = 1 , MODEL_OUTPUT = 2 , CONSTANT_COPY = 3 ,
  CONSTANT_REFERENCE = 4 , NO_VALUE = 5
}
 

Functions

uint32_t sizeOfData (const Operand &operand)
 

Enumeration Type Documentation

◆ OperandLifeTime

enum class OperandLifeTime : int32_t
strong
Enumerator
TEMPORARY_VARIABLE 
MODEL_INPUT 
MODEL_OUTPUT 
CONSTANT_COPY 
CONSTANT_REFERENCE 
NO_VALUE 

Definition at line 26 of file Operand.h.

Function Documentation

◆ sizeOfData()

uint32_t sizeOfData ( const Operand operand)
inline

Definition at line 56 of file Operand.h.

57{
58 return sizeOfData(operand.type, operand.dimensions);
59}
uint32_t sizeOfData(const Operand &operand)
Definition Operand.h:56
std::vector< uint32_t > dimensions
Definition Operand.h:46
OperandType type
Definition Operand.h:42

References Operand::dimensions, sizeOfData(), and Operand::type.

Referenced by reshapeGeneric(), ModelArgumentInfo::setFromMemory(), ModelArgumentInfo::setFromPointer(), ModelBuilder::setOperandValue(), ModelBuilder::setOperandValueFromMemory(), and sizeOfData().