docs update

This commit is contained in:
Awni Hannun
2024-08-10 09:24:35 -07:00
committed by CircleCI Docs
parent 8f68182d95
commit d8f7b8cda6
724 changed files with 14529 additions and 11046 deletions

View File

@@ -181,60 +181,48 @@ $(function() { codefold.init(0); });
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div>
</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="foldopen" id="foldopen00087" data-start="{" data-end="}">
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a625ed440df3fa57318017c1f2c589efe"> 87</a></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a625ed440df3fa57318017c1f2c589efe">is_big_endian</a>() {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keyword">union </span>ByteOrder {</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> int32_t i;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> uint8_t c[4];</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> };</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> ByteOrder b = {0x01234567};</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0181b5d72bf3d34448dabc70f7ff858d"> 92</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a0181b5d72bf3d34448dabc70f7ff858d">normalize_axis</a>(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> ndim);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">return</span> b.c[0] == 0x01;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span>}</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1e5c30e316afa30c14bc48b92afdb794"> 94</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_device.html">Device</a>&amp; d);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4ddd07021b36c848d6fb1dd9ac276822"> 95</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>&amp; s);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0023c267cf81345fad65e7a797954cd3"> 96</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_dtype.html">Dtype</a>&amp; d);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1fd58658474fb842d648dcf8f7d9f078"> 97</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_enumeration" href="structmlx_1_1core_1_1_dtype.html#adb1ea8b45a0c53e04a0e73b168702715">Dtype::Kind</a>&amp; k);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a123331f01188bd76e37623b63b6b4340"> 98</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> a);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4e733bba89760abed32393e085812b22"> 99</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> std::vector&lt;int&gt;&amp; v);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6276bb9bad43ed4a27a1e2c3f5bfd990"> 100</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> std::vector&lt;size_t&gt;&amp; v);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a5e5bd5c57b1cf19776bdb41e732861d9"> 101</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> std::vector&lt;int64_t&gt;&amp; v);</div>
<div class="foldopen" id="foldopen00102" data-start="{" data-end="}">
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a42a19c8442b173606e714364227e7d45"> 102</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1complex64__t.html">complex64_t</a>&amp; v) {</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> os &lt;&lt; v.real() &lt;&lt; (v.imag() &gt;= 0 ? <span class="stringliteral">&quot;+&quot;</span> : <span class="stringliteral">&quot;&quot;</span>) &lt;&lt; v.imag() &lt;&lt; <span class="stringliteral">&quot;j&quot;</span>;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>}</div>
</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0181b5d72bf3d34448dabc70f7ff858d"> 102</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a0181b5d72bf3d34448dabc70f7ff858d">normalize_axis</a>(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> ndim);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1e5c30e316afa30c14bc48b92afdb794"> 104</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_device.html">Device</a>&amp; d);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4ddd07021b36c848d6fb1dd9ac276822"> 105</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>&amp; s);</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0023c267cf81345fad65e7a797954cd3"> 106</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_dtype.html">Dtype</a>&amp; d);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1fd58658474fb842d648dcf8f7d9f078"> 107</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_enumeration" href="structmlx_1_1core_1_1_dtype.html#adb1ea8b45a0c53e04a0e73b168702715">Dtype::Kind</a>&amp; k);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a123331f01188bd76e37623b63b6b4340"> 108</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> a);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4e733bba89760abed32393e085812b22"> 109</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> std::vector&lt;int&gt;&amp; v);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6276bb9bad43ed4a27a1e2c3f5bfd990"> 110</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> std::vector&lt;size_t&gt;&amp; v);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a5e5bd5c57b1cf19776bdb41e732861d9"> 111</a></span>std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> std::vector&lt;int64_t&gt;&amp; v);</div>
<div class="foldopen" id="foldopen00105" data-start="{" data-end="}">
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a57eb97a5eba99a846ac429795e407574"> 105</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1___m_l_x___float16.html">float16_t</a>&amp; v) {</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">return</span> os &lt;&lt; static_cast&lt;float&gt;(v);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span>}</div>
</div>
<div class="foldopen" id="foldopen00108" data-start="{" data-end="}">
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a7db909d54cf07375e89424c32c07a29c"> 108</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1___m_l_x___b_float16.html">bfloat16_t</a>&amp; v) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">return</span> os &lt;&lt; static_cast&lt;float&gt;(v);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>}</div>
</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="foldopen" id="foldopen00112" data-start="{" data-end="}">
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a42a19c8442b173606e714364227e7d45"> 112</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1complex64__t.html">complex64_t</a>&amp; v) {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">return</span> os &lt;&lt; v.real() &lt;&lt; (v.imag() &gt;= 0 ? <span class="stringliteral">&quot;+&quot;</span> : <span class="stringliteral">&quot;&quot;</span>) &lt;&lt; v.imag() &lt;&lt; <span class="stringliteral">&quot;j&quot;</span>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32"> 112</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="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">return</span> ((n &amp; (n - 1)) == 0) &amp;&amp; n != 0;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span>}</div>
</div>
<div class="foldopen" id="foldopen00115" data-start="{" data-end="}">
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a57eb97a5eba99a846ac429795e407574"> 115</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1___m_l_x___float16.html">float16_t</a>&amp; v) {</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> os &lt;&lt; static_cast&lt;float&gt;(v);</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>}</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="foldopen" id="foldopen00116" data-start="{" data-end="}">
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a685c0530e338aabc622325685846ce93"> 116</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="l00117" name="l00117"></a><span class="lineno"> 117</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="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">return</span> n;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">return</span> pow(2, std::ceil(std::log2(n)));</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>}</div>
</div>
<div class="foldopen" id="foldopen00118" data-start="{" data-end="}">
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a7db909d54cf07375e89424c32c07a29c"> 118</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1___m_l_x___b_float16.html">bfloat16_t</a>&amp; v) {</div>
<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> </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="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</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>
@@ -250,22 +238,21 @@ $(function() { codefold.init(0); });
<div class="ttc" id="anamespacemlx_1_1core_html_a312a2de41367fe52caeaf8c0f596a120"><div class="ttname"><a href="namespacemlx_1_1core.html#a312a2de41367fe52caeaf8c0f596a120">mlx::core::set_default_device</a></div><div class="ttdeci">void set_default_device(const Device &amp;d)</div></div>
<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_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:116</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_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:112</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>
<div class="ttc" id="astructmlx_1_1core_1_1___m_l_x___b_float16_html"><div class="ttname"><a href="structmlx_1_1core_1_1___m_l_x___b_float16.html">mlx::core::_MLX_BFloat16</a></div><div class="ttdef"><b>Definition</b> bf16.h:21</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1___m_l_x___float16_html"><div class="ttname"><a href="structmlx_1_1core_1_1___m_l_x___float16.html">mlx::core::_MLX_Float16</a></div><div class="ttdef"><b>Definition</b> fp16.h:21</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_device_html"><div class="ttname"><a href="structmlx_1_1core_1_1_device.html">mlx::core::Device</a></div><div class="ttdef"><b>Definition</b> device.h:7</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_dtype_html"><div class="ttname"><a href="structmlx_1_1core_1_1_dtype.html">mlx::core::Dtype</a></div><div class="ttdef"><b>Definition</b> dtype.h:15</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_dtype_html_adb1ea8b45a0c53e04a0e73b168702715"><div class="ttname"><a href="structmlx_1_1core_1_1_dtype.html#adb1ea8b45a0c53e04a0e73b168702715">mlx::core::Dtype::Kind</a></div><div class="ttdeci">Kind</div><div class="ttdef"><b>Definition</b> dtype.h:32</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_dtype_html"><div class="ttname"><a href="structmlx_1_1core_1_1_dtype.html">mlx::core::Dtype</a></div><div class="ttdef"><b>Definition</b> dtype.h:13</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_dtype_html_adb1ea8b45a0c53e04a0e73b168702715"><div class="ttname"><a href="structmlx_1_1core_1_1_dtype.html#adb1ea8b45a0c53e04a0e73b168702715">mlx::core::Dtype::Kind</a></div><div class="ttdeci">Kind</div><div class="ttdef"><b>Definition</b> dtype.h:30</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_print_formatter_html"><div class="ttname"><a href="structmlx_1_1core_1_1_print_formatter.html">mlx::core::PrintFormatter</a></div><div class="ttdef"><b>Definition</b> utils.h:38</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_print_formatter_html_a520adb07fafd911b22bc24b295e4f6cf"><div class="ttname"><a href="structmlx_1_1core_1_1_print_formatter.html#a520adb07fafd911b22bc24b295e4f6cf">mlx::core::PrintFormatter::print</a></div><div class="ttdeci">void print(std::ostream &amp;os, uint32_t val)</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1_print_formatter_html_a57af5c32561b95d6ac2a3a1dc4f5d43e"><div class="ttname"><a href="structmlx_1_1core_1_1_print_formatter.html#a57af5c32561b95d6ac2a3a1dc4f5d43e">mlx::core::PrintFormatter::print</a></div><div class="ttdeci">void print(std::ostream &amp;os, float val)</div></div>