LLVM 22.0.0git
|
Embedding is a datatype that wraps std::vector<double>. More...
#include "llvm/Analysis/IR2Vec.h"
Public Types | |
using | iterator = typename std::vector< double >::iterator |
using | const_iterator = typename std::vector< double >::const_iterator |
Embedding is a datatype that wraps std::vector<double>.
It provides additional functionality for arithmetic and comparison operations. It is meant to be used like std::vector<double> 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.
using llvm::ir2vec::Embedding::const_iterator = typename std::vector<double>::const_iterator |
using llvm::ir2vec::Embedding::iterator = typename std::vector<double>::iterator |
|
default |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
Returns true if the embedding is approximately equal to the RHS embedding within the specified tolerance.
Definition at line 131 of file IR2Vec.cpp.
References assert(), llvm::errs(), LLVM_DEBUG, RHS, and size().
Referenced by llvm::FunctionPropertiesInfo::operator==().
|
inline |
Definition at line 108 of file IR2Vec.h.
Referenced by operator*=(), operator+=(), and operator-=().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 109 of file IR2Vec.h.
Referenced by operator*=(), operator+=(), and operator-=().
|
inline |
|
inline |
Embedding Embedding::operator* | ( | double | Factor | ) | const |
Definition at line 118 of file IR2Vec.cpp.
Embedding & Embedding::operator*= | ( | double | Factor | ) |
Definition at line 112 of file IR2Vec.cpp.
Definition at line 93 of file IR2Vec.cpp.
References RHS.
Definition at line 106 of file IR2Vec.cpp.
References RHS.
|
inline |
|
inline |
void Embedding::print | ( | raw_ostream & | OS | ) | const |
Definition at line 144 of file IR2Vec.cpp.
References llvm::format(), and OS.
|
inline |
Definition at line 92 of file IR2Vec.h.
Referenced by approximatelyEquals(), operator+=(), operator-=(), and scaleAndAdd().