mlx/docs/build/html/encoder_8h_source.html
CircleCI Docs 2b2f3269df rebase
2025-07-01 22:12:49 +00:00

221 lines
27 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MLX: mlx/backend/cpu/encoder.h Source File</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>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { init_search(); });
/* @license-end */
</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 id="projectrow">
<td id="projectalign">
<div id="projectname">MLX
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</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">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('encoder_8h_source.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">encoder.h</div></div>
</div><!--header-->
<div class="contents">
<a href="encoder_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright © 2025 Apple Inc.</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;<a class="code" href="array_8h.html">mlx/array.h</a>&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;<a class="code" href="scheduler_8h.html">mlx/scheduler.h</a>&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="foldopen" id="foldopen00010" data-start="{" data-end="}">
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html"> 10</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a> {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// Number of dispatches per scheduler task</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557"> 13</a></span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">DISPATCHES_PER_TASK</a> = 10;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="foldopen" id="foldopen00015" data-start="{" data-end="};">
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html"> 15</a></span><span class="keyword">struct </span><a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a> {</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c"> 16</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) : stream_(stream) {}</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95"> 18</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95">CommandEncoder</a>(<span class="keyword">const</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c"> 19</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&amp; <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c">operator=</a>(<span class="keyword">const</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096"> 20</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096">CommandEncoder</a>(<a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&amp;&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771"> 21</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&amp; <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771">operator=</a>(<a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&amp;&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe"> 23</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe">set_input_array</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>&amp; a) {}</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b"> 24</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b">set_output_array</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>&amp; a) {}</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// Hold onto a temporary until any already scheduled tasks which use it as</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// an input are complete.</span></div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="}">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31"> 28</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31">add_temporary</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> arr) {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> temporaries_.push_back(std::move(arr));</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3"> 32</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3">add_temporaries</a>(std::vector&lt;array&gt; arrays) {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> temporaries_.insert(</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> temporaries_.end(),</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> std::make_move_iterator(arrays.begin()),</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> std::make_move_iterator(arrays.end()));</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="foldopen" id="foldopen00039" data-start="{" data-end="}">
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0"> 39</a></span> std::vector&lt;array&gt;&amp; <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0">temporaries</a>() {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> temporaries_;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">template</span> &lt;<span class="keyword">class </span>F, <span class="keyword">class</span>... <a class="code hl_typedef" href="namespacemlx_1_1core.html#acace1870dbbc6a0af0c054e8e71adc1f">Args</a>&gt;</div>
<div class="foldopen" id="foldopen00044" data-start="{" data-end="}">
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b"> 44</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b">dispatch</a>(F&amp;&amp; f, <a class="code hl_typedef" href="namespacemlx_1_1core.html#acace1870dbbc6a0af0c054e8e71adc1f">Args</a>&amp;&amp;... args) {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> num_ops_ = (num_ops_ + 1) % <a class="code hl_variable" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">DISPATCHES_PER_TASK</a>;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">auto</span> task = std::bind(std::forward&lt;F&gt;(f), std::forward&lt;Args&gt;(args)...);</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (num_ops_ == 0) {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#a6b7289e33cef665178fe614aac75c1b2">scheduler::notify_new_task</a>(stream_);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">auto</span> task_wrap = [s = stream_, task = std::move(task)]() <span class="keyword">mutable</span> {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> task();</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#a1d06ffdbab36790b78deb6e34adc737f">scheduler::notify_task_completion</a>(s);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> };</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#aa2d4eacf5d5cbc778a51aafd4fd8e4d7">scheduler::enqueue</a>(stream_, std::move(task_wrap));</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#aa2d4eacf5d5cbc778a51aafd4fd8e4d7">scheduler::enqueue</a>(stream_, std::move(task));</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream_;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> std::vector&lt;array&gt; temporaries_;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">int</span> num_ops_{0};</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>};</div>
</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933"> 65</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html">CommandEncoder</a>&amp; <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">get_command_encoder</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>} <span class="comment">// namespace mlx::core::cpu</span></div>
</div>
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a></div><div class="ttdef"><b>Definition</b> encoder.h:10</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a1fc5871c94ccee8536c6d43f8f6d5557"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">mlx::core::cpu::DISPATCHES_PER_TASK</a></div><div class="ttdeci">constexpr int DISPATCHES_PER_TASK</div><div class="ttdef"><b>Definition</b> encoder.h:13</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a65b1789c4b339a108e64fda5f102d933"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">mlx::core::cpu::get_command_encoder</a></div><div class="ttdeci">CommandEncoder &amp; get_command_encoder(Stream stream)</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1scheduler_html_a1d06ffdbab36790b78deb6e34adc737f"><div class="ttname"><a href="namespacemlx_1_1core_1_1scheduler.html#a1d06ffdbab36790b78deb6e34adc737f">mlx::core::scheduler::notify_task_completion</a></div><div class="ttdeci">void notify_task_completion(const Stream &amp;stream)</div><div class="ttdef"><b>Definition</b> scheduler.h:177</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1scheduler_html_a6b7289e33cef665178fe614aac75c1b2"><div class="ttname"><a href="namespacemlx_1_1core_1_1scheduler.html#a6b7289e33cef665178fe614aac75c1b2">mlx::core::scheduler::notify_new_task</a></div><div class="ttdeci">void notify_new_task(const Stream &amp;stream)</div><div class="ttdef"><b>Definition</b> scheduler.h:173</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1scheduler_html_aa2d4eacf5d5cbc778a51aafd4fd8e4d7"><div class="ttname"><a href="namespacemlx_1_1core_1_1scheduler.html#aa2d4eacf5d5cbc778a51aafd4fd8e4d7">mlx::core::scheduler::enqueue</a></div><div class="ttdeci">void enqueue(const Stream &amp;stream, F &amp;&amp;f)</div><div class="ttdef"><b>Definition</b> scheduler.h:165</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_acace1870dbbc6a0af0c054e8e71adc1f"><div class="ttname"><a href="namespacemlx_1_1core.html#acace1870dbbc6a0af0c054e8e71adc1f">mlx::core::Args</a></div><div class="ttdeci">std::vector&lt; array &gt; Args</div><div class="ttdef"><b>Definition</b> export.h:11</div></div>
<div class="ttc" id="ascheduler_8h_html"><div class="ttname"><a href="scheduler_8h.html">scheduler.h</a></div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html">mlx::core::cpu::CommandEncoder</a></div><div class="ttdef"><b>Definition</b> encoder.h:15</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a0879746a3ca3531a081de1bcf484fa31"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31">mlx::core::cpu::CommandEncoder::add_temporary</a></div><div class="ttdeci">void add_temporary(array arr)</div><div class="ttdef"><b>Definition</b> encoder.h:28</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a23815084f53da65b092624c89df7383c"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">mlx::core::cpu::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(Stream stream)</div><div class="ttdef"><b>Definition</b> encoder.h:16</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a30676a55a977418879a6a3a8a858d7c3"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3">mlx::core::cpu::CommandEncoder::add_temporaries</a></div><div class="ttdeci">void add_temporaries(std::vector&lt; array &gt; arrays)</div><div class="ttdef"><b>Definition</b> encoder.h:32</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a3d4415f4022da093cee23ef6f2a50c7c"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c">mlx::core::cpu::CommandEncoder::operator=</a></div><div class="ttdeci">CommandEncoder &amp; operator=(const CommandEncoder &amp;)=delete</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a61e90a31f29ae3ffe5f6f1e7672f79b0"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0">mlx::core::cpu::CommandEncoder::temporaries</a></div><div class="ttdeci">std::vector&lt; array &gt; &amp; temporaries()</div><div class="ttdef"><b>Definition</b> encoder.h:39</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a8e66b11850caa812b1eab2304493aa95"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95">mlx::core::cpu::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(const CommandEncoder &amp;)=delete</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_aa0646f94b37d9d419b0e379c8b81a5fe"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe">mlx::core::cpu::CommandEncoder::set_input_array</a></div><div class="ttdeci">void set_input_array(const array &amp;a)</div><div class="ttdef"><b>Definition</b> encoder.h:23</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_aa82e91e3b530f13126f674a6f4902096"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096">mlx::core::cpu::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(CommandEncoder &amp;&amp;)=delete</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_addd04a642072b7097faa74d1a924147b"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b">mlx::core::cpu::CommandEncoder::set_output_array</a></div><div class="ttdeci">void set_output_array(array &amp;a)</div><div class="ttdef"><b>Definition</b> encoder.h:24</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_ae7753ac99229f9241c41bcf1b5216c9b"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b">mlx::core::cpu::CommandEncoder::dispatch</a></div><div class="ttdeci">void dispatch(F &amp;&amp;f, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition</b> encoder.h:44</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_af2623c4a8fd0408e5be2c5fabaf98771"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771">mlx::core::cpu::CommandEncoder::operator=</a></div><div class="ttdeci">CommandEncoder &amp; operator=(CommandEncoder &amp;&amp;)=delete</div></div>
</div><!-- fragment --></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="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_48c8bf40aae7e42226b4fe31ea48af19.html">cpu</a></li><li class="navelem"><a class="el" href="encoder_8h.html">encoder.h</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>
</html>