mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-18 10:26:56 +08:00
rebase
This commit is contained in:
166
docs/build/html/utils_8h_source.html
vendored
166
docs/build/html/utils_8h_source.html
vendored
@@ -166,118 +166,118 @@ $(function(){ initResizable(false); });
|
||||
</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#aafaf24a28297428caf6d0c36c623489e"> 63</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1_dtype.html">Dtype</a> <a class="code hl_function" href="namespacemlx_1_1core.html#a8b984eef832f757e28cd262d64a49ae7">result_type</a>(<span class="keyword">const</span> std::vector<array>& arrays);</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.html#a075e07def338cd9d815182d0e6a656c0"> 65</a></span>std::vector<int> <a class="code hl_function" href="namespacemlx_1_1core.html#a075e07def338cd9d815182d0e6a656c0">broadcast_shapes</a>(</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">const</span> std::vector<int>& s1,</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">const</span> std::vector<int>& s2);</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#aefa6a2ec6439e9619cafd227a1dc14ab"> 65</a></span><a class="code hl_typedef" href="namespacemlx_1_1core.html#a9be5b57d393e66169279cf521813af9b">Shape</a> <a class="code hl_function" href="namespacemlx_1_1core.html#aefa6a2ec6439e9619cafd227a1dc14ab">broadcast_shapes</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a9be5b57d393e66169279cf521813af9b">Shape</a>& s1, <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a9be5b57d393e66169279cf521813af9b">Shape</a>& s2);</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"><a class="line" href="namespacemlx_1_1core.html#ad4b664de4a4abd305827b30879b9da33"> 67</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad4b664de4a4abd305827b30879b9da33">is_same_shape</a>(<span class="keyword">const</span> std::vector<array>& arrays);</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ad4b664de4a4abd305827b30879b9da33"> 69</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad4b664de4a4abd305827b30879b9da33">is_same_shape</a>(<span class="keyword">const</span> std::vector<array>& arrays);</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||||
<div class="foldopen" id="foldopen00073" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a8b5f1435b7628a094a38b62e403e1540"> 73</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8b5f1435b7628a094a38b62e403e1540">check_shape_dim</a>(<span class="keyword">const</span> T dim) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> is_signed = std::numeric_limits<T>::is_signed;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">using </span>U = std::conditional_t<is_signed, ssize_t, size_t>;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">constexpr</span> U <a class="code hl_function" href="group__ops.html#gab27599802617a4c8f9964ab5f4ffee12">min</a> = <span class="keyword">static_cast<</span>U<span class="keyword">></span>(std::numeric_limits<int>::min());</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">constexpr</span> U <a class="code hl_function" href="group__ops.html#ga7fed87d96cc7741d8267f4eac83f5fe7">max</a> = <span class="keyword">static_cast<</span>U<span class="keyword">></span>(std::numeric_limits<int>::max());</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">if</span> ((is_signed && dim < <a class="code hl_function" href="group__ops.html#gab27599802617a4c8f9964ab5f4ffee12">min</a>) || dim > <a class="code hl_function" href="group__ops.html#ga7fed87d96cc7741d8267f4eac83f5fe7">max</a>) {</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">throw</span> std::invalid_argument(</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="stringliteral">"Shape dimension falls outside supported `int` range."</span>);</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> }</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(dim);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||||
<div class="foldopen" id="foldopen00071" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a8b5f1435b7628a094a38b62e403e1540"> 71</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8b5f1435b7628a094a38b62e403e1540">check_shape_dim</a>(<span class="keyword">const</span> T dim) {</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> is_signed = std::numeric_limits<T>::is_signed;</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keyword">using </span>U = std::conditional_t<is_signed, ssize_t, size_t>;</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">constexpr</span> U <a class="code hl_function" href="group__ops.html#gab27599802617a4c8f9964ab5f4ffee12">min</a> = <span class="keyword">static_cast<</span>U<span class="keyword">></span>(std::numeric_limits<int>::min());</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">constexpr</span> U <a class="code hl_function" href="group__ops.html#ga7fed87d96cc7741d8267f4eac83f5fe7">max</a> = <span class="keyword">static_cast<</span>U<span class="keyword">></span>(std::numeric_limits<int>::max());</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">if</span> ((is_signed && dim < <a class="code hl_function" href="group__ops.html#gab27599802617a4c8f9964ab5f4ffee12">min</a>) || dim > <a class="code hl_function" href="group__ops.html#ga7fed87d96cc7741d8267f4eac83f5fe7">max</a>) {</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">throw</span> std::invalid_argument(</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="stringliteral">"Shape dimension falls outside supported `int` range."</span>);</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(dim);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </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"><a class="line" href="namespacemlx_1_1core.html#a1e5c30e316afa30c14bc48b92afdb794"> 94</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_device.html">Device</a>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_dtype.html">Dtype</a>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_enumeration" href="structmlx_1_1core_1_1_dtype.html#adb1ea8b45a0c53e04a0e73b168702715">Dtype::Kind</a>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> std::vector<int>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> std::vector<size_t>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> std::vector<int64_t>& 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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1complex64__t.html">complex64_t</a>& v) {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> os << v.real() << (v.imag() >= 0 ? <span class="stringliteral">"+"</span> : <span class="stringliteral">""</span>) << v.imag() << <span class="stringliteral">"j"</span>;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>}</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0181b5d72bf3d34448dabc70f7ff858d"> 90</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="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1e5c30e316afa30c14bc48b92afdb794"> 92</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_device.html">Device</a>& d);</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4ddd07021b36c848d6fb1dd9ac276822"> 93</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>& s);</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0023c267cf81345fad65e7a797954cd3"> 94</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_dtype.html">Dtype</a>& d);</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1fd58658474fb842d648dcf8f7d9f078"> 95</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_enumeration" href="structmlx_1_1core_1_1_dtype.html#adb1ea8b45a0c53e04a0e73b168702715">Dtype::Kind</a>& k);</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a123331f01188bd76e37623b63b6b4340"> 96</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> a);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9146063485ab071977150c6b224d0e7b"> 97</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a9be5b57d393e66169279cf521813af9b">Shape</a>& v);</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a860a8ed99050bd93f37a8795245c4f5b"> 98</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#aca6e505f52ea1464d9c2c09f9f445d62">Strides</a>& v);</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a5e5bd5c57b1cf19776bdb41e732861d9"> 99</a></span>std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> std::vector<int64_t>& v);</div>
|
||||
<div class="foldopen" id="foldopen00100" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a42a19c8442b173606e714364227e7d45"> 100</a></span><span class="keyword">inline</span> std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1complex64__t.html">complex64_t</a>& v) {</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span> os << v.real() << (v.imag() >= 0 ? <span class="stringliteral">"+"</span> : <span class="stringliteral">""</span>) << v.imag() << <span class="stringliteral">"j"</span>;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>}</div>
|
||||
</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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& 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>& v) {</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">return</span> os << static_cast<float>(v);</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span>}</div>
|
||||
<div class="foldopen" id="foldopen00103" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a57eb97a5eba99a846ac429795e407574"> 103</a></span><span class="keyword">inline</span> std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& 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>& v) {</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">return</span> os << static_cast<float>(v);</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</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& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="struct___m_l_x___b_float16.html">bfloat16_t</a>& v) {</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">return</span> os << static_cast<float>(v);</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>}</div>
|
||||
<div class="foldopen" id="foldopen00106" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a7db909d54cf07375e89424c32c07a29c"> 106</a></span><span class="keyword">inline</span> std::ostream& <a class="code hl_function" href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">operator<<</a>(std::ostream& os, <span class="keyword">const</span> <a class="code hl_struct" href="struct___m_l_x___b_float16.html">bfloat16_t</a>& v) {</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">return</span> os << static_cast<float>(v);</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</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#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 & (n - 1)) == 0) && n != 0;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span>}</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="foldopen" id="foldopen00110" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32"> 110</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="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">return</span> ((n & (n - 1)) == 0) && n != 0;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>}</div>
|
||||
</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 class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
|
||||
<div class="foldopen" id="foldopen00114" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a685c0530e338aabc622325685846ce93"> 114</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="l00115" name="l00115"></a><span class="lineno"> 115</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="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> n;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">return</span> pow(2, std::ceil(std::log2(n)));</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="foldopen" id="foldopen00121" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html"> 121</a></span><span class="keyword">namespace </span>env {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
|
||||
<div class="foldopen" id="foldopen00123" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html"> 123</a></span><span class="keyword">namespace </span>env {</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3"> 123</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">get_var</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span> default_value);</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3"> 125</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">get_var</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span> default_value);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="foldopen" id="foldopen00127" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html#ac3266e1259a64c8b56bdc6c7029179f2"> 127</a></span><span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#ac3266e1259a64c8b56bdc6c7029179f2">bfs_max_width</a>() {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">static</span> <span class="keywordtype">int</span> bfs_max_width_ = <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">get_var</a>(<span class="stringliteral">"MLX_BFS_MAX_WIDTH"</span>, 20);</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">return</span> bfs_max_width_;</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>}</div>
|
||||
<div class="foldopen" id="foldopen00125" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html#ac3266e1259a64c8b56bdc6c7029179f2"> 125</a></span><span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#ac3266e1259a64c8b56bdc6c7029179f2">bfs_max_width</a>() {</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keyword">static</span> <span class="keywordtype">int</span> bfs_max_width_ = <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">get_var</a>(<span class="stringliteral">"MLX_BFS_MAX_WIDTH"</span>, 20);</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> bfs_max_width_;</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||
<div class="foldopen" id="foldopen00132" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html#aedbf4e739553024c33dd0094dd9107aa"> 132</a></span><span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#aedbf4e739553024c33dd0094dd9107aa">max_ops_per_buffer</a>() {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">static</span> <span class="keywordtype">int</span> max_ops_per_buffer_ = <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">get_var</a>(<span class="stringliteral">"MLX_MAX_OPS_PER_BUFFER"</span>, 10);</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">return</span> max_ops_per_buffer_;</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>}</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
||||
<div class="foldopen" id="foldopen00130" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1env.html#aedbf4e739553024c33dd0094dd9107aa"> 130</a></span><span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#aedbf4e739553024c33dd0094dd9107aa">max_ops_per_buffer</a>() {</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keyword">static</span> <span class="keywordtype">int</span> max_ops_per_buffer_ = <a class="code hl_function" href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">get_var</a>(<span class="stringliteral">"MLX_MAX_OPS_PER_BUFFER"</span>, 10);</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> max_ops_per_buffer_;</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>} <span class="comment">// namespace env</span></div>
|
||||
</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span>} <span class="comment">// namespace env</span></div>
|
||||
</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</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>
|
||||
<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:23</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:130</div></div>
|
||||
<div class="ttc" id="adevice_8h_html"><div class="ttname"><a href="device_8h.html">device.h</a></div></div>
|
||||
<div class="ttc" id="adtype_8h_html"><div class="ttname"><a href="dtype_8h.html">dtype.h</a></div></div>
|
||||
<div class="ttc" id="agroup__ops_html_ga7fed87d96cc7741d8267f4eac83f5fe7"><div class="ttname"><a href="group__ops.html#ga7fed87d96cc7741d8267f4eac83f5fe7">mlx::core::max</a></div><div class="ttdeci">array max(const array &a, bool keepdims, StreamOrDevice s={})</div><div class="ttdoc">The maximum of all elements of the array.</div></div>
|
||||
<div class="ttc" id="agroup__ops_html_gab27599802617a4c8f9964ab5f4ffee12"><div class="ttname"><a href="group__ops.html#gab27599802617a4c8f9964ab5f4ffee12">mlx::core::min</a></div><div class="ttdeci">array min(const array &a, bool keepdims, StreamOrDevice s={})</div><div class="ttdoc">The minimum of all elements of the array.</div></div>
|
||||
<div class="ttc" id="agroup__ops_html_gad656c30f9fd7d9467e405657b325aa7e"><div class="ttname"><a href="group__ops.html#gad656c30f9fd7d9467e405657b325aa7e">mlx::core::operator<<</a></div><div class="ttdeci">array operator<<(const array &a, const array &b)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1env_html_a0efecbf9efe695adafad12b5a4945df3"><div class="ttname"><a href="namespacemlx_1_1core_1_1env.html#a0efecbf9efe695adafad12b5a4945df3">mlx::core::env::get_var</a></div><div class="ttdeci">int get_var(const char *name, int default_value)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1env_html_ac3266e1259a64c8b56bdc6c7029179f2"><div class="ttname"><a href="namespacemlx_1_1core_1_1env.html#ac3266e1259a64c8b56bdc6c7029179f2">mlx::core::env::bfs_max_width</a></div><div class="ttdeci">int bfs_max_width()</div><div class="ttdef"><b>Definition</b> utils.h:127</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1env_html_aedbf4e739553024c33dd0094dd9107aa"><div class="ttname"><a href="namespacemlx_1_1core_1_1env.html#aedbf4e739553024c33dd0094dd9107aa">mlx::core::env::max_ops_per_buffer</a></div><div class="ttdeci">int max_ops_per_buffer()</div><div class="ttdef"><b>Definition</b> utils.h:132</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1env_html_ac3266e1259a64c8b56bdc6c7029179f2"><div class="ttname"><a href="namespacemlx_1_1core_1_1env.html#ac3266e1259a64c8b56bdc6c7029179f2">mlx::core::env::bfs_max_width</a></div><div class="ttdeci">int bfs_max_width()</div><div class="ttdef"><b>Definition</b> utils.h:125</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1env_html_aedbf4e739553024c33dd0094dd9107aa"><div class="ttname"><a href="namespacemlx_1_1core_1_1env.html#aedbf4e739553024c33dd0094dd9107aa">mlx::core::env::max_ops_per_buffer</a></div><div class="ttdeci">int max_ops_per_buffer()</div><div class="ttdef"><b>Definition</b> utils.h:130</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a0181b5d72bf3d34448dabc70f7ff858d"><div class="ttname"><a href="namespacemlx_1_1core.html#a0181b5d72bf3d34448dabc70f7ff858d">mlx::core::normalize_axis</a></div><div class="ttdeci">int normalize_axis(int axis, int ndim)</div><div class="ttdoc">Returns the axis normalized to be in the range [0, ndim).</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a0196171cfe6ee2953113abce597dc815"><div class="ttname"><a href="namespacemlx_1_1core.html#a0196171cfe6ee2953113abce597dc815">mlx::core::default_device</a></div><div class="ttdeci">const Device & default_device()</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a075e07def338cd9d815182d0e6a656c0"><div class="ttname"><a href="namespacemlx_1_1core.html#a075e07def338cd9d815182d0e6a656c0">mlx::core::broadcast_shapes</a></div><div class="ttdeci">std::vector< int > broadcast_shapes(const std::vector< int > &s1, const std::vector< int > &s2)</div></div>
|
||||
<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 &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 &t1, const Dtype &t2)</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_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:114</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:71</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 &a, const array &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< std::monostate, Stream, Device > StreamOrDevice</div><div class="ttdef"><b>Definition</b> utils.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9be5b57d393e66169279cf521813af9b"><div class="ttname"><a href="namespacemlx_1_1core.html#a9be5b57d393e66169279cf521813af9b">mlx::core::Shape</a></div><div class="ttdeci">std::vector< int32_t > Shape</div><div class="ttdef"><b>Definition</b> array.h:20</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_aca6e505f52ea1464d9c2c09f9f445d62"><div class="ttname"><a href="namespacemlx_1_1core.html#aca6e505f52ea1464d9c2c09f9f445d62">mlx::core::Strides</a></div><div class="ttdeci">std::vector< size_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:21</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< array > &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:112</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:110</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_aefa6a2ec6439e9619cafd227a1dc14ab"><div class="ttname"><a href="namespacemlx_1_1core.html#aefa6a2ec6439e9619cafd227a1dc14ab">mlx::core::broadcast_shapes</a></div><div class="ttdeci">Shape broadcast_shapes(const Shape &s1, const Shape &s2)</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>
|
||||
|
Reference in New Issue
Block a user