The cyborg::Client class manages storage configurations and acts as a factory for creating or loading encrypted indexes.

Constructor

cyborg::Client(const LocationConfig& index_location,
               const LocationConfig& config_location,
               const LocationConfig& items_location,
               const int cpu_threads,
               const bool gpu_accelerate);

Initializes a new instance of Client.

Parameters

ParameterTypeDescription
index_locationLocationConfigConfiguration for index storage location.
config_locationLocationConfigConfiguration for index metadata storage.
items_locationLocationConfigConfiguration intended to be used in a future release. Pass in a LocationConfig with a Location of ‘None’.
cpu_threadsintNumber of CPU threads to use (e.g., 0 to use all available cores).
gpu_accelerateboolWhether to enable GPU acceleration (requires CUDA).

Exceptions

Example Usage

#include "cyborg_vector_search/client.hpp"

cyborg::LocationConfig index_location(Location::kMemory);
cyborg::LocationConfig config_location(Location::kRedis, "index_metadata", "redis://localhost");
cyborg::LocationConfig items_location(Location::kNone); // No item storage
int cpu_threads = 4;
bool use_gpu = true;

cyborg::Client client(index_loc, config_loc, items_loc, cpu_threads, use_gpu);