class TensorSpec
Declaration
class TensorSpec { /* full declaration omitted */ };
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:52
Member Variables
- private std::string Name
- private int Port = 0
- private llvm::TensorType Type = TensorType::Invalid
- private std::vector<int64_t> Shape
- private size_t ElementCount = 0
- private size_t ElementSize = 0
Method Overview
- private TensorSpec(const std::string & Name, int Port, llvm::TensorType Type, size_t ElementSize, const std::vector<int64_t> & Shape)
- public template <typename T>static llvm::TensorSpec createSpec(const std::string & Name, const std::vector<int64_t> & Shape, int Port = 0)
- private template <typename T>static llvm::TensorType getDataType()
- public size_t getElementByteSize() const
- public size_t getElementCount() const
- public size_t getTotalTensorBufferSize() const
- public template <typename T>bool isElementType() const
- public const std::string & name() const
- public int port() const
- public const std::vector<int64_t> & shape() const
- public llvm::TensorType type() const
Methods
¶TensorSpec(const std::string& Name,
int Port,
llvm::TensorType Type,
size_t ElementSize,
const std::vector<int64_t>& Shape)
TensorSpec(const std::string& Name,
int Port,
llvm::TensorType Type,
size_t ElementSize,
const std::vector<int64_t>& Shape)
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:85
Parameters
- const std::string& Name
- int Port
- llvm::TensorType Type
- size_t ElementSize
- const std::vector<int64_t>& Shape
¶template <typename T>
static llvm::TensorSpec createSpec(
const std::string& Name,
const std::vector<int64_t>& Shape,
int Port = 0)
template <typename T>
static llvm::TensorSpec createSpec(
const std::string& Name,
const std::vector<int64_t>& Shape,
int Port = 0)
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:55
Templates
- T
Parameters
- const std::string& Name
- const std::vector<int64_t>& Shape
- int Port = 0
¶template <typename T>
static llvm::TensorType getDataType()
template <typename T>
static llvm::TensorType getDataType()
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:88
Templates
- T
¶size_t getElementByteSize() const
size_t getElementByteSize() const
Description
Get the size, in bytes, of one element.
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:76
¶size_t getElementCount() const
size_t getElementCount() const
Description
Get the number of elements in a tensor with this shape.
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:74
¶size_t getTotalTensorBufferSize() const
size_t getTotalTensorBufferSize() const
Description
Get the total size of a memory buffer needed to store the whole tensor.
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:78
¶template <typename T>
bool isElementType() const
template <typename T>
bool isElementType() const
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:80
Templates
- T
¶const std::string& name() const
const std::string& name() const
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:61
¶int port() const
int port() const
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:62
¶const std::vector<int64_t>& shape() const
const std::vector<int64_t>& shape() const
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:64
¶llvm::TensorType type() const
llvm::TensorType type() const
Declared at: llvm/include/llvm/Analysis/TensorSpec.h:63