Derecho  0.9
Distributed systems toolkit for RDMA
Functions
derecho::gmssst Namespace Reference

Functions

template<typename Elem >
void set (volatile Elem &e, const Elem &value)
 Thread-safe setter for DerechoSST members; ensures there is a std::atomic_signal_fence after writing the value. More...
 
template<typename Elem >
void set (volatile Elem &e, volatile const Elem &value)
 Thread-safe setter for DerechoSST members; ensures there is a std::atomic_signal_fence after writing the value. More...
 
template<typename Elem >
void set (volatile Elem *array, volatile Elem *value, const size_t length)
 Thread-safe setter for DerechoSST members that are arrays; takes a lock before running memcpy, and then ensures there is an atomic_signal_fence. More...
 
template<typename Arr , size_t Len>
void set (volatile Arr(&e)[Len], const volatile Arr(&value)[Len])
 Thread-safe setter for DerechoSST members that are arrays; takes a lock before running memcpy, and then ensures there is an atomic_signal_fence. More...
 
template<size_t L1, size_t L2, typename Arr >
void set (volatile Arr(&dst)[L1], const volatile Arr(&src)[L2], const size_t &num)
 Thread-safe setter for DerechoSST members that are arrays; takes a lock before running memcpy, and then ensures there is an atomic_signal_fence. More...
 
void set (volatile char *string_array, const std::string &value)
 Thread-safe setter for DerechoSST members that use SSTFieldVector<char> to represent strings. More...
 
void increment (volatile int &member)
 Thread-safe increment of an integer member of GMSTableRow; ensures there is a std::atomic_signal_fence after updating the value. More...
 
bool equals (const volatile char &string_array, const std::string &value)
 
bool equals (const volatile char *string_array, const std::string &value)
 

Function Documentation

◆ equals() [1/2]

bool derecho::gmssst::equals ( const volatile char *  string_array,
const std::string &  value 
)

Definition at line 164 of file derecho_sst.cpp.

◆ equals() [2/2]

bool derecho::gmssst::equals ( const volatile char &  string_array,
const std::string &  value 
)

◆ increment()

void derecho::gmssst::increment ( volatile int &  member)

Thread-safe increment of an integer member of GMSTableRow; ensures there is a std::atomic_signal_fence after updating the value.

Parameters
memberA reference to the member to increment.

Definition at line 159 of file derecho_sst.cpp.

◆ set() [1/6]

template<typename Elem >
void derecho::gmssst::set ( volatile Elem &  e,
const Elem &  value 
)

Thread-safe setter for DerechoSST members; ensures there is a std::atomic_signal_fence after writing the value.

Parameters
eA reference to a member of GMSTableRow.
valueThe value to set that reference to.

Definition at line 230 of file derecho_sst.hpp.

◆ set() [2/6]

template<typename Elem >
void derecho::gmssst::set ( volatile Elem &  e,
volatile const Elem &  value 
)

Thread-safe setter for DerechoSST members; ensures there is a std::atomic_signal_fence after writing the value.

Parameters
eA reference to a member of GMSTableRow.
valueThe value to set that reference to.

Definition at line 242 of file derecho_sst.hpp.

◆ set() [3/6]

template<typename Elem >
void derecho::gmssst::set ( volatile Elem *  array,
volatile Elem *  value,
const size_t  length 
)

Thread-safe setter for DerechoSST members that are arrays; takes a lock before running memcpy, and then ensures there is an atomic_signal_fence.

The first

length

members of

value

are copied to

array

.

Parameters
arrayA pointer to the first element of an array that should be set to
value
, obtained by calling SSTFieldVector::operator[]
valueA pointer to the first element of an array to read values from
lengthThe number of array elements to copy

Definition at line 257 of file derecho_sst.hpp.

◆ set() [4/6]

template<typename Arr , size_t Len>
void derecho::gmssst::set ( volatile Arr(&)  e[Len],
const volatile Arr(&)  value[Len] 
)

Thread-safe setter for DerechoSST members that are arrays; takes a lock before running memcpy, and then ensures there is an atomic_signal_fence.

This version copies the entire array, and assumes both arrays are the same length.

Parameters
eA reference to an array-type member of GMSTableRow
valueThe array whose contents should be copied to this member

Definition at line 276 of file derecho_sst.hpp.

◆ set() [5/6]

template<size_t L1, size_t L2, typename Arr >
void derecho::gmssst::set ( volatile Arr(&)  dst[L1],
const volatile Arr(&)  src[L2],
const size_t &  num 
)

Thread-safe setter for DerechoSST members that are arrays; takes a lock before running memcpy, and then ensures there is an atomic_signal_fence.

This version only copies the first num elements of the source array.

Parameters
dst
src
num

Definition at line 299 of file derecho_sst.hpp.

◆ set() [6/6]

void derecho::gmssst::set ( volatile char *  string_array,
const std::string &  value 
)

Thread-safe setter for DerechoSST members that use SSTFieldVector<char> to represent strings.

Conveniently hides away strcpy and c_str().

Parameters
string_arrayA pointer to the first element of the char array
valueThe value to set the array to, as a C++ string

Definition at line 149 of file derecho_sst.cpp.