docs update

This commit is contained in:
Awni Hannun
2024-07-11 15:32:08 -07:00
committed by CircleCI Docs
parent 85f70be0e6
commit 0ec311dff3
754 changed files with 24043 additions and 13535 deletions

View File

@@ -218,7 +218,23 @@ $(function() { codefold.init(0); });
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> os &lt;&lt; static_cast&lt;float&gt;(v);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span>}</div>
</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>} <span class="comment">// namespace mlx::core</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="foldopen" id="foldopen00122" data-start="{" data-end="}">
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32"> 122</a></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32">is_power_of_2</a>(<span class="keywordtype">int</span> n) {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">return</span> ((n &amp; (n - 1)) == 0) &amp;&amp; n != 0;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span>}</div>
</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="foldopen" id="foldopen00126" data-start="{" data-end="}">
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a685c0530e338aabc622325685846ce93"> 126</a></span><span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a685c0530e338aabc622325685846ce93">next_power_of_2</a>(<span class="keywordtype">int</span> n) {</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32">is_power_of_2</a>(n)) {</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">return</span> n;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">return</span> pow(2, std::ceil(std::log2(n)));</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>}</div>
</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>} <span class="comment">// namespace mlx::core</span></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:20</div></div>
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ae29e7d6fbfbea1e5e321a8d1ea3cfacd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">mlx::core::array::dtype</a></div><div class="ttdeci">Dtype dtype() const</div><div class="ttdoc">Get the arrays data type.</div><div class="ttdef"><b>Definition</b> array.h:127</div></div>
@@ -235,11 +251,13 @@ $(function() { codefold.init(0); });
<div class="ttc" id="anamespacemlx_1_1core_html_a4734a596e57434492ddfe79f2cb9dbf9"><div class="ttname"><a href="namespacemlx_1_1core.html#a4734a596e57434492ddfe79f2cb9dbf9">mlx::core::to_stream</a></div><div class="ttdeci">Stream to_stream(StreamOrDevice s)</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a505922e54acd43114308e3bdbda0e497"><div class="ttname"><a href="namespacemlx_1_1core.html#a505922e54acd43114308e3bdbda0e497">mlx::core::promote_types</a></div><div class="ttdeci">Dtype promote_types(const Dtype &amp;t1, const Dtype &amp;t2)</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a625ed440df3fa57318017c1f2c589efe"><div class="ttname"><a href="namespacemlx_1_1core.html#a625ed440df3fa57318017c1f2c589efe">mlx::core::is_big_endian</a></div><div class="ttdeci">bool is_big_endian()</div><div class="ttdef"><b>Definition</b> utils.h:87</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a685c0530e338aabc622325685846ce93"><div class="ttname"><a href="namespacemlx_1_1core.html#a685c0530e338aabc622325685846ce93">mlx::core::next_power_of_2</a></div><div class="ttdeci">int next_power_of_2(int n)</div><div class="ttdef"><b>Definition</b> utils.h:126</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a8b5f1435b7628a094a38b62e403e1540"><div class="ttname"><a href="namespacemlx_1_1core.html#a8b5f1435b7628a094a38b62e403e1540">mlx::core::check_shape_dim</a></div><div class="ttdeci">int check_shape_dim(const T dim)</div><div class="ttdoc">Returns the shape dimension if it's within allowed range.</div><div class="ttdef"><b>Definition</b> utils.h:73</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a8b984eef832f757e28cd262d64a49ae7"><div class="ttname"><a href="namespacemlx_1_1core.html#a8b984eef832f757e28cd262d64a49ae7">mlx::core::result_type</a></div><div class="ttdeci">Dtype result_type(const array &amp;a, const array &amp;b)</div><div class="ttdoc">The type from promoting the arrays' types with one another.</div><div class="ttdef"><b>Definition</b> utils.h:57</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a95fc1013cc48fbfee0c54310711a5e58"><div class="ttname"><a href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">mlx::core::StreamOrDevice</a></div><div class="ttdeci">std::variant&lt; std::monostate, Stream, Device &gt; StreamOrDevice</div><div class="ttdef"><b>Definition</b> utils.h:14</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_ac198b7e282957c724c84a435e8f1215e"><div class="ttname"><a href="namespacemlx_1_1core.html#ac198b7e282957c724c84a435e8f1215e">mlx::core::default_stream</a></div><div class="ttdeci">Stream default_stream(Device d)</div><div class="ttdoc">Get the default stream for the given device.</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_ad4b664de4a4abd305827b30879b9da33"><div class="ttname"><a href="namespacemlx_1_1core.html#ad4b664de4a4abd305827b30879b9da33">mlx::core::is_same_shape</a></div><div class="ttdeci">bool is_same_shape(const std::vector&lt; array &gt; &amp;arrays)</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_adacbc4526e8964b267a8ec3eb1bc1a32"><div class="ttname"><a href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32">mlx::core::is_power_of_2</a></div><div class="ttdeci">bool is_power_of_2(int n)</div><div class="ttdef"><b>Definition</b> utils.h:122</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_af35a2b06517d8bb7dbb469692b4f841c"><div class="ttname"><a href="namespacemlx_1_1core.html#af35a2b06517d8bb7dbb469692b4f841c">mlx::core::set_default_stream</a></div><div class="ttdeci">void set_default_stream(Stream s)</div><div class="ttdoc">Make the stream the default for its device.</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_af5a408a78cc934717dd711ddfda58ea6"><div class="ttname"><a href="namespacemlx_1_1core.html#af5a408a78cc934717dd711ddfda58ea6">mlx::core::global_formatter</a></div><div class="ttdeci">PrintFormatter global_formatter</div></div>
<div class="ttc" id="astream_8h_html"><div class="ttname"><a href="stream_8h.html">stream.h</a></div></div>