ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::PassData Class Reference

class that encapsulate value returned and taken by pass More...

#include <PassData.h>

Collaboration diagram for nnc::PassData:

Public Member Functions

 PassData (std::nullptr_t data)
 
 PassData (mir::Graph *graph)
 Implicit conversion from Graph* to PassData.
 
 operator mir::Graph * () const
 Implicit conversion from PassData to Graph*.
 
 PassData (mir::TensorVariant *tv)
 Implicit conversion from Graph* to PassData.
 
 operator mir::TensorVariant * () const
 Implicit conversion from PassData to Graph*.
 

Detailed Description

class that encapsulate value returned and taken by pass

Definition at line 29 of file PassData.h.

Constructor & Destructor Documentation

◆ PassData() [1/3]

nnc::PassData::PassData ( std::nullptr_t  data)
inline

Definition at line 32 of file PassData.h.

33 : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
34 _dataContainer{.unknown = data}, _dataType(PDT::UNKNOWN)
35 {
36 }

◆ PassData() [2/3]

nnc::PassData::PassData ( mir::Graph graph)
inline

Implicit conversion from Graph* to PassData.

Definition at line 41 of file PassData.h.

42 : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
43 _dataContainer{.graph = graph}, _dataType(PDT::GRAPH)
44 {
45 }
mir::Graph * graph
Definition PassData.h:88

◆ PassData() [3/3]

nnc::PassData::PassData ( mir::TensorVariant tv)
inline

Implicit conversion from Graph* to PassData.

Definition at line 60 of file PassData.h.

61 : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
62 _dataContainer{.tensorVariant = tv}, _dataType(PDT::TENSOR_VARIANT)
63 {
64 }

Member Function Documentation

◆ operator mir::Graph *()

nnc::PassData::operator mir::Graph * ( ) const
inline

Implicit conversion from PassData to Graph*.

Definition at line 50 of file PassData.h.

51 { // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
52 if (_dataType != PDT::GRAPH)
53 return nullptr;
54 return _dataContainer.graph;
55 }

◆ operator mir::TensorVariant *()

nnc::PassData::operator mir::TensorVariant * ( ) const
inline

Implicit conversion from PassData to Graph*.

Definition at line 69 of file PassData.h.

70 { // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
71 if (_dataType != PDT::TENSOR_VARIANT)
72 return nullptr;
73 return _dataContainer.tensorVariant;
74 }

Field Documentation

◆ graph

◆ tensorVariant

mir::TensorVariant* nnc::PassData::tensorVariant

Definition at line 89 of file PassData.h.

◆ unknown

void* nnc::PassData::unknown

Definition at line 90 of file PassData.h.


The documentation for this class was generated from the following file: