LLVM  15.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::TensorSpec Class Referencefinal

#include "llvm/Analysis/TensorSpec.h"

Public Member Functions

const std::string & name () const
 
int port () const
 
TensorType type () const
 
const std::vector< int64_t > & shape () const
 
bool operator== (const TensorSpec &Other) const
 
bool operator!= (const TensorSpec &Other) const
 
size_t getElementCount () const
 Get the number of elements in a tensor with this shape. More...
 
size_t getElementByteSize () const
 Get the size, in bytes, of one element. More...
 
size_t getTotalTensorBufferSize () const
 Get the total size of a memory buffer needed to store the whole tensor. More...
 
template<typename T >
bool isElementType () const
 

Static Public Member Functions

template<typename T >
static TensorSpec createSpec (const std::string &Name, const std::vector< int64_t > &Shape, int Port=0)
 

Detailed Description

Definition at line 52 of file TensorSpec.h.

Member Function Documentation

◆ createSpec()

template<typename T >
static TensorSpec llvm::TensorSpec::createSpec ( const std::string &  Name,
const std::vector< int64_t > &  Shape,
int  Port = 0 
)
inlinestatic

Definition at line 55 of file TensorSpec.h.

References T.

◆ getElementByteSize()

size_t llvm::TensorSpec::getElementByteSize ( ) const
inline

Get the size, in bytes, of one element.

Definition at line 76 of file TensorSpec.h.

◆ getElementCount()

size_t llvm::TensorSpec::getElementCount ( ) const
inline

Get the number of elements in a tensor with this shape.

Definition at line 74 of file TensorSpec.h.

◆ getTotalTensorBufferSize()

size_t llvm::TensorSpec::getTotalTensorBufferSize ( ) const
inline

Get the total size of a memory buffer needed to store the whole tensor.

Definition at line 78 of file TensorSpec.h.

Referenced by llvm::MLModelRunner::setUpBufferForTensor().

◆ isElementType()

template<typename T >
bool llvm::TensorSpec::isElementType ( ) const
inline

Definition at line 80 of file TensorSpec.h.

Referenced by llvm::loadOutputSpecs().

◆ name()

const std::string& llvm::TensorSpec::name ( ) const
inline

Definition at line 61 of file TensorSpec.h.

Referenced by llvm::LoggedFeatureSpec::getLoggingName(), and llvm::loadOutputSpecs().

◆ operator!=()

bool llvm::TensorSpec::operator!= ( const TensorSpec Other) const
inline

Definition at line 71 of file TensorSpec.h.

References Other.

◆ operator==()

bool llvm::TensorSpec::operator== ( const TensorSpec Other) const
inline

Definition at line 66 of file TensorSpec.h.

References Other.

◆ port()

int llvm::TensorSpec::port ( ) const
inline

Definition at line 62 of file TensorSpec.h.

◆ shape()

const std::vector<int64_t>& llvm::TensorSpec::shape ( ) const
inline

Definition at line 64 of file TensorSpec.h.

◆ type()

TensorType llvm::TensorSpec::type ( ) const
inline

Definition at line 63 of file TensorSpec.h.


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