<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>proxygen: folly::detail::RingBufferSlot&lt; T, Atom &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">proxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classfolly_1_1detail_1_1RingBufferSlot.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classfolly_1_1detail_1_1RingBufferSlot-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">folly::detail::RingBufferSlot&lt; T, Atom &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aefa25d8884f2572d913d545713d8313e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html#aefa25d8884f2572d913d545713d8313e">RingBufferSlot</a> () noexcept</td></tr>
<tr class="separator:aefa25d8884f2572d913d545713d8313e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3dcc45aea455a1e54e08381272b0f4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html#ad3dcc45aea455a1e54e08381272b0f4c">write</a> (const <a class="el" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a> turn, <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> &amp;<a class="el" href="namespacefolly.html#af765fccfa9242184196b4906286ada49">value</a>) noexcept</td></tr>
<tr class="separator:ad3dcc45aea455a1e54e08381272b0f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6e96f47cd6bfda3f423ebe40924c059"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html#ad6e96f47cd6bfda3f423ebe40924c059">waitAndTryRead</a> (<a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> &amp;dest, <a class="el" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a> turn) noexcept</td></tr>
<tr class="separator:ad6e96f47cd6bfda3f423ebe40924c059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1afb6527b5497ef134ce3a5cf6e6027a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html#a1afb6527b5497ef134ce3a5cf6e6027a">tryRead</a> (<a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> &amp;dest, <a class="el" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a> turn) noexcept</td></tr>
<tr class="separator:a1afb6527b5497ef134ce3a5cf6e6027a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a59aee63eb2352e9d3f229e83641f90d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfolly_1_1detail_1_1TurnSequencer.html">TurnSequencer</a>&lt; <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a></td></tr>
<tr class="separator:a59aee63eb2352e9d3f229e83641f90d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a365f5bf9ec8d24b807d8ca3d195a55f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">data</a></td></tr>
<tr class="separator:a365f5bf9ec8d24b807d8ca3d195a55f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T, template&lt; typename &gt; class Atom&gt;<br />
class folly::detail::RingBufferSlot&lt; T, Atom &gt;</h3>


<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00036">36</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aefa25d8884f2572d913d545713d8313e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, template&lt; typename &gt; class Atom&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">folly::detail::RingBufferSlot</a>&lt; <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>, <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;::<a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">RingBufferSlot</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00184">184</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;: <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>(), <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">data</a>() {}</div><div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a59aee63eb2352e9d3f229e83641f90d7"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">folly::detail::RingBufferSlot::sequencer_</a></div><div class="ttdeci">TurnSequencer&lt; Atom &gt; sequencer_</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00223">LockFreeRingBuffer.h:223</a></div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a365f5bf9ec8d24b807d8ca3d195a55f6"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">folly::detail::RingBufferSlot::data</a></div><div class="ttdeci">T data</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00224">LockFreeRingBuffer.h:224</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a1afb6527b5497ef134ce3a5cf6e6027a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, template&lt; typename &gt; class Atom&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">folly::detail::RingBufferSlot</a>&lt; <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>, <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;::tryRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> &amp;&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a>&#160;</td>
          <td class="paramname"><em>turn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00211">211</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>

