mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-19 10:48:09 +08:00
rebase
This commit is contained in:
384
docs/build/html/accelerate__simd_8h_source.html
vendored
384
docs/build/html/accelerate__simd_8h_source.html
vendored
@@ -268,257 +268,265 @@ $(function(){initNavTree('accelerate__simd_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00141" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a05f4422a037c3bef343fb11f71363b65"> 141</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<bool, N></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<T, N></a> v) {</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> asd::convert<char>(v.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a> != 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="l00141" name="l00141"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a290787dda17296d27af7afdef3c732a9"> 141</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a290787dda17296d27af7afdef3c732a9">operator~</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> v) {</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> ~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="l00143" name="l00143"></a><span class="lineno"> 143</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="comment">// No simd_boolN in accelerate, use int8_t instead</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00147" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a745e05627c77152ec13d8d90c19cc9bf"> 147</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<bool, N></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<T, N></a> v) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">return</span> asd::convert<char>(!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="l00149" name="l00149"></a><span class="lineno"> 149</span>}</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00146" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a05f4422a037c3bef343fb11f71363b65"> 146</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<bool, N></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<T, N></a> v) {</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">return</span> asd::convert<char>(v.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a> != 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="l00148" name="l00148"></a><span class="lineno"> 148</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </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="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82"> 151</a></span><span class="preprocessor">#define SIMD_DEFAULT_BINARY(OP) \</span></div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="preprocessor"> template <typename T, typename U, int N> \</span></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span><span class="preprocessor"> Simd<T, N> operator OP(Simd<T, N> x, U y) { \</span></div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span><span class="preprocessor"> return asd::convert<typename Simd<T, N>::scalar_t>(x.value OP y); \</span></div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="preprocessor"> template <typename T1, typename T2, int N> \</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="preprocessor"> Simd<T2, N> operator OP(T1 x, Simd<T2, N> y) { \</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="preprocessor"> return asd::convert<typename Simd<T2, N>::scalar_t>(x OP y.value); \</span></div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="preprocessor"> template <typename T1, typename T2, int N> \</span></div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="preprocessor"> Simd<T1, N> operator OP(Simd<T1, N> x, Simd<T2, N> y) { \</span></div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="preprocessor"> return asd::convert<typename Simd<T1, N>::scalar_t>(x.value OP y.value); \</span></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="preprocessor"> }</span></div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> </div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="comment">// No simd_boolN in accelerate, use int8_t instead</span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00152" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a745e05627c77152ec13d8d90c19cc9bf"> 152</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<bool, N></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<T, N></a> v) {</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">return</span> asd::convert<char>(!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="l00154" name="l00154"></a><span class="lineno"> 154</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#aac6acd134f1498b4fb45fdbc882335bf"> 165</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(+)</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ad5761065b4a655cd086d88846ae08d97"> 166</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(-)</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ac86a54a5e2ccc79bc92739f143bc0bef"> 167</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(/)</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a08c1e7a00b1b4bc60e30d1554f4f46f2"> 168</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(*)</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(<<)</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6e45c9c2f0591d9d5dd37a07ebcc3c2a"> 170</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(>>)</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab2b540d7329491000e7722f9b3ef797d"> 171</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(|)</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a25b3de1947dbab7c4864b41ec226453b"> 172</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(^)</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a0727c897502944659b3e32b3cde9ee9b"> 173</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(&)</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a85c23e7ed6fe0ec6dfe4c61f7412a362"> 174</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(&&)</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab380b8f73672727a38ea0931e731fe4a"> 175</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(||)</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </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="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459"> 177</a></span><span class="preprocessor">#define SIMD_DEFAULT_COMPARISONS(OP) \</span></div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="preprocessor"> template <int N, typename T, typename U> \</span></div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span><span class="preprocessor"> Simd<bool, N> operator OP(Simd<T, N> a, U b) { \</span></div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="preprocessor"> return asd::convert<char>(a.value OP b); \</span></div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><span class="preprocessor"> template <int N, typename T, typename U> \</span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="preprocessor"> Simd<bool, N> operator OP(T a, Simd<U, N> b) { \</span></div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><span class="preprocessor"> return asd::convert<char>(a OP b.value); \</span></div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span><span class="preprocessor"> template <int N, typename T1, typename T2> \</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="preprocessor"> Simd<bool, N> operator OP(Simd<T1, N> a, Simd<T2, N> b) { \</span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span><span class="preprocessor"> return asd::convert<char>(a.value OP b.value); \</span></div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="preprocessor"> }</span></div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
|
||||
<div class="foldopen" id="foldopen00156" data-start="" data-end="">
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82"> 156</a></span><span class="preprocessor">#define SIMD_DEFAULT_BINARY(OP) \</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="preprocessor"> template <typename T, typename U, int N> \</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="preprocessor"> Simd<T, N> operator OP(Simd<T, N> x, U y) { \</span></div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="preprocessor"> return asd::convert<typename Simd<T, N>::scalar_t>(x.value OP y); \</span></div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="preprocessor"> template <typename T1, typename T2, int N> \</span></div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="preprocessor"> Simd<T2, N> operator OP(T1 x, Simd<T2, N> y) { \</span></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="preprocessor"> return asd::convert<typename Simd<T2, N>::scalar_t>(x OP y.value); \</span></div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="preprocessor"> template <typename T1, typename T2, int N> \</span></div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="preprocessor"> Simd<T1, N> operator OP(Simd<T1, N> x, Simd<T2, N> y) { \</span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span><span class="preprocessor"> return asd::convert<typename Simd<T1, N>::scalar_t>(x.value OP y.value); \</span></div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span><span class="preprocessor"> }</span></div>
|
||||
</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
|
||||
<div class="foldopen" id="foldopen00191" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6cd6e41660608d17ca8d38658d5e385c"> 191</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(>)</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(<)</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"><a class="line" href="namespacemlx_1_1core_1_1simd.html#aac6acd134f1498b4fb45fdbc882335bf"> 170</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(+)</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ad5761065b4a655cd086d88846ae08d97"> 171</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(-)</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ac86a54a5e2ccc79bc92739f143bc0bef"> 172</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(/)</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a08c1e7a00b1b4bc60e30d1554f4f46f2"> 173</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(*)</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(<<)</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6e45c9c2f0591d9d5dd37a07ebcc3c2a"> 175</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(>>)</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab2b540d7329491000e7722f9b3ef797d"> 176</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(|)</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a25b3de1947dbab7c4864b41ec226453b"> 177</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(^)</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a0727c897502944659b3e32b3cde9ee9b"> 178</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(&)</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a85c23e7ed6fe0ec6dfe4c61f7412a362"> 179</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(&&)</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab380b8f73672727a38ea0931e731fe4a"> 180</a></span><a class="code hl_define" href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a>(||)</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</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="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459"> 182</a></span><span class="preprocessor">#define SIMD_DEFAULT_COMPARISONS(OP) \</span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="preprocessor"> template <int N, typename T, typename U> \</span></div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><span class="preprocessor"> Simd<bool, N> operator OP(Simd<T, N> a, U b) { \</span></div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="preprocessor"> return asd::convert<char>(a.value OP b); \</span></div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="preprocessor"> template <int N, typename T, typename U> \</span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span><span class="preprocessor"> Simd<bool, N> operator OP(T a, Simd<U, N> b) { \</span></div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="preprocessor"> return asd::convert<char>(a OP b.value); \</span></div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span><span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span><span class="preprocessor"> template <int N, typename T1, typename T2> \</span></div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><span class="preprocessor"> Simd<bool, N> operator OP(Simd<T1, N> a, Simd<T2, N> b) { \</span></div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span><span class="preprocessor"> return asd::convert<char>(a.value OP b.value); \</span></div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="preprocessor"> }</span></div>
|
||||
</div>
|
||||
<div class="foldopen" id="foldopen00193" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a4d5e4c31af23d2871e09b88c1f6e418c"> 193</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(>=)</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(<=)</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </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#a6cd6e41660608d17ca8d38658d5e385c"> 196</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(>)</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(<)</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a273fcc5387c1c9878e658ba6bc32f00c"> 195</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(==)</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a4971bfe7f9f9319f859b3040c18f39ca"> 196</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(!=)</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>template <typename T, <span class="keywordtype">int</span> <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>></div>
|
||||
<div class="foldopen" id="foldopen00199" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ac6104b5667e0eb379528bf7e2de23bee"> 199</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a23dba4ee3f0811b41c381733a6e6ff16">atan2</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>> b) {</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordflow">return</span> asd::atan2(a.value, b.value);</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span>}</div>
|
||||
<div class="foldopen" id="foldopen00198" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a4d5e4c31af23d2871e09b88c1f6e418c"> 198</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(>=)</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(<=)</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a273fcc5387c1c9878e658ba6bc32f00c"> 200</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(==)</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a4971bfe7f9f9319f859b3040c18f39ca"> 201</a></span><a class="code hl_define" href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a>(!=)</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> </div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span>template <typename T, <span class="keywordtype">int</span> <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>></div>
|
||||
<div class="foldopen" id="foldopen00204" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16"> 204</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">maximum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> b) {</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="comment">// TODO add isnan</span></div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keywordflow">return</span> asd::max(a.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, b.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span>}</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ac6104b5667e0eb379528bf7e2de23bee"> 204</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a23dba4ee3f0811b41c381733a6e6ff16">atan2</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>> b) {</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">return</span> asd::atan2(a.value, b.value);</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00210" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4"> 210</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">minimum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> b) {</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="comment">// TODO add isnan</span></div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">return</span> asd::min(a.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, b.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>}</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00209" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16"> 209</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a7f7a298284e71ddbd2ba0bb6d98b0d16">maximum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> b) {</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="comment">// TODO add isnan</span></div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">return</span> asd::max(a.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, b.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00216" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab020d2c434fad0cdf79fd37b0f6c1676"> 216</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ac66bdf1a8e86a4d350c85037bc764da5">remainder</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> b) {</div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> r;</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (!std::is_integral_v<T>) {</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> r = asd::remainder(a.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, b.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> r = a - b * (a / b);</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> }</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (std::is_signed_v<T>) {</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keyword">auto</span> mask = r != 0 && (r < 0 != b < 0);</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> r = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(mask, r + b, r);</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> }</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="keywordflow">return</span> r;</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span>}</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00215" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4"> 215</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a1996e77a8c3c24b1ba706113ed9028c4">minimum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> b) {</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="comment">// TODO add isnan</span></div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordflow">return</span> asd::min(a.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, b.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> </div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span><span class="keyword">template</span> <<span class="keyword">typename</span> MaskT, <span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00231" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef"> 231</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T1, N></a> <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<MaskT, N></a> mask, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T1, N></a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T2, N></a> y) {</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<span class="keyword">sizeof</span>(T1) == 1) {</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<char>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<span class="keyword">sizeof</span>(T1) == 2) {</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<short>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<span class="keyword">sizeof</span>(T1) == 4) {</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<int>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<long>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> }</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span>}</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> </div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00221" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab020d2c434fad0cdf79fd37b0f6c1676"> 221</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#ac66bdf1a8e86a4d350c85037bc764da5">remainder</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> a, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> b) {</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> r;</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (!std::is_integral_v<T>) {</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> r = asd::remainder(a.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, b.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>);</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> r = a - b * (a / b);</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> }</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (std::is_signed_v<T>) {</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keyword">auto</span> mask = r != 0 && (r < 0 != b < 0);</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> r = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(mask, r + b, r);</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> }</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">return</span> r;</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> </div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00244" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab18b3a88a2439fd026b6551b38d1f14a"> 244</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a19d535de1fc179cc39ec9643c9863cbc">pow</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> base, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>) {</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (!std::is_integral_v<T>) {</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keywordflow">return</span> asd::pow(base.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>.value);</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> res = 1;</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordflow">while</span> (<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e">any</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>)) {</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> res = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a> & 1, res * base, res);</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> base = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>, base * base, base);</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a> = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a> >> 1;</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> }</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> }</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span>}</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> </div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span><span class="keyword">template</span> <<span class="keyword">typename</span> MaskT, <span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00236" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef"> 236</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T1, N></a> <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<MaskT, N></a> mask, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T1, N></a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T2, N></a> y) {</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<span class="keyword">sizeof</span>(T1) == 1) {</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<char>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<span class="keyword">sizeof</span>(T1) == 2) {</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<short>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<span class="keyword">sizeof</span>(T1) == 4) {</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<int>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keywordflow">return</span> asd::bitselect(y.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, x.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, asd::convert<long>(mask.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>));</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> }</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00259" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ae4be4d88cd8eba7a8c1784fd53b86edb"> 259</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <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<T, N></a> v, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></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<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>) {</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <span class="keywordflow">return</span> asd::clamp(v.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146">min</a>.value, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>.value);</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> </div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00249" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ab18b3a88a2439fd026b6551b38d1f14a"> 249</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a19d535de1fc179cc39ec9643c9863cbc">pow</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> base, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>) {</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (!std::is_integral_v<T>) {</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="keywordflow">return</span> asd::pow(base.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>.value);</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> res = 1;</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <span class="keywordflow">while</span> (<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e">any</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>)) {</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> res = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a> & 1, res * base, res);</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> base = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afb3bcbd8d8b34128cd0c8eb677a170ef">select</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a>, base * base, base);</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a> = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a835d71dd0bb2f9494a397d9939696ec2">exp</a> >> 1;</div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> }</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> }</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> </div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keywordtype">int</span> N></div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00264" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a9ddc7f119cc1dc04372ec1adcaf55f70"> 264</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></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<T, N></a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> y, U z) {</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <span class="keywordflow">return</span> asd::muladd(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<T, N></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="l00264" name="l00264"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#ae4be4d88cd8eba7a8c1784fd53b86edb"> 264</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> <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<T, N></a> v, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></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<T, N></a> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>) {</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <span class="keywordflow">return</span> asd::clamp(v.<a class="code hl_variable" href="structmlx_1_1core_1_1simd_1_1_simd.html#a36e2b7db5ce6eb4dd456e99a4cd2c2cf">value</a>, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146">min</a>.value, <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f">max</a>.value);</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> </div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span><span class="comment">// Reductions</span></div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> </div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00271" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a5109118acb6766855878b9e8a56b156a"> 271</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a5109118acb6766855878b9e8a56b156a">all</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">return</span> asd::all(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="l00273" name="l00273"></a><span class="lineno"> 273</span>}</div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00269" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a9ddc7f119cc1dc04372ec1adcaf55f70"> 269</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></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<T, N></a> x, <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> y, U z) {</div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordflow">return</span> asd::muladd(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<T, N></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="l00271" name="l00271"></a><span class="lineno"> 271</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00275" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e"> 275</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e">any</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="keywordflow">return</span> asd::any(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="l00277" name="l00277"></a><span class="lineno"> 277</span>}</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> </div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span><span class="comment">// Reductions</span></div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> </div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00276" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a5109118acb6766855878b9e8a56b156a"> 276</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a5109118acb6766855878b9e8a56b156a">all</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordflow">return</span> asd::all(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="l00278" name="l00278"></a><span class="lineno"> 278</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00279" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a53b547b886918dc13d4da88eeb8811d2"> 279</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="keywordflow">return</span> asd::reduce_add(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="l00281" name="l00281"></a><span class="lineno"> 281</span>}</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00280" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e"> 280</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e">any</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">Simd<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <span class="keywordflow">return</span> asd::any(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="l00282" name="l00282"></a><span class="lineno"> 282</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00283" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f"> 283</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="keywordflow">return</span> asd::reduce_max(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="l00285" name="l00285"></a><span class="lineno"> 285</span>}</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00284" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a53b547b886918dc13d4da88eeb8811d2"> 284</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="keywordflow">return</span> asd::reduce_add(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="l00286" name="l00286"></a><span class="lineno"> 286</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00287" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146"> 287</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordflow">return</span> asd::reduce_min(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="l00289" name="l00289"></a><span class="lineno"> 289</span>}</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00288" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a6fcea259041cecfd042d0c4e6afc4b8f"> 288</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="keywordflow">return</span> asd::reduce_max(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="l00290" name="l00290"></a><span class="lineno"> 290</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> </div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00292" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a271cedfc48efc69db43813e8c424bf7c"> 292</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="keyword">auto</span> ptr = (T*)&x;</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="keyword">auto</span> lhs = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">load</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> / 2>(ptr);</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="keyword">auto</span> rhs = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">load</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> / 2>(ptr + <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> / 2);</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a271cedfc48efc69db43813e8c424bf7c">prod</a>(lhs * rhs);</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span>}</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#acd4196d0c66204cfae70b064c305e146"> 292</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="keywordflow">return</span> asd::reduce_min(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="l00294" name="l00294"></a><span class="lineno"> 294</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> </div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span>} <span class="comment">// namespace mlx::core::simd</span></div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> </div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span><span class="preprocessor">#if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC</span></div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span><span class="preprocessor">#include "<a class="code" href="accelerate__fp16__simd_8h.html">mlx/backend/cpu/simd/accelerate_fp16_simd.h</a>"</span></div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> </div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">int</span> N></div>
|
||||
<div class="foldopen" id="foldopen00297" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1simd.html#a271cedfc48efc69db43813e8c424bf7c"> 297</a></span>T <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<T, N></a> x) {</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="keyword">auto</span> ptr = (T*)&x;</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="keyword">auto</span> lhs = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">load</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> / 2>(ptr);</div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <span class="keyword">auto</span> rhs = <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">load</a><T, <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> / 2>(ptr + <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a> / 2);</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a271cedfc48efc69db43813e8c424bf7c">prod</a>(lhs * rhs);</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> </div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span>} <span class="comment">// namespace mlx::core::simd</span></div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> </div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span><span class="preprocessor">#if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC</span></div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span><span class="preprocessor">#include "<a class="code" href="accelerate__fp16__simd_8h.html">mlx/backend/cpu/simd/accelerate_fp16_simd.h</a>"</span></div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="aaccelerate__fp16__simd_8h_html"><div class="ttname"><a href="accelerate__fp16__simd_8h.html">accelerate_fp16_simd.h</a></div></div>
|
||||
<div class="ttc" id="aaccelerate__simd_8h_html_a3b449b9ce2c623ab4dce3f6fe349bb6d"><div class="ttname"><a href="accelerate__simd_8h.html#a3b449b9ce2c623ab4dce3f6fe349bb6d">SIMD_DEFAULT_UNARY</a></div><div class="ttdeci">#define SIMD_DEFAULT_UNARY(name, op)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:106</div></div>
|
||||
<div class="ttc" id="aaccelerate__simd_8h_html_a9aa795d90ddc485f24cd4a5268fe0e82"><div class="ttname"><a href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a></div><div class="ttdeci">#define SIMD_DEFAULT_BINARY(OP)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:151</div></div>
|
||||
<div class="ttc" id="aaccelerate__simd_8h_html_aca22aa431d399cea13c969926689b459"><div class="ttname"><a href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a></div><div class="ttdeci">#define SIMD_DEFAULT_COMPARISONS(OP)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:177</div></div>
|
||||
<div class="ttc" id="aaccelerate__simd_8h_html_a9aa795d90ddc485f24cd4a5268fe0e82"><div class="ttname"><a href="accelerate__simd_8h.html#a9aa795d90ddc485f24cd4a5268fe0e82">SIMD_DEFAULT_BINARY</a></div><div class="ttdeci">#define SIMD_DEFAULT_BINARY(OP)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:156</div></div>
|
||||
<div class="ttc" id="aaccelerate__simd_8h_html_aca22aa431d399cea13c969926689b459"><div class="ttname"><a href="accelerate__simd_8h.html#aca22aa431d399cea13c969926689b459">SIMD_DEFAULT_COMPARISONS</a></div><div class="ttdeci">#define SIMD_DEFAULT_COMPARISONS(OP)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:182</div></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="amath_8h_html"><div class="ttname"><a href="math_8h.html">math.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< bool, N > isnan(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:141</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< bool, N > isnan(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:146</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a09a2f3f2bc999c16babf3d8d90994d6e"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a09a2f3f2bc999c16babf3d8d90994d6e">mlx::core::simd::sinh</a></div><div class="ttdeci">Simd< float16_t, N > sinh(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:41</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_a18d330fd2c7360b2890a722232ba35b7"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a18d330fd2c7360b2890a722232ba35b7">mlx::core::simd::atanh</a></div><div class="ttdeci">Simd< float16_t, N > atanh(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:34</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< T, N > minimum(Simd< T, N > a, Simd< T, N > b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:210</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< T, N > minimum(Simd< T, N > a, Simd< T, N > b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:215</div></div>
|
||||
<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< float16_t, N > pow(Simd< float16_t, N > x, Simd< float16_t, N > 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< float16_t, N > atan2(Simd< float16_t, N > x, Simd< float16_t, N > 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_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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:292</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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:297</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a290787dda17296d27af7afdef3c732a9"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a290787dda17296d27af7afdef3c732a9">mlx::core::simd::operator~</a></div><div class="ttdeci">Simd< T, N > operator~(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:141</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a3cb6ea94836e999c07329b34c501ed85"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a3cb6ea94836e999c07329b34c501ed85">mlx::core::simd::log10</a></div><div class="ttdeci">Simd< float16_t, N > log10(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:39</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< T, N > rint(Simd< T, N > 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< T, N > 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_a4041676517d96870293e5448c7e2b5a4"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">mlx::core::simd::load</a></div><div class="ttdeci">Simd< T, N > load(const T *x)</div><div class="ttdef"><b>Definition</b> base_simd.h:28</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a445ddc4ed928656df64d889942588cfd"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a445ddc4ed928656df64d889942588cfd">mlx::core::simd::tan</a></div><div class="ttdeci">Simd< float16_t, N > tan(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:42</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< T, N > abs(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:112</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a4f8a64e7742fcd8f759f723a36a7c826"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4f8a64e7742fcd8f759f723a36a7c826">mlx::core::simd::acosh</a></div><div class="ttdeci">Simd< float16_t, N > acosh(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:30</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a5109118acb6766855878b9e8a56b156a"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a5109118acb6766855878b9e8a56b156a">mlx::core::simd::all</a></div><div class="ttdeci">bool all(Simd< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:271</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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:279</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a5109118acb6766855878b9e8a56b156a"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a5109118acb6766855878b9e8a56b156a">mlx::core::simd::all</a></div><div class="ttdeci">bool all(Simd< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:276</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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:284</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a66426c28a4324b9f617b7018d9354ea1"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a66426c28a4324b9f617b7018d9354ea1">mlx::core::simd::log2</a></div><div class="ttdeci">Simd< float16_t, N > log2(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:38</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< T, N > 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< bool, N > operator!(Simd< T, N > 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< T, N > maximum(Simd< T, N > a, Simd< T, N > b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:204</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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:288</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< bool, N > operator!(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:152</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< T, N > maximum(Simd< T, N > a, Simd< T, N > b)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:209</div></div>
|
||||
<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< T, N > exp(Simd< T, N > 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_a8cec82f4fb15bfd31d7554c6c09ceed4"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a8cec82f4fb15bfd31d7554c6c09ceed4">mlx::core::simd::log</a></div><div class="ttdeci">Simd< float16_t, N > log(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:37</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< T, N > floor(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:113</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a9407980793ecff5d5eb19c9a2cbda1eb"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a9407980793ecff5d5eb19c9a2cbda1eb">mlx::core::simd::expm1</a></div><div class="ttdeci">Simd< float16_t, N > expm1(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:36</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a9c7723fc49137394fa817136a7ffb50f"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a9c7723fc49137394fa817136a7ffb50f">mlx::core::simd::asin</a></div><div class="ttdeci">Simd< float16_t, N > asin(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:31</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a9d968537ad5ef18630f5afce8453b30e"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e">mlx::core::simd::any</a></div><div class="ttdeci">bool any(Simd< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:275</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< T, N > fma(Simd< T, N > x, Simd< T, N > 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_a9d968537ad5ef18630f5afce8453b30e"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a9d968537ad5ef18630f5afce8453b30e">mlx::core::simd::any</a></div><div class="ttdeci">bool any(Simd< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:280</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< T, N > fma(Simd< T, N > x, Simd< T, N > y, U z)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:269</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_aa244fbe7456b653aa50a473108fd6a2b"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#aa244fbe7456b653aa50a473108fd6a2b">mlx::core::simd::tanh</a></div><div class="ttdeci">Simd< float16_t, N > tanh(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:43</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_aa7550a1210e50c996d0db84034b8a22e"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#aa7550a1210e50c996d0db84034b8a22e">mlx::core::simd::atan</a></div><div class="ttdeci">Simd< float16_t, N > atan(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:33</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_aaa76bdf1db09261d84da51d394837f5d"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#aaa76bdf1db09261d84da51d394837f5d">mlx::core::simd::asinh</a></div><div class="ttdeci">Simd< float16_t, N > asinh(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:32</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< float16_t, N > remainder(Simd< float16_t, N > x, Simd< float16_t, N > 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_ac91bd36c7caafd3c7ff176e7e2f81887"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">mlx::core::simd::max_size</a></div><div class="ttdeci">static constexpr int max_size</div><div class="ttdef"><b>Definition</b> base_simd.h:13</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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:287</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ac91bd36c7caafd3c7ff176e7e2f81887"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">mlx::core::simd::max_size</a></div><div class="ttdeci">static constexpr int max_size</div><div class="ttdef"><b>Definition</b> base_simd.h:14</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< T, N > x)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:292</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< float16_t, N > log1p(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:40</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< T, N > ceil(Simd< T, N > 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< T, N > recip(Simd< T, N > 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< T, N > sqrt(Simd< T, N > 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< T, N > clamp(Simd< T, N > v, Simd< T, N > min, Simd< T, N > max)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:259</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< T, N > clamp(Simd< T, N > v, Simd< T, N > min, Simd< T, N > max)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:264</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ae623449dfa7aab3031aa2f14c1b10a2d"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ae623449dfa7aab3031aa2f14c1b10a2d">mlx::core::simd::acos</a></div><div class="ttdeci">Simd< float16_t, N > acos(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:29</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< T, N > rsqrt(Simd< T, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:130</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_aedc18b6fdb820cce9125c977c02833aa"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#aedc18b6fdb820cce9125c977c02833aa">mlx::core::simd::cosh</a></div><div class="ttdeci">Simd< float16_t, N > cosh(Simd< float16_t, N > v)</div><div class="ttdef"><b>Definition</b> accelerate_fp16_simd.h:35</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< T1, N > select(Simd< MaskT, N > mask, Simd< T1, N > x, Simd< T2, N > y)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:231</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< T1, N > select(Simd< MaskT, N > mask, Simd< T1, N > x, Simd< T2, N > y)</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:236</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_scalar_t_3_01bool_00_01_n_01_4_html_a3d47d5ad1ff8981bd9876a5fc1870174"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01bool_00_01_n_01_4.html#a3d47d5ad1ff8981bd9876a5fc1870174">mlx::core::simd::ScalarT< bool, N >::v</a></div><div class="ttdeci">char v</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:39</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_scalar_t_3_01int64__t_00_01_n_01_4_html_aa36db163e4909aea98b7129764184801"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01int64__t_00_01_n_01_4.html#aa36db163e4909aea98b7129764184801">mlx::core::simd::ScalarT< int64_t, N >::v</a></div><div class="ttdeci">long v</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:51</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_scalar_t_3_01int8__t_00_01_n_01_4_html_af2775b07509324182bd715aac65b7eb0"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01int8__t_00_01_n_01_4.html#af2775b07509324182bd715aac65b7eb0">mlx::core::simd::ScalarT< int8_t, N >::v</a></div><div class="ttdeci">char v</div><div class="ttdef"><b>Definition</b> accelerate_simd.h:43</div></div>
|
||||
|
Reference in New Issue
Block a user