13 #ifndef HERMES_SRC_DPE_ROUND_ROBIN_H_
14 #define HERMES_SRC_DPE_ROUND_ROBIN_H_
18 #include "data_placement_engine.h"
37 Status
Placement(
const std::vector<size_t> &blob_sizes,
38 const std::vector<u64> &node_state,
39 const std::vector<TargetID> &targets,
40 const api::Context &ctx,
41 std::vector<PlacementSchema> &output);
57 std::shared_ptr<api::Hermes> result);
59 static void InitDevices(
int count,
int start_val = 0);
65 Status
AddSchema(
size_t index, std::vector<u64> &node_state,
66 const std::vector<size_t> &blob_sizes,
67 const std::vector<TargetID> &targets,
Definition: hermes_status.h:80
Definition: data_placement_engine.h:35
Definition: round_robin.h:25
Status AddSchema(size_t index, std::vector< u64 > &node_state, const std::vector< size_t > &blob_sizes, const std::vector< TargetID > &targets, PlacementSchema &output)
Definition: round_robin.cc:59
Status Placement(const std::vector< size_t > &blob_sizes, const std::vector< u64 > &node_state, const std::vector< TargetID > &targets, const api::Context &ctx, std::vector< PlacementSchema > &output)
Definition: round_robin.cc:101
static std::vector< DeviceID > devices_
Definition: round_robin.h:28
int GetCurrentDeviceIndex() const
Definition: round_robin.cc:51
static void InitDevices(hermes::Config *config, std::shared_ptr< api::Hermes > result)
Definition: round_robin.cc:27
DeviceID GetDeviceByIndex(int i) const
Definition: round_robin.cc:47
size_t GetNumDevices() const
Definition: round_robin.cc:43
void SetCurrentDeviceIndex(int new_device_index)
Definition: round_robin.cc:55
std::mutex device_index_mutex_
Definition: round_robin.h:29
static int current_device_index_
Definition: round_robin.h:27
Definition: adapter_utils.cc:35
u16 DeviceID
Definition: hermes_types.h:51
std::vector< std::pair< size_t, TargetID > > PlacementSchema
Definition: hermes_types.h:226
Definition: hermes_types.h:258