LLVM: llvm::ir2vec::Embedding Struct Reference (original) (raw)

Embedding is a datatype that wraps std::vector. More...

#include "[llvm/Analysis/IR2Vec.h](IR2Vec%5F8h%5Fsource.html)"

Public Types
using iterator = std::vector::iterator
using const_iterator = std::vector::const_iterator
Public Member Functions
Embedding ()=default
Embedding (const std::vector< double > &V)
Embedding (std::vector< double > &&V)
Embedding (std::initializer_list< double > IL)
Embedding (size_t Size)
Embedding (size_t Size, double InitialValue)
size_t size () const
bool empty () const
double & operator[] (size_t Itr)
const double & operator[] (size_t Itr) const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
const std::vector< double > & getData () const
LLVM_ABI Embedding & operator+= (const Embedding &RHS)
Arithmetic operators.
LLVM_ABI Embedding operator+ (const Embedding &RHS) const
LLVM_ABI Embedding & operator-= (const Embedding &RHS)
LLVM_ABI Embedding operator- (const Embedding &RHS) const
LLVM_ABI Embedding & operator*= (double Factor)
LLVM_ABI Embedding operator* (double Factor) const
LLVM_ABI Embedding & scaleAndAdd (const Embedding &Src, float Factor)
Adds Src Embedding scaled by Factor with the called Embedding.
LLVM_ABI bool approximatelyEquals (const Embedding &RHS, double Tolerance=1e-4) const
Returns true if the embedding is approximately equal to the RHS embedding within the specified tolerance.
LLVM_ABI void print (raw_ostream &OS) const

Embedding is a datatype that wraps std::vector.

It provides additional functionality for arithmetic and comparison operations. It is meant to be used like std::vector but is more restrictive in the sense that it does not allow the user to change the size of the embedding vector. The dimension of the embedding is fixed at the time of construction of Embedding object. But the elements can be modified in-place.

Definition at line 87 of file IR2Vec.h.

const_iterator

iterator

using llvm::ir2vec::Embedding::iterator = std::vector::iterator

llvm::ir2vec::Embedding::Embedding ( ) default

Embedding() [2/6]

llvm::ir2vec::Embedding::Embedding ( const std::vector< double > & V) inline

Embedding() [3/6]

llvm::ir2vec::Embedding::Embedding ( std::vector< double > && V) inline

Embedding() [4/6]

llvm::ir2vec::Embedding::Embedding ( std::initializer_list< double > IL) inline

Embedding() [5/6]

llvm::ir2vec::Embedding::Embedding ( size_t Size) inlineexplicit

Embedding() [6/6]

llvm::ir2vec::Embedding::Embedding ( size_t Size, double InitialValue ) inline

approximatelyEquals()

bool Embedding::approximatelyEquals ( const Embedding & RHS,
double Tolerance = 1e-4 ) const

begin() [1/2]

iterator llvm::ir2vec::Embedding::begin ( ) inline

begin() [2/2]

const_iterator llvm::ir2vec::Embedding::begin ( ) const inline

cbegin()

const_iterator llvm::ir2vec::Embedding::cbegin ( ) const inline

cend()

const_iterator llvm::ir2vec::Embedding::cend ( ) const inline

empty()

bool llvm::ir2vec::Embedding::empty ( ) const inline

end() [1/2]

iterator llvm::ir2vec::Embedding::end ( ) inline

end() [2/2]

const_iterator llvm::ir2vec::Embedding::end ( ) const inline

getData()

const std::vector< double > & llvm::ir2vec::Embedding::getData ( ) const inline

operator*()

Embedding Embedding::operator* ( double Factor ) const

operator*=()

Embedding & Embedding::operator*= ( double Factor )

operator+()

operator+=()

operator-()

operator-=()

operator[]() [1/2]

double & llvm::ir2vec::Embedding::operator[] ( size_t Itr) inline

operator[]() [2/2]

const double & llvm::ir2vec::Embedding::operator[] ( size_t Itr) const inline

print()

scaleAndAdd()

size()

size_t llvm::ir2vec::Embedding::size ( ) const inline

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