initialise MemoryBundle members (#167)

This commit is contained in:
Qianqian Zhu 2021-05-19 20:11:20 +01:00 committed by GitHub
parent 89bd47342b
commit 7ad8d0a04d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,16 +18,16 @@ typedef AlignedVector<char> AlignedMemory;
/// Memory bundle for all byte-arrays.
/// Can be a set/subset of model, shortlist, vocabs and ssplitPrefixFile bytes.
struct MemoryBundle {
AlignedMemory model; ///< Byte-array of model (aligned to 256)
AlignedMemory shortlist; ///< Byte-array of shortlist (aligned to 64)
AlignedMemory model{}; ///< Byte-array of model (aligned to 256)
AlignedMemory shortlist{}; ///< Byte-array of shortlist (aligned to 64)
/// Vector of vocabulary memories (aligned to 64).
/// If two vocabularies are the same (based on the filenames), two entries (shared
/// pointers) will be generated which share the same AlignedMemory object.
std::vector<std::shared_ptr<AlignedMemory>> vocabs;
std::vector<std::shared_ptr<AlignedMemory>> vocabs{};
/// @todo Not implemented yet
AlignedMemory ssplitPrefixFile;
AlignedMemory ssplitPrefixFile{};
};
} // namespace bergamot