GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
graphlab::lockfree_push_back< Container, T > Class Template Reference

#include <graphlab/parallel/lockfree_push_back.hpp>

List of all members.

Public Member Functions

 lockfree_push_back (Container &container, size_t startidx, float scalefactor=2)
size_t size () const
void set_size (size_t s)
template<typename Iterator >
size_t push_back (Iterator begin, Iterator end)
bool query (size_t item, T &value)
T * query (size_t item)
bool query_unsafe (size_t item, T &value)
T * query_unsafe (size_t item)
size_t push_back (const T &t)

Detailed Description

template<typename Container, typename T = typename Container::value_type>
class graphlab::lockfree_push_back< Container, T >

Provides a lock free way to insert elements to the end of a container. Container must provide 3 functions.

  • T& operator[](size_t idx)
  • void resize(size_t len)
  • size_t size()

resize(n) must guarantee that size() >= n. T& operator[](size_t idx) must succeed for idx < size() and must be safely executeable in parallel. size() must be safely executeable in parallel with resize().

Definition at line 86 of file lockfree_push_back.hpp.


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