<p>References <a class="el" href="Access_8h_source.html#l00071">folly::data()</a>, <a class="el" href="fizz_2build___2gtest_2src_2gtest_2googlemock_2scripts_2upload_8py_source.html#l00394">upload::dest</a>, and <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">folly::T</a>.</p>
<div class="fragment"><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                                                {</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="comment">// The write that started at turn 0 ended at turn 2</span></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.isTurn((turn + 1) * 2)) {</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    }</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    memcpy(&amp;<a class="code" href="namespaceupload.html#a770d9c7b49b1fede80de6078d5e49af7">dest</a>, &amp;<a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">data</a>, <span class="keyword">sizeof</span>(<a class="code" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>));</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="comment">// if it&#39;s still the same turn, we read the value successfully</span></div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.isTurn((turn + 1) * 2);</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  }</div><div class="ttc" id="namespaceupload_html_a770d9c7b49b1fede80de6078d5e49af7"><div class="ttname"><a href="namespaceupload.html#a770d9c7b49b1fede80de6078d5e49af7">upload.dest</a></div><div class="ttdeci">dest</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2scripts_2upload_8py_source.html#l00394">upload.py:394</a></div></div>
<div class="ttc" id="namespacefolly_html_a0652a9c51b69e7a13d40ccbcb139bc55"><div class="ttname"><a href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">folly::T</a></div><div class="ttdeci">folly::std T</div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a59aee63eb2352e9d3f229e83641f90d7"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">folly::detail::RingBufferSlot::sequencer_</a></div><div class="ttdeci">TurnSequencer&lt; Atom &gt; sequencer_</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00223">LockFreeRingBuffer.h:223</a></div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a365f5bf9ec8d24b807d8ca3d195a55f6"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">folly::detail::RingBufferSlot::data</a></div><div class="ttdeci">T data</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00224">LockFreeRingBuffer.h:224</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad6e96f47cd6bfda3f423ebe40924c059"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, template&lt; typename &gt; class Atom&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">folly::detail::RingBufferSlot</a>&lt; <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>, <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;::waitAndTryRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> &amp;&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a>&#160;</td>
          <td class="paramname"><em>turn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00198">198</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>

<p>References <a class="el" href="Access_8h_source.html#l00071">folly::data()</a>, <a class="el" href="fizz_2build___2gtest_2src_2gtest_2googlemock_2scripts_2upload_8py_source.html#l00394">upload::dest</a>, <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">folly::T</a>, and <a class="el" href="ConstexprMathBenchmark_8cpp_source.html#l00186">uint32_t</a>.</p>
<div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;                                                       {</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <a class="code" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a> desired_turn = (turn + 1) * 2;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    Atom&lt;uint32_t&gt; cutoff(0);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.tryWaitForTurn(desired_turn, cutoff, <span class="keyword">false</span>) !=</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <a class="code" href="structfolly_1_1detail_1_1TurnSequencer.html#a53c791927a41201bb8c06b77c86c0fd0ad0749aaba8b833466dfcbb0428e4f89c">TurnSequencer&lt;Atom&gt;::TryWaitResult::SUCCESS</a>) {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    }</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    memcpy(&amp;<a class="code" href="namespaceupload.html#a770d9c7b49b1fede80de6078d5e49af7">dest</a>, &amp;<a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">data</a>, <span class="keyword">sizeof</span>(<a class="code" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>));</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="comment">// if it&#39;s still the same turn, we read the value successfully</span></div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.isTurn(desired_turn);</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  }</div><div class="ttc" id="namespaceupload_html_a770d9c7b49b1fede80de6078d5e49af7"><div class="ttname"><a href="namespaceupload.html#a770d9c7b49b1fede80de6078d5e49af7">upload.dest</a></div><div class="ttdeci">dest</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2scripts_2upload_8py_source.html#l00394">upload.py:394</a></div></div>
<div class="ttc" id="namespacefolly_html_a0652a9c51b69e7a13d40ccbcb139bc55"><div class="ttname"><a href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">folly::T</a></div><div class="ttdeci">folly::std T</div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a59aee63eb2352e9d3f229e83641f90d7"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">folly::detail::RingBufferSlot::sequencer_</a></div><div class="ttdeci">TurnSequencer&lt; Atom &gt; sequencer_</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00223">LockFreeRingBuffer.h:223</a></div></div>
<div class="ttc" id="ConstexprMathBenchmark_8cpp_html_a09a1e304d66d35dd47daffee9731edaa"><div class="ttname"><a href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a></div><div class="ttdeci">uint32_t</div><div class="ttdef"><b>Definition:</b> <a href="ConstexprMathBenchmark_8cpp_source.html#l00186">ConstexprMathBenchmark.cpp:186</a></div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a365f5bf9ec8d24b807d8ca3d195a55f6"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">folly::detail::RingBufferSlot::data</a></div><div class="ttdeci">T data</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00224">LockFreeRingBuffer.h:224</a></div></div>
<div class="ttc" id="structfolly_1_1detail_1_1TurnSequencer_html_a53c791927a41201bb8c06b77c86c0fd0ad0749aaba8b833466dfcbb0428e4f89c"><div class="ttname"><a href="structfolly_1_1detail_1_1TurnSequencer.html#a53c791927a41201bb8c06b77c86c0fd0ad0749aaba8b833466dfcbb0428e4f89c">folly::detail::TurnSequencer::TryWaitResult::SUCCESS</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad3dcc45aea455a1e54e08381272b0f4c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, template&lt; typename &gt; class Atom&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">folly::detail::RingBufferSlot</a>&lt; <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>, <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;::write </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ConstexprMathBenchmark_8cpp.html#a09a1e304d66d35dd47daffee9731edaa">uint32_t</a>&#160;</td>
          <td class="paramname"><em>turn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00186">186</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>

<p>References <a class="el" href="Access_8h_source.html#l00071">folly::data()</a>, <a class="el" href="Base-inl_8h_source.html#l02567">folly::gen::move</a>, and <a class="el" href="LockFreeRingBufferTest_8cpp_source.html#l00096">folly::value()</a>.</p>
<div class="fragment"><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                                                     {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    Atom&lt;uint32_t&gt; cutoff(0);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.waitForTurn(turn * 2, cutoff, <span class="keyword">false</span>);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="comment">// Change to an odd-numbered turn to indicate write in process</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.completeTurn(turn * 2);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">data</a> = <a class="code" href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">std::move</a>(<a class="code" href="namespacefolly.html#af765fccfa9242184196b4906286ada49">value</a>);</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <a class="code" href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">sequencer_</a>.completeTurn(turn * 2 + 1);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="comment">// At (turn + 1) * 2</span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  }</div><div class="ttc" id="namespacefolly_1_1gen_html_ac24ec252b1b738a40c274285527c193f"><div class="ttname"><a href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">folly::gen::move</a></div><div class="ttdeci">constexpr detail::Map&lt; Move &gt; move</div><div class="ttdef"><b>Definition:</b> <a href="Base-inl_8h_source.html#l02567">Base-inl.h:2567</a></div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a59aee63eb2352e9d3f229e83641f90d7"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a59aee63eb2352e9d3f229e83641f90d7">folly::detail::RingBufferSlot::sequencer_</a></div><div class="ttdeci">TurnSequencer&lt; Atom &gt; sequencer_</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00223">LockFreeRingBuffer.h:223</a></div></div>
<div class="ttc" id="namespacefolly_html_af765fccfa9242184196b4906286ada49"><div class="ttname"><a href="namespacefolly.html#af765fccfa9242184196b4906286ada49">folly::value</a></div><div class="ttdeci">uint64_t value(const typename LockFreeRingBuffer&lt; T, Atom &gt;::Cursor &amp;rbcursor)</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBufferTest_8cpp_source.html#l00096">LockFreeRingBufferTest.cpp:96</a></div></div>
<div class="ttc" id="classfolly_1_1detail_1_1RingBufferSlot_html_a365f5bf9ec8d24b807d8ca3d195a55f6"><div class="ttname"><a href="classfolly_1_1detail_1_1RingBufferSlot.html#a365f5bf9ec8d24b807d8ca3d195a55f6">folly::detail::RingBufferSlot::data</a></div><div class="ttdeci">T data</div><div class="ttdef"><b>Definition:</b> <a href="LockFreeRingBuffer_8h_source.html#l00224">LockFreeRingBuffer.h:224</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a365f5bf9ec8d24b807d8ca3d195a55f6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, template&lt; typename &gt; class Atom&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a> <a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">folly::detail::RingBufferSlot</a>&lt; <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>, <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;::data</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00224">224</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>

</div>
</div>
<a class="anchor" id="a59aee63eb2352e9d3f229e83641f90d7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, template&lt; typename &gt; class Atom&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfolly_1_1detail_1_1TurnSequencer.html">TurnSequencer</a>&lt;<a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a>&gt; <a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">folly::detail::RingBufferSlot</a>&lt; <a class="el" href="namespacefolly.html#a0652a9c51b69e7a13d40ccbcb139bc55">T</a>, <a class="el" href="ConcurrentHashMapTest_8cpp.html#a98ac53dd3c18b4046e7c5cb0bcb64b75">Atom</a> &gt;::sequencer_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="LockFreeRingBuffer_8h_source.html#l00223">223</a> of file <a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>proxygen/folly/folly/experimental/<a class="el" href="LockFreeRingBuffer_8h_source.html">LockFreeRingBuffer.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacefolly.html">folly</a></li><li class="navelem"><a class="el" href="namespacefolly_1_1detail.html">detail</a></li><li class="navelem"><a class="el" href="classfolly_1_1detail_1_1RingBufferSlot.html">RingBufferSlot</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>