Generic storage class for section‐based vocabularies. VocabStorage provides a generic foundation for storing and accessing embeddings organized into sections.

Synopsis

Declared in <llvm/Analysis/IR2Vec.h>

class VocabStorage;

Types

Name

Description

const_iterator

Iterator support for section‐based access

Type Aliases

Name

Description

VocabMap

Map from vocabulary string keys to their embeddings.

Member Functions

Name

Description

VocabStorage [constructor]

Constructors

operator=

Assignment operators

begin

Return a const iterator to the first embedding across all sections.

end

Return a const iterator past the last embedding across all sections.

getDimension

Get vocabulary dimension

getNumSections

Get number of sections

isValid

Check if vocabulary is valid (has data)

operator[]

Section‐based access: Storage[sectionId][localIndex]

size

Get total number of entries across all sections

Static Member Functions

Name

Description

parseVocabSection

Parse a vocabulary section from JSON and populate the target vocabulary map.

Created with MrDocs