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 |
Referenced by approximatelyEquals(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), and scaleAndAdd().
|
inline |
|
inline |
Definition at line 92 of file IR2Vec.h.
References llvm::move().
|
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(), Embedding(), llvm::errs(), LLVM_DEBUG, and size().
|
inline |
Definition at line 114 of file IR2Vec.h.
Referenced by operator*=(), operator+=(), and operator-=().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 115 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.
References Embedding().
Embedding & Embedding::operator*= | ( | double | Factor | ) |
Definition at line 112 of file IR2Vec.cpp.
References begin(), Embedding(), and end().
Definition at line 93 of file IR2Vec.cpp.
References Embedding().
Arithmetic operators.
Definition at line 86 of file IR2Vec.cpp.
References assert(), begin(), Embedding(), end(), and size().
Definition at line 106 of file IR2Vec.cpp.
References Embedding().
Definition at line 99 of file IR2Vec.cpp.
References assert(), begin(), Embedding(), end(), and size().
|
inline |
|
inline |
void Embedding::print | ( | raw_ostream & | OS | ) | const |
Definition at line 144 of file IR2Vec.cpp.
References llvm::format().
Adds Src Embedding scaled by Factor with the called Embedding.
Called_Embedding += Src * Factor
Definition at line 124 of file IR2Vec.cpp.
References assert(), Embedding(), and size().
|
inline |
Definition at line 98 of file IR2Vec.h.
Referenced by approximatelyEquals(), operator+=(), operator-=(), and scaleAndAdd().