This commit is contained in:
CircleCI Docs
2025-02-06 20:16:29 +00:00
parent d8d647015b
commit cc43b2d401
2299 changed files with 64934 additions and 28640 deletions

View File

@@ -3,7 +3,7 @@
<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.1"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MLX: Core array operations</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -52,7 +52,7 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.1 -->
<!-- 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');
@@ -249,9 +249,9 @@ Functions</h2></td></tr>
<tr class="separator:ga19005414e7d8020cd6e94e06bf399b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ea089f42b9940510619052b7166d9ac" id="r_ga9ea089f42b9940510619052b7166d9ac"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga9ea089f42b9940510619052b7166d9ac">mlx::core::split</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &amp;indices, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="separator:ga9ea089f42b9940510619052b7166d9ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga577c911618575314de63d1060656a26e" id="r_ga577c911618575314de63d1060656a26e"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga577c911618575314de63d1060656a26e">mlx::core::meshgrid</a> (const std::vector&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt; &amp;arrays, bool sparse=false, std::string indexing=&quot;xy&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga577c911618575314de63d1060656a26e"><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector of coordinate arrays from coordinate vectors. <br /></td></tr>
<tr class="separator:ga577c911618575314de63d1060656a26e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5ecddb74ba7861eb82eca8653501d5dc" id="r_ga5ecddb74ba7861eb82eca8653501d5dc"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5ecddb74ba7861eb82eca8653501d5dc">mlx::core::meshgrid</a> (const std::vector&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt; &amp;arrays, bool sparse=false, const std::string &amp;indexing=&quot;xy&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga5ecddb74ba7861eb82eca8653501d5dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector of coordinate arrays from coordinate vectors. <br /></td></tr>
<tr class="separator:ga5ecddb74ba7861eb82eca8653501d5dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga157cd7c23f9b306fee2e1eb2b9bf1dd8" id="r_ga157cd7c23f9b306fee2e1eb2b9bf1dd8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga157cd7c23f9b306fee2e1eb2b9bf1dd8">mlx::core::clip</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::optional&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt; &amp;a_min=std::nullopt, const std::optional&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt; &amp;a_max=std::nullopt, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga157cd7c23f9b306fee2e1eb2b9bf1dd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clip (limit) the values in an array. <br /></td></tr>
<tr class="separator:ga157cd7c23f9b306fee2e1eb2b9bf1dd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -283,16 +283,16 @@ Functions</h2></td></tr>
<tr class="memitem:ga24067d10a842db2c9d509ea48135a2c3" id="r_ga24067d10a842db2c9d509ea48135a2c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga24067d10a842db2c9d509ea48135a2c3">mlx::core::moveaxis</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, int source, int destination, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga24067d10a842db2c9d509ea48135a2c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move an axis of an array. <br /></td></tr>
<tr class="separator:ga24067d10a842db2c9d509ea48135a2c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga58e03f39aa5d63aba1646f530706a920" id="r_ga58e03f39aa5d63aba1646f530706a920"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga58e03f39aa5d63aba1646f530706a920">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::vector&lt; int &gt; &amp;axes, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &amp;low_pad_size, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &amp;high_pad_size, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga58e03f39aa5d63aba1646f530706a920"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_pad.html">Pad</a> an array with a constant value. <br /></td></tr>
<tr class="separator:ga58e03f39aa5d63aba1646f530706a920"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8495c9902b0a67f288918cb528d5abeb" id="r_ga8495c9902b0a67f288918cb528d5abeb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8495c9902b0a67f288918cb528d5abeb">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::vector&lt; std::pair&lt; int, int &gt; &gt; &amp;pad_width, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga8495c9902b0a67f288918cb528d5abeb"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_pad.html">Pad</a> an array with a constant value along all axes. <br /></td></tr>
<tr class="separator:ga8495c9902b0a67f288918cb528d5abeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeaae2f9637b0b3e2b4c6c0517e285935" id="r_gaeaae2f9637b0b3e2b4c6c0517e285935"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gaeaae2f9637b0b3e2b4c6c0517e285935">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::pair&lt; int, int &gt; &amp;pad_width, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="separator:gaeaae2f9637b0b3e2b4c6c0517e285935"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b8684361f57cbfd5e6eedf82a62ded0" id="r_ga5b8684361f57cbfd5e6eedf82a62ded0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5b8684361f57cbfd5e6eedf82a62ded0">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, int pad_width, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="separator:ga5b8684361f57cbfd5e6eedf82a62ded0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab95ebd20bd7c6d1c840007cc020cbc0c" id="r_gab95ebd20bd7c6d1c840007cc020cbc0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gab95ebd20bd7c6d1c840007cc020cbc0c">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::vector&lt; int &gt; &amp;axes, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &amp;low_pad_size, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &amp;high_pad_size, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string &amp;mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:gab95ebd20bd7c6d1c840007cc020cbc0c"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_pad.html">Pad</a> an array with a constant value. <br /></td></tr>
<tr class="separator:gab95ebd20bd7c6d1c840007cc020cbc0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad89f464e92c356faab1f1c2e763b1fb7" id="r_gad89f464e92c356faab1f1c2e763b1fb7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gad89f464e92c356faab1f1c2e763b1fb7">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::vector&lt; std::pair&lt; int, int &gt; &gt; &amp;pad_width, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string &amp;mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:gad89f464e92c356faab1f1c2e763b1fb7"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_pad.html">Pad</a> an array with a constant value along all axes. <br /></td></tr>
<tr class="separator:gad89f464e92c356faab1f1c2e763b1fb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2d5a17d3d5225fed34905e786c31c5f" id="r_gab2d5a17d3d5225fed34905e786c31c5f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gab2d5a17d3d5225fed34905e786c31c5f">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::pair&lt; int, int &gt; &amp;pad_width, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string &amp;mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="separator:gab2d5a17d3d5225fed34905e786c31c5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa73ac5674467b1d5c74de6fef7204c44" id="r_gaa73ac5674467b1d5c74de6fef7204c44"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa73ac5674467b1d5c74de6fef7204c44">mlx::core::pad</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, int pad_width, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;pad_value=<a class="el" href="classmlx_1_1core_1_1array.html">array</a>(0), const std::string &amp;mode=&quot;constant&quot;, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="separator:gaa73ac5674467b1d5c74de6fef7204c44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68da0176fefbe0c0096783c6fd926c6a" id="r_ga68da0176fefbe0c0096783c6fd926c6a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga68da0176fefbe0c0096783c6fd926c6a">mlx::core::transpose</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga68da0176fefbe0c0096783c6fd926c6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Permutes the dimensions in reverse order. <br /></td></tr>
<tr class="separator:ga68da0176fefbe0c0096783c6fd926c6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -762,6 +762,9 @@ Functions</h2></td></tr>
<tr class="memitem:ga8e0caebf43cd65bd40e4ce97922cd06b" id="r_ga8e0caebf43cd65bd40e4ce97922cd06b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8e0caebf43cd65bd40e4ce97922cd06b">mlx::core::put_along_axis</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;indices, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;values, int axis, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:ga8e0caebf43cd65bd40e4ce97922cd06b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Put the values into the array at the given indices along the axis. <br /></td></tr>
<tr class="separator:ga8e0caebf43cd65bd40e4ce97922cd06b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3fd98c0d06b84b836f93bddbd7a2a0d" id="r_gab3fd98c0d06b84b836f93bddbd7a2a0d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gab3fd98c0d06b84b836f93bddbd7a2a0d">mlx::core::scatter_add_axis</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;indices, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;values, int axis, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:gab3fd98c0d06b84b836f93bddbd7a2a0d"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_add.html">Add</a> the values into the array at the given indices along the axis. <br /></td></tr>
<tr class="separator:gab3fd98c0d06b84b836f93bddbd7a2a0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad438be8f90bae9d37c6853b8f4225d61" id="r_gad438be8f90bae9d37c6853b8f4225d61"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gad438be8f90bae9d37c6853b8f4225d61">mlx::core::scatter</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;a, const std::vector&lt; <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &gt; &amp;indices, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;updates, const std::vector&lt; int &gt; &amp;axes, <a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s={})</td></tr>
<tr class="memdesc:gad438be8f90bae9d37c6853b8f4225d61"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1_scatter.html">Scatter</a> updates to the given indices. <br /></td></tr>
<tr class="separator:gad438be8f90bae9d37c6853b8f4225d61"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -5371,8 +5374,8 @@ template&lt;typename T&gt; </div>
</div>
</div>
<a id="ga577c911618575314de63d1060656a26e" name="ga577c911618575314de63d1060656a26e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga577c911618575314de63d1060656a26e">&#9670;&#160;</a></span>meshgrid()</h2>
<a id="ga5ecddb74ba7861eb82eca8653501d5dc" name="ga5ecddb74ba7861eb82eca8653501d5dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5ecddb74ba7861eb82eca8653501d5dc">&#9670;&#160;</a></span>meshgrid()</h2>
<div class="memitem">
<div class="memproto">
@@ -5390,7 +5393,7 @@ template&lt;typename T&gt; </div>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string</td> <td class="paramname"><span class="paramname"><em>indexing</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;xy&quot;</span>, </td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>indexing</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;xy&quot;</span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -6795,8 +6798,8 @@ template&lt;typename T&gt; </div>
</div>
</div>
<a id="gaeaae2f9637b0b3e2b4c6c0517e285935" name="gaeaae2f9637b0b3e2b4c6c0517e285935"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeaae2f9637b0b3e2b4c6c0517e285935">&#9670;&#160;</a></span>pad() <span class="overload">[1/4]</span></h2>
<a id="gab2d5a17d3d5225fed34905e786c31c5f" name="gab2d5a17d3d5225fed34905e786c31c5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab2d5a17d3d5225fed34905e786c31c5f">&#9670;&#160;</a></span>pad() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -6819,7 +6822,7 @@ template&lt;typename T&gt; </div>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -6831,8 +6834,8 @@ template&lt;typename T&gt; </div>
</div>
</div>
<a id="ga58e03f39aa5d63aba1646f530706a920" name="ga58e03f39aa5d63aba1646f530706a920"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga58e03f39aa5d63aba1646f530706a920">&#9670;&#160;</a></span>pad() <span class="overload">[2/4]</span></h2>
<a id="gab95ebd20bd7c6d1c840007cc020cbc0c" name="gab95ebd20bd7c6d1c840007cc020cbc0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab95ebd20bd7c6d1c840007cc020cbc0c">&#9670;&#160;</a></span>pad() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -6865,7 +6868,7 @@ template&lt;typename T&gt; </div>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -6879,8 +6882,8 @@ template&lt;typename T&gt; </div>
</div>
</div>
<a id="ga8495c9902b0a67f288918cb528d5abeb" name="ga8495c9902b0a67f288918cb528d5abeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8495c9902b0a67f288918cb528d5abeb">&#9670;&#160;</a></span>pad() <span class="overload">[3/4]</span></h2>
<a id="gad89f464e92c356faab1f1c2e763b1fb7" name="gad89f464e92c356faab1f1c2e763b1fb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad89f464e92c356faab1f1c2e763b1fb7">&#9670;&#160;</a></span>pad() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -6903,7 +6906,7 @@ template&lt;typename T&gt; </div>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -6917,8 +6920,8 @@ template&lt;typename T&gt; </div>
</div>
</div>
<a id="ga5b8684361f57cbfd5e6eedf82a62ded0" name="ga5b8684361f57cbfd5e6eedf82a62ded0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5b8684361f57cbfd5e6eedf82a62ded0">&#9670;&#160;</a></span>pad() <span class="overload">[4/4]</span></h2>
<a id="gaa73ac5674467b1d5c74de6fef7204c44" name="gaa73ac5674467b1d5c74de6fef7204c44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa73ac5674467b1d5c74de6fef7204c44">&#9670;&#160;</a></span>pad() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -6941,7 +6944,7 @@ template&lt;typename T&gt; </div>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>mode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;constant&quot;</span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -7969,6 +7972,44 @@ template&lt;typename T&gt; </div>
<p><a class="el" href="classmlx_1_1core_1_1_scatter.html">Scatter</a> and add updates to given indices. </p>
</div>
</div>
<a id="gab3fd98c0d06b84b836f93bddbd7a2a0d" name="gab3fd98c0d06b84b836f93bddbd7a2a0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab3fd98c0d06b84b836f93bddbd7a2a0d">&#9670;&#160;</a></span>scatter_add_axis()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> mlx::core::scatter_add_axis </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;</td> <td class="paramname"><span class="paramname"><em>a</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;</td> <td class="paramname"><span class="paramname"><em>indices</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &amp;</td> <td class="paramname"><span class="paramname"><em>values</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>axis</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a></td> <td class="paramname"><span class="paramname"><em>s</em></span><span class="paramdefsep"> = </span><span class="paramdefval">{}</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="classmlx_1_1core_1_1_add.html">Add</a> the values into the array at the given indices along the axis. </p>
</div>
</div>
<a id="ga9adda5f9202bb3486e4d9e1114e3a56f" name="ga9adda5f9202bb3486e4d9e1114e3a56f"></a>
@@ -10342,7 +10383,7 @@ template&lt;typename T&gt; </div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<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.1 </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>