VaneDB 0.1.0
Embeddable vector database for edge AI
Loading...
Searching...
No Matches
Functions | Variables
vanedb::detail Namespace Reference

Functions

void fsync_file (const std::string &path) noexcept
 
template<typename T >
void write_bin (std::ofstream &f, const T &v)
 
template<typename T >
void read_bin (std::ifstream &f, T &v)
 
template<typename T >
void write_vec (std::ofstream &f, const std::vector< T > &v)
 
template<typename T >
void read_vec (std::ifstream &f, std::vector< T > &v)
 

Variables

constexpr size_t MAX_VEC_SIZE = 100000000ULL
 
constexpr size_t MAX_RNG_STATE_SIZE = 10000
 

Function Documentation

◆ fsync_file()

void vanedb::detail::fsync_file ( const std::string &  path)
inlinenoexcept

Reopen a file by path, fsync to disk, close. Best-effort durability: silently no-ops if the file cannot be opened.

Caller must close any other writer (e.g. std::ofstream) for the same path before calling — Windows CreateFileA fails on an exclusively-held file.

Definition at line 24 of file file_utils.h.

Referenced by vanedb::HNSWIndex::save(), and vanedb::MMapVectorStoreBuilder::save().

◆ read_bin()

template<typename T >
void vanedb::detail::read_bin ( std::ifstream &  f,
T &  v 
)

Definition at line 28 of file hnsw_index.h.

Referenced by vanedb::HNSWIndex::load(), and read_vec().

◆ read_vec()

template<typename T >
void vanedb::detail::read_vec ( std::ifstream &  f,
std::vector< T > &  v 
)

Definition at line 38 of file hnsw_index.h.

References MAX_VEC_SIZE, and read_bin().

Referenced by vanedb::HNSWIndex::load().

◆ write_bin()

template<typename T >
void vanedb::detail::write_bin ( std::ofstream &  f,
const T &  v 
)

Definition at line 25 of file hnsw_index.h.

Referenced by vanedb::HNSWIndex::save(), and write_vec().

◆ write_vec()

template<typename T >
void vanedb::detail::write_vec ( std::ofstream &  f,
const std::vector< T > &  v 
)

Definition at line 32 of file hnsw_index.h.

References write_bin().

Referenced by vanedb::HNSWIndex::save().

Variable Documentation

◆ MAX_RNG_STATE_SIZE

constexpr size_t vanedb::detail::MAX_RNG_STATE_SIZE = 10000
constexpr

Definition at line 37 of file hnsw_index.h.

Referenced by vanedb::HNSWIndex::load().

◆ MAX_VEC_SIZE

constexpr size_t vanedb::detail::MAX_VEC_SIZE = 100000000ULL
constexpr

Definition at line 36 of file hnsw_index.h.

Referenced by read_vec().