Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
hermes::RoundRobin Class Reference

#include <round_robin.h>

Inheritance diagram for hermes::RoundRobin:
Collaboration diagram for hermes::RoundRobin:

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< DeviceIDdevices_
 

Additional Inherited Members

- Public Attributes inherited from hermes::DPE
std::vector< f32bandwidths
 
- 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_
 

Detailed Description

Represents the state of a Round-Robin data placement strategy

Member Function Documentation

◆ Placement()

Status hermes::RoundRobin::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 
)
virtual

set placement schema given BLOB sizes, node states, targets, and context.

Implements hermes::DPE.

Here is the call graph for this function:

◆ GetNumDevices()

size_t hermes::RoundRobin::GetNumDevices ( ) const

Retrieves the number of devices

Here is the caller graph for this function:

◆ GetCurrentDeviceIndex()

int hermes::RoundRobin::GetCurrentDeviceIndex ( ) const

Retrieves the current device index

Here is the caller graph for this function:

◆ GetDeviceByIndex()

DeviceID hermes::RoundRobin::GetDeviceByIndex ( int  i) const

Retrieves the device ID at a given index

Here is the caller graph for this function:

◆ SetCurrentDeviceIndex()

void hermes::RoundRobin::SetCurrentDeviceIndex ( int  new_device_index)

Re-/Sets the current device index

Here is the caller graph for this function:

◆ InitDevices() [1/2]

void hermes::RoundRobin::InitDevices ( hermes::Config config,
std::shared_ptr< api::Hermes result 
)
static

Initialize the static variable for devices

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitDevices() [2/2]

void hermes::RoundRobin::InitDevices ( int  count,
int  start_val = 0 
)
static

Initialize count devices with start_val value

◆ AddSchema()

Status hermes::RoundRobin::AddSchema ( size_t  index,
std::vector< u64 > &  node_state,
const std::vector< size_t > &  blob_sizes,
const std::vector< TargetID > &  targets,
PlacementSchema output 
)
private

add placement schema to output

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ current_device_index_

int hermes::RoundRobin::current_device_index_ {}
inlinestaticprivate

The current device index

◆ devices_

std::vector< DeviceID > hermes::RoundRobin::devices_
staticprivate

A list of device targets

◆ device_index_mutex_

std::mutex hermes::RoundRobin::device_index_mutex_
private

Protect index updates


The documentation for this class was generated from the following files: