LLVM: llvm::ir2vec::VocabStorage Class Reference (original) (raw)
Generic storage class for section-based vocabularies. More...
#include "[llvm/Analysis/IR2Vec.h](IR2Vec%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| using | VocabMap = std::map<std::string, Embedding> |
| Public Member Functions | |
|---|---|
| VocabStorage ()=default | |
| Default constructor creates empty storage (invalid state) | |
| LLVM_ABI | VocabStorage (std::vector< std::vector< Embedding > > &&SectionData) |
| Create a VocabStorage with pre-organized section data. | |
| VocabStorage (VocabStorage &&)=default | |
| VocabStorage & | operator= (VocabStorage &&)=default |
| 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.
Definition at line 151 of file IR2Vec.h.
◆ VocabMap
| llvm::ir2vec::VocabStorage::VocabStorage ( ) | default |
|---|
◆ VocabStorage() [2/4]
| VocabStorage::VocabStorage | ( | std::vector< std::vector< Embedding > > && | SectionData | ) |
|---|
◆ VocabStorage() [3/4]
| llvm::ir2vec::VocabStorage::VocabStorage ( VocabStorage && ) | default |
|---|
References VocabStorage().
◆ VocabStorage() [4/4]
References VocabStorage().
◆ begin()
◆ end()
◆ getDimension()
| unsigned llvm::ir2vec::VocabStorage::getDimension ( ) const | inline |
|---|
◆ getNumSections()
| unsigned llvm::ir2vec::VocabStorage::getNumSections ( ) const | inline |
|---|
◆ isValid()
| bool llvm::ir2vec::VocabStorage::isValid ( ) const | inline |
|---|
◆ operator=() [1/2]
References VocabStorage().
◆ operator=() [2/2]
References VocabStorage().
◆ operator[]()
Section-based access: Storage[sectionId][localIndex].
Definition at line 184 of file IR2Vec.h.
References assert().
◆ parseVocabSection()
◆ size()
| size_t llvm::ir2vec::VocabStorage::size ( ) const | inline |
|---|
The documentation for this class was generated from the following files:
- include/llvm/Analysis/IR2Vec.h
- lib/Analysis/IR2Vec.cpp