LLVM 22.0.0git
|
Generic storage class for section-based vocabularies. More...
#include "llvm/Analysis/IR2Vec.h"
Classes | |
class | const_iterator |
Iterator support for section-based access. More... |
Public Member Functions | |
VocabStorage () | |
Default constructor creates empty storage (invalid state) | |
VocabStorage (std::vector< std::vector< Embedding > > &&SectionData) | |
Create a VocabStorage with pre-organized section data. | |
VocabStorage (VocabStorage &&)=default | |
VocabStorage & | operator= (VocabStorage &&)=delete |
VocabStorage (const VocabStorage &)=delete | |
VocabStorage & | operator= (const VocabStorage &)=delete |
size_t | size () const |
Get total number of entries across all sections. | |
unsigned | getNumSections () const |
Get number of sections. | |
const std::vector< Embedding > & | operator[] (unsigned SectionId) const |
Section-based access: Storage[sectionId][localIndex]. | |
unsigned | getDimension () const |
Get vocabulary dimension. | |
bool | isValid () const |
Check if vocabulary is valid (has data) | |
const_iterator | begin () const |
const_iterator | end () const |
Generic storage class for section-based vocabularies.
VocabStorage provides a generic foundation for storing and accessing embeddings organized into sections.
|
inline |
Default constructor creates empty storage (invalid state)
Definition at line 161 of file IR2Vec.h.
Referenced by llvm::ir2vec::VocabStorage::const_iterator::const_iterator(), llvm::ir2vec::Vocabulary::createDummyVocabForTest(), operator=(), operator=(), VocabStorage(), and VocabStorage().
VocabStorage::VocabStorage | ( | std::vector< std::vector< Embedding > > && | SectionData | ) |
Create a VocabStorage with pre-organized section data.
Definition at line 269 of file IR2Vec.cpp.
References assert(), llvm::move(), and Size.
|
default |
References VocabStorage().
|
delete |
References VocabStorage().
|
inline |
|
inline |
Definition at line 210 of file IR2Vec.h.
References getNumSections().
|
inline |
|
inline |
Get number of sections.
Definition at line 176 of file IR2Vec.h.
Referenced by end(), and llvm::ir2vec::VocabStorage::const_iterator::operator++().
|
inline |
|
delete |
References VocabStorage().
|
delete |
References VocabStorage().
|
inline |
Get total number of entries across all sections.
Definition at line 173 of file IR2Vec.h.
Referenced by llvm::ir2vec::VocabStorage::const_iterator::operator*().