Hermes
0.9.5-beta
Hierarchical Distributed I/O Buffering System
|
#include <round_robin.h>
Public Member Functions | |
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) |
size_t | GetNumDevices () const |
int | GetCurrentDeviceIndex () const |
DeviceID | GetDeviceByIndex (int i) const |
void | SetCurrentDeviceIndex (int new_device_index) |
Public Member Functions inherited from hermes::DPE | |
DPE (PlacementPolicy policy) | |
Static Public Member Functions | |
static void | InitDevices (hermes::Config *config, std::shared_ptr< api::Hermes > result) |
static void | InitDevices (int count, int start_val=0) |
Private Member Functions | |
Status | AddSchema (size_t index, std::vector< u64 > &node_state, const std::vector< size_t > &blob_sizes, const std::vector< TargetID > &targets, PlacementSchema &output) |
Private Attributes | |
std::mutex | device_index_mutex_ |
Static Private Attributes | |
static int | current_device_index_ {} |
static std::vector< DeviceID > | devices_ |
Additional Inherited Members | |
Public Attributes inherited from hermes::DPE | |
std::vector< f32 > | bandwidths |
Protected Member Functions inherited from hermes::DPE | |
std::vector< int > | GetValidSplitChoices (size_t blob_size) |
bool | SplitBlob (size_t blob_size) |
void | GetSplitSizes (size_t blob_size, std::vector< size_t > &output) |
Protected Attributes inherited from hermes::DPE | |
PlacementPolicy | policy_ |
Represents the state of a Round-Robin data placement strategy
|
virtual |
set placement schema given BLOB sizes, node states, targets, and context.
Implements hermes::DPE.
size_t hermes::RoundRobin::GetNumDevices | ( | ) | const |
Retrieves the number of devices
int hermes::RoundRobin::GetCurrentDeviceIndex | ( | ) | const |
Retrieves the current device index
DeviceID hermes::RoundRobin::GetDeviceByIndex | ( | int | i | ) | const |
Retrieves the device ID at a given index
void hermes::RoundRobin::SetCurrentDeviceIndex | ( | int | new_device_index | ) |
Re-/Sets the current device index
|
static |
Initialize the static variable for devices
|
static |
Initialize count devices with start_val value
|
private |
add placement schema to output
|
inlinestaticprivate |
The current device index
|
staticprivate |
A list of device targets
|
private |
Protect index updates