|
LLVM 24.0.0git
|
Embedding is a datatype that wraps std::vector<double>. More...
#include "llvm/Analysis/IR2Vec.h"
Public Types | |
| using | iterator = std::vector<double>::iterator |
| using | const_iterator = 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 = std::vector<double>::const_iterator |
| using llvm::ir2vec::Embedding::iterator = 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 |
Definition at line 95 of file IR2Vec.h.
References llvm::Size.
|
inline |
Definition at line 96 of file IR2Vec.h.
References llvm::Size.
Returns true if the embedding is approximately equal to the RHS embedding within the specified tolerance.
Definition at line 110 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 |
|
inline |
Returns true if all elements of the embedding are zero.
Definition at line 141 of file IR2Vec.h.
References llvm::all_of(), and D().
| Embedding Embedding::operator* | ( | double | Factor | ) | const |
Definition at line 97 of file IR2Vec.cpp.
References Embedding().
| Embedding & Embedding::operator*= | ( | double | Factor | ) |
Definition at line 91 of file IR2Vec.cpp.
References begin(), Embedding(), and end().
Definition at line 72 of file IR2Vec.cpp.
References Embedding().
Arithmetic operators.
Definition at line 65 of file IR2Vec.cpp.
References assert(), begin(), Embedding(), end(), and size().
Definition at line 85 of file IR2Vec.cpp.
References Embedding().
Definition at line 78 of file IR2Vec.cpp.
References assert(), begin(), Embedding(), end(), and size().
|
inline |
| void Embedding::print | ( | raw_ostream & | OS | ) | const |
Definition at line 123 of file IR2Vec.cpp.
References llvm::format().
Adds Src Embedding scaled by Factor with the called Embedding.
Called_Embedding += Src * Factor
Definition at line 103 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().