mlx/docs/build/html/cpu_2binary__ops_8h_source.html

288 lines
45 KiB
HTML
Raw Normal View History

2025-02-07 04:16:29 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MLX: mlx/backend/cpu/binary_ops.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">MLX
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('cpu_2binary__ops_8h_source.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">binary_ops.h</div></div>
</div><!--header-->
<div class="contents">
<a href="cpu_2binary__ops_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright © 2023-2024 Apple Inc.</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;<a class="code" href="simd_8h.html">mlx/backend/cpu/simd/simd.h</a>&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="foldopen" id="foldopen00007" data-start="{" data-end="}">
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1detail.html"> 7</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core_1_1detail.html">mlx::core::detail</a> {</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">using namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core_1_1simd.html">mlx::core::simd</a>;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="foldopen" id="foldopen00011" data-start="" data-end="">
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="cpu_2binary__ops_8h.html#ad606fe7b9586413e760cfe461c9be119"> 11</a></span><span class="preprocessor">#define BINARY_SINGLE() \</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor"> template &lt;typename T&gt; \</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor"> T operator()(T x, T y) { \</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor"> return (*this)(Simd&lt;T, 1&gt;(x), Simd&lt;T, 1&gt;(y)).value; \</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor"> }</span></div>
</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="foldopen" id="foldopen00017" data-start="" data-end="">
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a"> 17</a></span><span class="preprocessor">#define DEFAULT_BINARY_OP(Op, op) \</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor"> struct Op { \</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor"> template &lt;int N, typename T&gt; \</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor"> Simd&lt;T, N&gt; operator()(Simd&lt;T, N&gt; x, Simd&lt;T, N&gt; y) { \</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor"> return op(x, y); \</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor"> BINARY_SINGLE() \</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor"> };</span></div>
</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_add.html#a95cf053f89883d82f31ec53154b430a0"> 26</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_add.html">Add</a>, <span class="keyword">operator</span>+)</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_arc_tan2.html#a01da277adf65232bd67b252a31baedd7"> 27</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_arc_tan2.html">ArcTan2</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a23dba4ee3f0811b41c381733a6e6ff16">atan2</a>)</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_divide.html#a9a3eab9eaf77b5a94ede2db8c7cef9f2"> 28</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_divide.html">Divide</a>, operator/)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_multiply.html#a9dda09d0bf0f4153abf37ba894df37d4"> 29</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_multiply.html">Multiply</a>, operator*)</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_subtract.html#a48913052e0a051648b7a69376ec3e3e1"> 30</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_subtract.html">Subtract</a>, operator-)</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_logical_and.html#a5fb547e51ea53517deb54d89c76b4860"> 31</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_logical_and.html">LogicalAnd</a>, operator&amp;&amp;)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_logical_or.html#a4701821e656931d808815753ee529bad"> 32</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_logical_or.html">LogicalOr</a>, operator||)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_bitwise_and.html#a91cff5472e47b13fd9d291b17d2e877b"> 33</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_bitwise_and.html">BitwiseAnd</a>, operator&amp;)</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_bitwise_or.html#abd39ee9af548b16e3fabe4ae956b6f1c"> 34</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_bitwise_or.html">BitwiseOr</a>, operator|)</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_bitwise_xor.html#a8ed25d90a73141938a71ddddfd40b83d"> 35</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_bitwise_xor.html">BitwiseXor</a>, operator^)</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_left_shift.html#a50bcbc53e2278483d9063decf7ad78d8"> 36</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_left_shift.html">LeftShift</a>, operator&lt;&lt;)</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_right_shift.html#aa86d02e4ca59bc7ffacdc342841a0ea9"> 37</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_right_shift.html">RightShift</a>, operator&gt;&gt;)</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_remainder.html#a8b672df71eea3f31f5e2aa50662f3b19"> 38</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_remainder.html">Remainder</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ac66bdf1a8e86a4d350c85037bc764da5">remainder</a>)</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_maximum.html#a1edfed0e0b33227b67c7709691f846c7"> 39</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_maximum.html">Maximum</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">maximum</a>)</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_minimum.html#a28b51060b9345fb2021d5176cd607778"> 40</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_minimum.html">Minimum</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">minimum</a>)</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_power.html#ad047c7d25e1b0f32dc17a03d826cf0a0"> 41</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_power.html">Power</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a19d535de1fc179cc39ec9643c9863cbc">pow</a>)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="foldopen" id="foldopen00043" data-start="" data-end="">
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7"> 43</a></span><span class="preprocessor">#define DEFAULT_BOOL_OP(Op, op) \</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor"> struct Op { \</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="preprocessor"> template &lt;int N, typename T&gt; \</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor"> Simd&lt;bool, N&gt; operator()(Simd&lt;T, N&gt; x, Simd&lt;T, N&gt; y) { \</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="preprocessor"> return op(x, y); \</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor"> template &lt;typename T&gt; \</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor"> bool operator()(T x, T y) { \</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="preprocessor"> return (*this)(Simd&lt;T, 1&gt;(x), Simd&lt;T, 1&gt;(y)).value; \</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor"> };</span></div>
</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_equal.html#a5d3f7423078444e5d690fb6d50fcce23"> 55</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_equal.html">Equal</a>, <span class="keyword">operator</span>==)</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_greater.html#a9186b3e29c84700ea93ca9470556b0b3"> 56</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_greater.html">Greater</a>, operator&gt;)</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_greater_equal.html#a8da40f79562ef8ffbd30ddcf40d83e0f"> 57</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_greater_equal.html">GreaterEqual</a>, operator&gt;=)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_less.html#a8e9c159887284420b1161421e58a0bda"> 58</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_less.html">Less</a>, operator&lt;)</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_less_equal.html#a5f7f700be5fdf4629a96ab271caf5440"> 59</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_less_equal.html">LessEqual</a>, operator&lt;=)</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_not_equal.html#a99d16a3d7f637901869bf650b1ea6e13"> 60</a></span><a class="code hl_define" href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_not_equal.html">NotEqual</a>, operator!=)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="foldopen" id="foldopen00062" data-start="{" data-end="};">
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html"> 62</a></span>struct <a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html">NaNEqual</a> {</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N, <span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00064" data-start="{" data-end="}">
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html#a441e5e8552be45ced34001b465d251e1"> 64</a></span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;bool, N&gt;</a> <a class="code hl_function" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html#a441e5e8552be45ced34001b465d251e1">operator()</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> y) {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">return</span> x == y || (<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a05f4422a037c3bef343fb11f71363b65">isnan</a>(x) &amp;&amp; <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a05f4422a037c3bef343fb11f71363b65">isnan</a>(y));</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00068" data-start="{" data-end="}">
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html#a073b20b0d8d41ec8364b7c477421b9bf"> 68</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html#a073b20b0d8d41ec8364b7c477421b9bf">operator()</a>(T x, T y) {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> (*<span class="keyword">this</span>)(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, 1&gt;</a>(x), <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, 1&gt;</a>(y)).value;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> }</div>
</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>};</div>
</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </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="structmlx_1_1core_1_1detail_1_1_log_add_exp.html"> 73</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html">LogAddExp</a> {</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N, <span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00075" data-start="{" data-end="}">
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html#a434da15bcb95dc979c73ec795cfec339"> 75</a></span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> <a class="code hl_function" href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html#a434da15bcb95dc979c73ec795cfec339">operator()</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> y) {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">auto</span> maxval = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">maximum</a>(x, y);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">auto</span> minval = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">minimum</a>(x, y);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">auto</span> mask = minval == -<a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a771b6597803beb800ff5e7560c41e341">inf</a> || maxval == <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a771b6597803beb800ff5e7560c41e341">inf</a>;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">auto</span> out = maxval + <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ad06680bbc041e76efe2dbff4e11b9a13">log1p</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>(minval - maxval));</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(mask, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a>(maxval), <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a>(out));</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html#ad1663fd809acaa4038f90666436599e5"> 82</a></span> <a class="code hl_define" href="cpu_2binary__ops_8h.html#ad606fe7b9586413e760cfe461c9be119">BINARY_SINGLE</a>()</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>};</div>
</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="foldopen" id="foldopen00085" data-start="{" data-end="};">
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_select.html"> 85</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmlx_1_1core_1_1detail_1_1_select.html">Select</a> {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</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="structmlx_1_1core_1_1detail_1_1_select.html#a930f9da2e6b3453e04f21382435a2cfb"> 87</a></span> T <a class="code hl_function" href="structmlx_1_1core_1_1detail_1_1_select.html#a930f9da2e6b3453e04f21382435a2cfb">operator()</a>(<span class="keywordtype">bool</span> condition, T x, T y) {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">return</span> (*<span class="keyword">this</span>)(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;bool, 1&gt;</a>(condition), <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, 1&gt;</a>(x), <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, 1&gt;</a>(y))</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> .value;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
</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> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> N, <span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00093" data-start="{" data-end="}">
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1detail_1_1_select.html#a8c5135e3098cfd2521a2a266ba08f1e4"> 93</a></span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> <a class="code hl_function" href="structmlx_1_1core_1_1detail_1_1_select.html#a8c5135e3098cfd2521a2a266ba08f1e4">operator()</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;bool, N&gt;</a> condition, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;T, N&gt;</a> y) {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(condition, x, y);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span>};</div>
</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>} <span class="comment">// namespace mlx::core::detail</span></div>
</div>
<div class="ttc" id="acpu_2binary__ops_8h_html_a3f97e0a58306201b54eb73fac0affc8a"><div class="ttname"><a href="cpu_2binary__ops_8h.html#a3f97e0a58306201b54eb73fac0affc8a">DEFAULT_BINARY_OP</a></div><div class="ttdeci">#define DEFAULT_BINARY_OP(Op, op)</div><div class="ttdef"><b>Definition</b> binary_ops.h:17</div></div>
<div class="ttc" id="acpu_2binary__ops_8h_html_a98fb0ee78e9fd26ad6d0a2b365f7caa7"><div class="ttname"><a href="cpu_2binary__ops_8h.html#a98fb0ee78e9fd26ad6d0a2b365f7caa7">DEFAULT_BOOL_OP</a></div><div class="ttdeci">#define DEFAULT_BOOL_OP(Op, op)</div><div class="ttdef"><b>Definition</b> binary_ops.h:43</div></div>
<div class="ttc" id="acpu_2binary__ops_8h_html_ad606fe7b9586413e760cfe461c9be119"><div class="ttname"><a href="cpu_2binary__ops_8h.html#ad606fe7b9586413e760cfe461c9be119">BINARY_SINGLE</a></div><div class="ttdeci">#define BINARY_SINGLE()</div><div class="ttdef"><b>Definition</b> binary_ops.h:11</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1detail_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1detail.html">mlx::core::detail</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:7</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html">mlx::core::simd</a></div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:9</div></div>
2025-02-15 05:44:39 +08:00
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a05f4422a037c3bef343fb11f71363b65"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a05f4422a037c3bef343fb11f71363b65">mlx::core::simd::isnan</a></div><div class="ttdeci">Simd&lt; bool, N &gt; isnan(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:146</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a1996e77a8c3c24b1ba706113ed9028c4"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">mlx::core::simd::minimum</a></div><div class="ttdeci">Simd&lt; T, N &gt; minimum(Simd&lt; T, N &gt; a, Simd&lt; T, N &gt; b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:215</div></div>
2025-02-07 04:16:29 +08:00
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a19d535de1fc179cc39ec9643c9863cbc"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a19d535de1fc179cc39ec9643c9863cbc">mlx::core::simd::pow</a></div><div class="ttdeci">Simd&lt; float16_t, N &gt; pow(Simd&lt; float16_t, N &gt; x, Simd&lt; float16_t, N &gt; y)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:54</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a23dba4ee3f0811b41c381733a6e6ff16"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a23dba4ee3f0811b41c381733a6e6ff16">mlx::core::simd::atan2</a></div><div class="ttdeci">Simd&lt; float16_t, N &gt; atan2(Simd&lt; float16_t, N &gt; x, Simd&lt; float16_t, N &gt; y)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:52</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a771b6597803beb800ff5e7560c41e341"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a771b6597803beb800ff5e7560c41e341">mlx::core::simd::inf</a></div><div class="ttdeci">constexpr float inf</div><div class="ttdef"><b>Definition</b> math.h:9</div></div>
2025-02-15 05:44:39 +08:00
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a7f7a298284e71ddbd2ba0bb6d98b0d16"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">mlx::core::simd::maximum</a></div><div class="ttdeci">Simd&lt; T, N &gt; maximum(Simd&lt; T, N &gt; a, Simd&lt; T, N &gt; b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:209</div></div>
2025-02-07 04:16:29 +08:00
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a835d71dd0bb2f9494a397d9939696ec2"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">mlx::core::simd::exp</a></div><div class="ttdeci">Simd&lt; T, N &gt; exp(Simd&lt; T, N &gt; in)</div><div class="ttdoc">Compute exp(x) in an optimizer friendly way as follows:</div><div class="ttdef"><b>Definition</b> math.h:28</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ac66bdf1a8e86a4d350c85037bc764da5"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ac66bdf1a8e86a4d350c85037bc764da5">mlx::core::simd::remainder</a></div><div class="ttdeci">Simd&lt; float16_t, N &gt; remainder(Simd&lt; float16_t, N &gt; x, Simd&lt; float16_t, N &gt; y)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:53</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ad06680bbc041e76efe2dbff4e11b9a13"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ad06680bbc041e76efe2dbff4e11b9a13">mlx::core::simd::log1p</a></div><div class="ttdeci">Simd&lt; float16_t, N &gt; log1p(Simd&lt; float16_t, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:40</div></div>
2025-02-15 05:44:39 +08:00
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_afb3bcbd8d8b34128cd0c8eb677a170ef"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">mlx::core::simd::select</a></div><div class="ttdeci">Simd&lt; T1, N &gt; select(Simd&lt; MaskT, N &gt; mask, Simd&lt; T1, N &gt; x, Simd&lt; T2, N &gt; y)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:236</div></div>
2025-02-07 04:16:29 +08:00
<div class="ttc" id="asimd_8h_html"><div class="ttname"><a href="simd_8h.html">simd.h</a></div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_add_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_add.html">mlx::core::detail::Add</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:26</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_arc_tan2_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_arc_tan2.html">mlx::core::detail::ArcTan2</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:27</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_bitwise_and_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_bitwise_and.html">mlx::core::detail::BitwiseAnd</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:33</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_bitwise_or_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_bitwise_or.html">mlx::core::detail::BitwiseOr</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:34</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_bitwise_xor_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_bitwise_xor.html">mlx::core::detail::BitwiseXor</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:35</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_divide_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_divide.html">mlx::core::detail::Divide</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:28</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_equal_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_equal.html">mlx::core::detail::Equal</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:55</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_greater_equal_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_greater_equal.html">mlx::core::detail::GreaterEqual</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:57</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_greater_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_greater.html">mlx::core::detail::Greater</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:56</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_left_shift_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_left_shift.html">mlx::core::detail::LeftShift</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:36</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_less_equal_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_less_equal.html">mlx::core::detail::LessEqual</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:59</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_less_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_less.html">mlx::core::detail::Less</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:58</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_log_add_exp_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html">mlx::core::detail::LogAddExp</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:73</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_log_add_exp_html_a434da15bcb95dc979c73ec795cfec339"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html#a434da15bcb95dc979c73ec795cfec339">mlx::core::detail::LogAddExp::operator()</a></div><div class="ttdeci">Simd&lt; T, N &gt; operator()(Simd&lt; T, N &gt; x, Simd&lt; T, N &gt; y)</div><div class="ttdef"><b>Definition</b> binary_ops.h:75</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_logical_and_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_logical_and.html">mlx::core::detail::LogicalAnd</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:31</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_logical_or_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_logical_or.html">mlx::core::detail::LogicalOr</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:32</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_maximum_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_maximum.html">mlx::core::detail::Maximum</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:39</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_minimum_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_minimum.html">mlx::core::detail::Minimum</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:40</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_multiply_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_multiply.html">mlx::core::detail::Multiply</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:29</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_na_n_equal_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html">mlx::core::detail::NaNEqual</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:62</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_na_n_equal_html_a073b20b0d8d41ec8364b7c477421b9bf"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html#a073b20b0d8d41ec8364b7c477421b9bf">mlx::core::detail::NaNEqual::operator()</a></div><div class="ttdeci">bool operator()(T x, T y)</div><div class="ttdef"><b>Definition</b> binary_ops.h:68</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_na_n_equal_html_a441e5e8552be45ced34001b465d251e1"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html#a441e5e8552be45ced34001b465d251e1">mlx::core::detail::NaNEqual::operator()</a></div><div class="ttdeci">Simd&lt; bool, N &gt; operator()(Simd&lt; T, N &gt; x, Simd&lt; T, N &gt; y)</div><div class="ttdef"><b>Definition</b> binary_ops.h:64</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_not_equal_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_not_equal.html">mlx::core::detail::NotEqual</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:60</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_power_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_power.html">mlx::core::detail::Power</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:41</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_remainder_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_remainder.html">mlx::core::detail::Remainder</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:38</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_right_shift_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_right_shift.html">mlx::core::detail::RightShift</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:37</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_select_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_select.html">mlx::core::detail::Select</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:85</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_select_html_a8c5135e3098cfd2521a2a266ba08f1e4"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_select.html#a8c5135e3098cfd2521a2a266ba08f1e4">mlx::core::detail::Select::operator()</a></div><div class="ttdeci">Simd&lt; T, N &gt; operator()(Simd&lt; bool, N &gt; condition, Simd&lt; T, N &gt; x, Simd&lt; T, N &gt; y)</div><div class="ttdef"><b>Definition</b> binary_ops.h:93</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_select_html_a930f9da2e6b3453e04f21382435a2cfb"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_select.html#a930f9da2e6b3453e04f21382435a2cfb">mlx::core::detail::Select::operator()</a></div><div class="ttdeci">T operator()(bool condition, T x, T y)</div><div class="ttdef"><b>Definition</b> binary_ops.h:87</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1detail_1_1_subtract_html"><div class="ttname"><a href="structmlx_1_1core_1_1detail_1_1_subtract.html">mlx::core::detail::Subtract</a></div><div class="ttdef"><b>Definition</b> binary_ops.h:30</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_html"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd.html">mlx::core::simd::Simd</a></div><div class="ttdef"><b>Definition</b> accelerate_simd.h:55</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_48c8bf40aae7e42226b4fe31ea48af19.html">cpu</a></li><li class="navelem"><a class="el" href="cpu_2binary__ops_8h.html">binary_ops.h</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>
</html>