PFUNC 1.0
Public Member Functions | Public Attributes
pfunc::detail::barrier Struct Reference

#include <pfunc/barrier.hpp>

Inheritance diagram for pfunc::detail::barrier:
pfunc::detail::no_copy

List of all members.

Public Member Functions

 barrier ()
void initialize (const unsigned int &size)
void operator() ()

Public Attributes

ALIGN64 unsigned barrier_size
ALIGN64 unsigned barrier_phase
ALIGN64 unsigned barrier_count

Constructor & Destructor Documentation

pfunc::detail::barrier::barrier ( ) [inline]

Number of threads currently in barrier


Member Function Documentation

void pfunc::detail::barrier::initialize ( const unsigned int &  size) [inline]
Parameters:
[in]sizeThe number of threads in the barrier.
void pfunc::detail::barrier::operator() ( void  ) [inline]

Execute the barrier.

This is the last thread. Reset barrier_size and toggle the phase.

This is NOT the last thread--wait for the phase to change

Try to spin for a while first

Give up and sleep


Member Data Documentation

Phase -- toggles so that we ensure correctness

Number of threads in the barrier


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