mlx/docs/build/html/neon__fp16__simd_8h_source.html
CircleCI Docs c7080f89ca rebase
2025-06-04 01:01:55 +00:00

430 lines
70 KiB
HTML

<!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/simd/neon_fp16_simd.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('neon__fp16__simd_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">neon_fp16_simd.h</div></div>
</div><!--header-->
<div class="contents">
<a href="neon__fp16__simd_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="preprocessor">#pragma once</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">#include &lt;arm_neon.h&gt;</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="base__simd_8h.html">mlx/backend/cpu/simd/base_simd.h</a>&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core_1_1simd.html">mlx::core::simd</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"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb"> 9</a></span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> = 8;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">template</span> &lt;&gt;</div>
<div class="foldopen" id="foldopen00012" data-start="{" data-end="};">
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html"> 12</a></span><span class="keyword">struct </span><a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a04a3a73f98fa5c9090b6cf6154e99e8d">Simd</a>&lt;<a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a>, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>&gt; {</div>
<div class="foldopen" id="foldopen00013" data-start="{" data-end="}">
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a04a3a73f98fa5c9090b6cf6154e99e8d"> 13</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a2629cb8da72b6f922ed14cc7b6c43ce7">size</a> = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a422e15f018cd242dd62617f4213dace0"> 14</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a422e15f018cd242dd62617f4213dace0">scalar_t</a> = <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a>;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a04a3a73f98fa5c9090b6cf6154e99e8d">Simd&lt;float16_t, N&gt;</a>() {}</div>
</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> U&gt;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a>(U v) : <a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>(vdupq_n_f16(v)){};</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> Simd&lt;float16_t, N&gt;(float16x8_t v) : <a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>(v){};</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> Simd&lt;float16_t, N&gt;(<a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd.html#a5c24246e05e833fd81d900226a29e6ab">Simd&lt;float, N&gt;</a> other) {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">auto</span> f32x4_a = *(float32x4_t*)(&amp;other);</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">auto</span> f32x4_b = *((float32x4_t*)(&amp;other) + 1);</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a> = vcvt_high_f16_f32(vcvt_f16_f32(f32x4_a), f32x4_b);</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> };</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> Simd&lt;float16_t, N&gt;(<a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd.html#a5c24246e05e833fd81d900226a29e6ab">Simd&lt;uint16_t, N&gt;</a> other) {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a> = vcvtq_f16_u16(*(uint16x8_t*)(&amp;other.value));</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> };</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="foldopen" id="foldopen00033" data-start="{" data-end="}">
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a823af21442333505114fd3fdac9f24de"> 33</a></span> <span class="keyword">operator</span> <a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd.html#a5c24246e05e833fd81d900226a29e6ab">Simd&lt;int16_t, N&gt;</a>() {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">auto</span> v = vcvtq_s16_f16(<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">value</a>);</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">load&lt;int16_t, N&gt;</a>((int16_t*)&amp;v);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> };</div>
</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="foldopen" id="foldopen00038" data-start="{" data-end="}">
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a98affc184d83627d8654e3530ab52d75"> 38</a></span> <span class="keyword">operator</span> <a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd.html#a5c24246e05e833fd81d900226a29e6ab">Simd&lt;float, N&gt;</a>() {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> float32x4x2_t v;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> v.val[0] = vcvt_f32_f16(*(float16x4_t*)(&amp;<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">value</a>));</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> v.val[1] = vcvt_high_f32_f16(<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">value</a>);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">load&lt;float, N&gt;</a>((<span class="keywordtype">float</span>*)&amp;v);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div>
</div>
<div class="foldopen" id="foldopen00044" data-start="{" data-end="}">
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a4b24316469cd9ecc88f8c073ab1a862e"> 44</a></span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a> <a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a4b24316469cd9ecc88f8c073ab1a862e">operator[]</a>(<span class="keywordtype">int</span> idx)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a>*<span class="keyword">&gt;</span>(&amp;<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">value</a>)[idx];</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> }</div>
</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="foldopen" id="foldopen00048" data-start="{" data-end="}">
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a97043111a44318b5eb68977ecacbb638"> 48</a></span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a>&amp; <a class="code hl_function" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a97043111a44318b5eb68977ecacbb638">operator[]</a>(<span class="keywordtype">int</span> idx) {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a>*<span class="keyword">&gt;</span>(&amp;<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">value</a>)[idx];</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }</div>
</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094"> 52</a></span> float16x8_t <a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">value</a>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>};</div>
</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="foldopen" id="foldopen00055" data-start="" data-end="">
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00"> 55</a></span><span class="preprocessor">#define DEFINE_NEON_UNARY_OP(name, op) \</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="preprocessor"> inline Simd&lt;float16_t, N&gt; name(Simd&lt;float16_t, N&gt; a) { \</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="preprocessor"> return Simd&lt;float16_t, N&gt;{op(a.value)}; \</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="preprocessor"> }</span></div>
</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a7696a0628a1c6ccb293ebd6f2328ea48"> 60</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4f3cc8b2493586e83fd65640df3b60ad">abs</a>, vabsq_f16)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ae5714693df24c8e26384fe5b5888376d"> 61</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ae1d5460c58c507a0104d8dfa90343f12">ceil</a>, vrndpq_f16)</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ad6b89aecafefe57b6ce69bec143ccd6e"> 62</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a8e22c484298d9af10b6604c835e52052">floor</a>, vrndmq_f16)</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a7e80d3e33f2edd02310641d3e3dd5658"> 63</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ae39b8e1d1fff94947406eeb8ec6e0414">sqrt</a>, vsqrtq_f16)</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a3345cb53830d1afd625acc7bdc3a0435"> 64</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#aea75ddf8c696efc2e5e924667ed48e70">rsqrt</a>, vrsqrteq_f16)</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6235990c43aaf0e0c126c82d10f01b45"> 65</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ae344abefc91c7d9c0a9506c868a84d61">recip</a>, vrecpeq_f16)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a8c200919c0eeefb2e2e5d9d19741a805"> 66</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a400d89d040f43d471b306a8e8bdb3974">rint</a>, vrndnq_f16)</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </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="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5"> 68</a></span><span class="preprocessor">#define DEFINE_NEON_BINARY_OP(name, op) \</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="preprocessor"> inline Simd&lt;float16_t, N&gt; name(Simd&lt;float16_t, N&gt; a, Simd&lt;float16_t, N&gt; b) { \</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="preprocessor"> return op(a.value, b.value); \</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="preprocessor"> template &lt;typename T&gt; \</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="preprocessor"> Simd&lt;float16_t, N&gt; name(Simd&lt;float16_t, N&gt; a, T b) { \</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="preprocessor"> return op(a.value, Simd&lt;float16_t, N&gt;(b).value); \</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="preprocessor"> template &lt;typename T&gt; \</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="preprocessor"> Simd&lt;float16_t, N&gt; name(T a, Simd&lt;float16_t, N&gt; b) { \</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="preprocessor"> return op(Simd&lt;float16_t, N&gt;(a).value, b.value); \</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="preprocessor"> }</span></div>
</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="foldopen" id="foldopen00081" data-start="{" data-end="}">
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#aadb0ed44c238d8d643c056298d5b20ca"> 81</a></span><span class="keyword">inline</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a745e05627c77152ec13d8d90c19cc9bf">operator!</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> v) {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">auto</span> out = vceqzq_f16(v.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>(*(uint16_t*)&amp;out);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>}</div>
</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="foldopen" id="foldopen00086" data-start="{" data-end="}">
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a727a13b3d26f9e7cae7f091105867904"> 86</a></span><span class="keyword">inline</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#af5be79b8dada8f8e91ae7c03c16606ec">operator-</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> v) {</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span> vnegq_f16(v.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>}</div>
</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ae1f11d9c2c15ebecf001d11b3fca5da2"> 90</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">maximum</a>, vmaxq_f16)</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#abaa09259e92f0fe758dc979d54c327e8"> 91</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">minimum</a>, vminq_f16)</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ae690b57b386cbad40565487d6d2393bb"> 92</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a>(operator+, vaddq_f16)</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6e39cc693b30ad8e530392baf4bb5b0e"> 93</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a>(operator-, vsubq_f16)</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6f6d26e3fe39ee1ba0a7380d0ecf7b45"> 94</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a>(operator*, vmulq_f16)</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#aab8837750c84794369e630d8ea0b408c"> 95</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a>(operator/, vdivq_f16)</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="foldopen" id="foldopen00097" data-start="" data-end="">
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d"> 97</a></span><span class="preprocessor">#define DEFINE_NEON_COMPARISON(Op, op) \</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="preprocessor"> template &lt;typename T&gt; \</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="preprocessor"> Simd&lt;bool, N&gt; operator Op(Simd&lt;float16_t, N&gt; a, T b) { \</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="preprocessor"> auto out = op(a.value, Simd&lt;float16_t, N&gt;(b).value); \</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="preprocessor"> return Simd&lt;uint16_t, N&gt;(*(uint16_t*)(&amp;out)); \</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="preprocessor"> template &lt;typename T&gt; \</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="preprocessor"> Simd&lt;bool, N&gt; operator Op(T a, Simd&lt;float16_t, N&gt; b) { \</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="preprocessor"> auto out = op(Simd&lt;float16_t, N&gt;(a).value, b.value); \</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="preprocessor"> return Simd&lt;uint16_t, N&gt;(*(uint16_t*)(&amp;out)); \</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="preprocessor"> } \</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="preprocessor"> inline Simd&lt;bool, N&gt; operator Op( \</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="preprocessor"> Simd&lt;float16_t, N&gt; a, Simd&lt;float16_t, N&gt; b) { \</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor"> auto out = op(a.value, b.value); \</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="preprocessor"> return Simd&lt;uint16_t, N&gt;(*(uint16_t*)(&amp;out)); \</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="preprocessor"> }</span></div>
</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#acafae9e62680565cd1f1c50c64d7ce4f"> 114</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d">DEFINE_NEON_COMPARISON</a>(==, vceqq_f16)</div>
<div class="foldopen" id="foldopen00115" data-start="{" data-end="}">
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ad1570f6937d194a09e61d0e3a70ef578"> 115</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d">DEFINE_NEON_COMPARISON</a>(&gt;=, vcgeq_f16)</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><a class="code hl_define" href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d">DEFINE_NEON_COMPARISON</a>(&lt;=, vcleq_f16)</div>
</div>
<div class="foldopen" id="foldopen00117" data-start="{" data-end="}">
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a3f63139b42029ba8d7b3b8ef10f5ac96"> 117</a></span><a class="code hl_define" href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d">DEFINE_NEON_COMPARISON</a>(&gt;, vcgtq_f16)</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><a class="code hl_define" href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d">DEFINE_NEON_COMPARISON</a>(&lt;, vcltq_f16)</div>
</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>template &lt;typename T&gt;</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_1simd.html#a6cce6db46c391a5d06dcb262e21b81fc"> 121</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a>&lt;<span class="keywordtype">bool</span>, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>&gt; operator!=(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a>&lt;<a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a>, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>&gt; a, T b) {</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">return</span> !(a == b);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span>}</div>
</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</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_1simd.html#a3699410174385f5e597cfccad57fc736"> 125</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="namespacemlx_1_1core_1_1simd.html#a4971bfe7f9f9319f859b3040c18f39ca">operator!=</a>(T a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> b) {</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">return</span> !(a == b);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>}</div>
</div>
<div class="foldopen" id="foldopen00128" data-start="{" data-end="}">
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#abc6a26b6e28d3d532fc356f96c97df1d"> 128</a></span><span class="keyword">inline</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="namespacemlx_1_1core_1_1simd.html#a4971bfe7f9f9319f859b3040c18f39ca">operator!=</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> b) {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">return</span> !(a == b);</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</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_1simd.html#a38e83534a648d0743dc4c7deb9a7fd49"> 132</a></span><span class="keyword">inline</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ab380b8f73672727a38ea0931e731fe4a">operator||</a>(</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> a,</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> b) {</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>((a != 0) || (b != 0));</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span>}</div>
</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00138" data-start="{" data-end="}">
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#acdcdaea84869a0b05c08139c10f13a06"> 138</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ab380b8f73672727a38ea0931e731fe4a">operator||</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> a, T b) {</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>((a != 0) || (b != 0));</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span>}</div>
</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00142" data-start="{" data-end="}">
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#aa9ac1951153211b2ff95dd34a3427797"> 142</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ab380b8f73672727a38ea0931e731fe4a">operator||</a>(T a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> b) {</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>((a != 0) || (b != 0));</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
</div>
<div class="foldopen" id="foldopen00145" data-start="{" data-end="}">
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a2a381e5ec89406074b8d1921304238bb"> 145</a></span><span class="keyword">inline</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a85c23e7ed6fe0ec6dfe4c61f7412a362">operator&amp;&amp;</a>(</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> a,</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> b) {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>((a != 0) &amp;&amp; (b != 0));</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span>}</div>
</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00151" data-start="{" data-end="}">
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#af9d5f107ce0c40c3b6a2f176cbb70cd7"> 151</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a85c23e7ed6fe0ec6dfe4c61f7412a362">operator&amp;&amp;</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> a, T b) {</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>((a != 0) &amp;&amp; (b != 0));</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span>}</div>
</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00155" data-start="{" data-end="}">
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#af8f245dfc5154c04c0865a208ab1cfe9"> 155</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a85c23e7ed6fe0ec6dfe4c61f7412a362">operator&amp;&amp;</a>(T a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> b) {</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>((a != 0) &amp;&amp; (b != 0));</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span>}</div>
</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="keyword">template</span> &lt;&gt;</div>
<div class="foldopen" id="foldopen00160" data-start="{" data-end="}">
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a20ffdefe25beda96860a1dc9a6f4aa02"> 160</a></span><span class="keyword">inline</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="namespacemlx_1_1core_1_1simd.html#a05f4422a037c3bef343fb11f71363b65">isnan</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> v) {</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">return</span> v != v;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span>}</div>
</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span><span class="keyword">template</span> &lt;&gt;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="keyword">inline</span> Simd&lt;float16_t, N&gt;</div>
<div class="foldopen" id="foldopen00166" data-start="{" data-end="}">
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a146d2a834c936a381c1f86caffa822d7"> 166</a></span><a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ae4be4d88cd8eba7a8c1784fd53b86edb">clamp</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> v, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146">min</a>, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>) {</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">minimum</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">maximum</a>(v, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146">min</a>), <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>);</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span>}</div>
</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00171" data-start="{" data-end="}">
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a99099c338377518773b55d4042f9410d"> 171</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a9ddc7f119cc1dc04372ec1adcaf55f70">fma</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> y, T z) {</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">return</span> vfmaq_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a>(z).<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span>}</div>
</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> MaskT&gt;</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span>Simd&lt;float16_t, N&gt;</div>
<div class="foldopen" id="foldopen00177" data-start="{" data-end="}">
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a3b5ebb46e7beae839c97b2e7ed9c7426"> 177</a></span><a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;MaskT, N&gt;</a> mask, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> y) {</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keywordflow">return</span> vbslq_f16(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;uint16_t, N&gt;</a>(mask).value, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span>}</div>
</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="comment">// Reductions</span></div>
<div class="foldopen" id="foldopen00182" data-start="{" data-end="}">
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a995da0f1b4ca8077abbbc6f6a6dfd663"> 182</a></span><span class="keyword">inline</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> x) {</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> float16x4_t y;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> y = vpmax_f16(vget_low_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>), vget_high_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> y = vpmax_f16(y, y);</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> y = vpmax_f16(y, y);</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">return</span> vget_lane_f16(y, 0);</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span>}</div>
</div>
<div class="foldopen" id="foldopen00189" data-start="{" data-end="}">
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a160075943b92d541f2e7f7472eaa5167"> 189</a></span><span class="keyword">inline</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146">min</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> x) {</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> float16x4_t y;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> y = vpmin_f16(vget_low_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>), vget_high_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> y = vpmin_f16(y, y);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> y = vpmin_f16(y, y);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordflow">return</span> vget_lane_f16(y, 0);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>}</div>
</div>
<div class="foldopen" id="foldopen00196" data-start="{" data-end="}">
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab0e7c082fc6bed52d522765ef91d205d"> 196</a></span><span class="keyword">inline</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a53b547b886918dc13d4da88eeb8811d2">sum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> x) {</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> float16x4_t y;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> y = vpadd_f16(vget_low_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>), vget_high_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> y = vpadd_f16(y, y);</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> y = vpadd_f16(y, y);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">return</span> vget_lane_f16(y, 0);</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span>}</div>
</div>
<div class="foldopen" id="foldopen00203" data-start="{" data-end="}">
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a0a26dff48b078fb3e9fef688232183ed"> 203</a></span><span class="keyword">inline</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">float16_t</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a271cedfc48efc69db43813e8c424bf7c">prod</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd&lt;float16_t, N&gt;</a> x) {</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keyword">auto</span> hx = vmul_f16(vget_low_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>), vget_high_f16(x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keyword">auto</span> out = hx[0];</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> hx[0] *= hx[1];</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> hx[0] *= hx[2];</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> hx[0] *= hx[3];</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">return</span> hx[0];</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>}</div>
</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span>} <span class="comment">// namespace mlx::core::simd</span></div>
<div class="ttc" id="abase__simd_8h_html"><div class="ttname"><a href="base__simd_8h.html">base_simd.h</a></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>
<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:141</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a12b1553495a0c99d52472bd2a6626ddb"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">mlx::core::simd::N</a></div><div class="ttdeci">constexpr int N</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:9</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:210</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a271cedfc48efc69db43813e8c424bf7c"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a271cedfc48efc69db43813e8c424bf7c">mlx::core::simd::prod</a></div><div class="ttdeci">T prod(Simd&lt; T, N &gt; x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:292</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a400d89d040f43d471b306a8e8bdb3974"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a400d89d040f43d471b306a8e8bdb3974">mlx::core::simd::rint</a></div><div class="ttdeci">Simd&lt; T, N &gt; rint(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:127</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a4041676517d96870293e5448c7e2b5a4"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">mlx::core::simd::load</a></div><div class="ttdeci">Simd&lt; T, N &gt; load(const T *x)</div><div class="ttdef"><b>Definition</b> base_simd.h:27</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a4971bfe7f9f9319f859b3040c18f39ca"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4971bfe7f9f9319f859b3040c18f39ca">mlx::core::simd::operator!=</a></div><div class="ttdeci">Simd&lt; bool, N &gt; operator!=(Simd&lt; T, N &gt; a, U b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:196</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a4f3cc8b2493586e83fd65640df3b60ad"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4f3cc8b2493586e83fd65640df3b60ad">mlx::core::simd::abs</a></div><div class="ttdeci">Simd&lt; T, N &gt; abs(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:112</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a53b547b886918dc13d4da88eeb8811d2"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a53b547b886918dc13d4da88eeb8811d2">mlx::core::simd::sum</a></div><div class="ttdeci">T sum(Simd&lt; T, N &gt; x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:279</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a6fcea259041cecfd042d0c4e6afc4b8f"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">mlx::core::simd::max</a></div><div class="ttdeci">T max(Simd&lt; T, N &gt; x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:283</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a745e05627c77152ec13d8d90c19cc9bf"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a745e05627c77152ec13d8d90c19cc9bf">mlx::core::simd::operator!</a></div><div class="ttdeci">Simd&lt; bool, N &gt; operator!(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:147</div></div>
<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:204</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a85c23e7ed6fe0ec6dfe4c61f7412a362"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a85c23e7ed6fe0ec6dfe4c61f7412a362">mlx::core::simd::operator&amp;&amp;</a></div><div class="ttdeci">Simd&lt; T, N &gt; operator&amp;&amp;(Simd&lt; T, N &gt; x, U y)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:174</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a8e22c484298d9af10b6604c835e52052"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a8e22c484298d9af10b6604c835e52052">mlx::core::simd::floor</a></div><div class="ttdeci">Simd&lt; T, N &gt; floor(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:113</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a9ddc7f119cc1dc04372ec1adcaf55f70"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a9ddc7f119cc1dc04372ec1adcaf55f70">mlx::core::simd::fma</a></div><div class="ttdeci">Simd&lt; T, N &gt; fma(Simd&lt; T, N &gt; x, Simd&lt; T, N &gt; y, U z)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:264</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ab380b8f73672727a38ea0931e731fe4a"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ab380b8f73672727a38ea0931e731fe4a">mlx::core::simd::operator||</a></div><div class="ttdeci">Simd&lt; T, N &gt; operator||(Simd&lt; T, N &gt; x, U y)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:175</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_acd4196d0c66204cfae70b064c305e146"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146">mlx::core::simd::min</a></div><div class="ttdeci">T min(Simd&lt; T, N &gt; x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:287</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ae1d5460c58c507a0104d8dfa90343f12"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ae1d5460c58c507a0104d8dfa90343f12">mlx::core::simd::ceil</a></div><div class="ttdeci">Simd&lt; T, N &gt; ceil(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:120</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ae344abefc91c7d9c0a9506c868a84d61"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ae344abefc91c7d9c0a9506c868a84d61">mlx::core::simd::recip</a></div><div class="ttdeci">Simd&lt; T, N &gt; recip(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:131</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ae39b8e1d1fff94947406eeb8ec6e0414"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ae39b8e1d1fff94947406eeb8ec6e0414">mlx::core::simd::sqrt</a></div><div class="ttdeci">Simd&lt; T, N &gt; sqrt(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:129</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ae4be4d88cd8eba7a8c1784fd53b86edb"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ae4be4d88cd8eba7a8c1784fd53b86edb">mlx::core::simd::clamp</a></div><div class="ttdeci">Simd&lt; T, N &gt; clamp(Simd&lt; T, N &gt; v, Simd&lt; T, N &gt; min, Simd&lt; T, N &gt; max)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:259</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_aea75ddf8c696efc2e5e924667ed48e70"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#aea75ddf8c696efc2e5e924667ed48e70">mlx::core::simd::rsqrt</a></div><div class="ttdeci">Simd&lt; T, N &gt; rsqrt(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:130</div></div>
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_af5be79b8dada8f8e91ae7c03c16606ec"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#af5be79b8dada8f8e91ae7c03c16606ec">mlx::core::simd::operator-</a></div><div class="ttdeci">Simd&lt; T, N &gt; operator-(Simd&lt; T, N &gt; v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:136</div></div>
<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:231</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_afbd2769c30e721afc85a7b9fb55b8e52"><div class="ttname"><a href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52">mlx::core::float16_t</a></div><div class="ttdeci">struct _MLX_Float16 float16_t</div><div class="ttdef"><b>Definition</b> half_types.h:17</div></div>
<div class="ttc" id="aneon__fp16__simd_8h_html_a63ba6e115ef14e134081310f7d4579a5"><div class="ttname"><a href="neon__fp16__simd_8h.html#a63ba6e115ef14e134081310f7d4579a5">DEFINE_NEON_BINARY_OP</a></div><div class="ttdeci">#define DEFINE_NEON_BINARY_OP(name, op)</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:68</div></div>
<div class="ttc" id="aneon__fp16__simd_8h_html_a9fcd94c7369a6b4437f9c310a805c79d"><div class="ttname"><a href="neon__fp16__simd_8h.html#a9fcd94c7369a6b4437f9c310a805c79d">DEFINE_NEON_COMPARISON</a></div><div class="ttdeci">#define DEFINE_NEON_COMPARISON(Op, op)</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:97</div></div>
<div class="ttc" id="aneon__fp16__simd_8h_html_af8138a463be93b9e0c9b685e94a1fd00"><div class="ttname"><a href="neon__fp16__simd_8h.html#af8138a463be93b9e0c9b685e94a1fd00">DEFINE_NEON_UNARY_OP</a></div><div class="ttdeci">#define DEFINE_NEON_UNARY_OP(name, op)</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:55</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4_html_a04a3a73f98fa5c9090b6cf6154e99e8d"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a04a3a73f98fa5c9090b6cf6154e99e8d">mlx::core::simd::Simd&lt; float16_t, N &gt;::Simd</a></div><div class="ttdeci">Simd()</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:16</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4_html_a2629cb8da72b6f922ed14cc7b6c43ce7"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a2629cb8da72b6f922ed14cc7b6c43ce7">mlx::core::simd::Simd&lt; float16_t, N &gt;::size</a></div><div class="ttdeci">static constexpr int size</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:13</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4_html_a422e15f018cd242dd62617f4213dace0"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a422e15f018cd242dd62617f4213dace0">mlx::core::simd::Simd&lt; float16_t, N &gt;::scalar_t</a></div><div class="ttdeci">float16_t scalar_t</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:14</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4_html_a4b24316469cd9ecc88f8c073ab1a862e"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a4b24316469cd9ecc88f8c073ab1a862e">mlx::core::simd::Simd&lt; float16_t, N &gt;::operator[]</a></div><div class="ttdeci">float16_t operator[](int idx) const</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:44</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4_html_a97043111a44318b5eb68977ecacbb638"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#a97043111a44318b5eb68977ecacbb638">mlx::core::simd::Simd&lt; float16_t, N &gt;::operator[]</a></div><div class="ttdeci">float16_t &amp; operator[](int idx)</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:48</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4_html_aa6042509bb67de25bedbee1ee1d66094"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html#aa6042509bb67de25bedbee1ee1d66094">mlx::core::simd::Simd&lt; float16_t, N &gt;::value</a></div><div class="ttdeci">float16x8_t value</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:52</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 class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_html_a36e2b7db5ce6eb4dd456e99a4cd2c2cf"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">mlx::core::simd::Simd::value</a></div><div class="ttdeci">asd::Vector&lt; scalar_t, N &gt;::packed_t value</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:80</div></div>
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_html_a5c24246e05e833fd81d900226a29e6ab"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd.html#a5c24246e05e833fd81d900226a29e6ab">mlx::core::simd::Simd::Simd</a></div><div class="ttdeci">Simd()</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:59</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="dir_777905fddc177f731a39846ae16b0314.html">simd</a></li><li class="navelem"><a class="el" href="neon__fp16__simd_8h.html">neon_fp16_simd.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>