mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-20 12:08:14 +08:00
rebase
This commit is contained in:
@@ -176,17 +176,17 @@ $(function(){ initResizable(false); });
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op, <span class="keyword">typename</span> IdxT = <span class="keywordtype">size_t</span>></div>
|
||||
<div class="foldopen" id="foldopen00073" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="metal_2kernels_2binary_8h.html#a6808bfb006cb5473da087a2758d0d867"> 73</a></span>[[kernel]] <span class="keywordtype">void</span> <a class="code hl_function" href="metal_2kernels_2binary_8h.html#a6808bfb006cb5473da087a2758d0d867">binary_g_nd1</a>(</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="metal_2kernels_2binary_8h.html#a3d0bb75c43854274b6040c52914e5c12"> 73</a></span>[[kernel]] <span class="keywordtype">void</span> <a class="code hl_function" href="metal_2kernels_2binary_8h.html#a3d0bb75c43854274b6040c52914e5c12">binary_g_nd1</a>(</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> device <span class="keyword">const</span> T* a,</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> device <span class="keyword">const</span> T* b,</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> device U* c,</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> constant <span class="keyword">const</span> <span class="keywordtype">size_t</span>& a_stride,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> constant <span class="keyword">const</span> <span class="keywordtype">size_t</span>& b_stride,</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> uint index [[thread_position_in_grid]]) {</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">auto</span> a_idx = <a class="code hl_function" href="backend_2metal_2kernels_2utils_8h.html#ac612d0ae30b8257198339debe04916a3">elem_to_loc_1<size_t, uint></a>(index, a_stride);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">auto</span> b_idx = <a class="code hl_function" href="backend_2metal_2kernels_2utils_8h.html#ac612d0ae30b8257198339debe04916a3">elem_to_loc_1<size_t, uint></a>(index, b_stride);</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">auto</span> a_idx = <a class="code hl_function" href="backend_2metal_2kernels_2utils_8h.html#ac612d0ae30b8257198339debe04916a3">elem_to_loc_1<size_t, IdxT></a>(index, a_stride);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">auto</span> b_idx = <a class="code hl_function" href="backend_2metal_2kernels_2utils_8h.html#ac612d0ae30b8257198339debe04916a3">elem_to_loc_1<size_t, IdxT></a>(index, b_stride);</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> c[index] = Op()(a[a_idx], b[b_idx]);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
|
||||
</div>
|
||||
@@ -261,10 +261,10 @@ $(function(){ initResizable(false); });
|
||||
<div class="ttc" id="abackend_2metal_2kernels_2utils_8h_html_ac612d0ae30b8257198339debe04916a3"><div class="ttname"><a href="backend_2metal_2kernels_2utils_8h.html#ac612d0ae30b8257198339debe04916a3">elem_to_loc_1</a></div><div class="ttdeci">METAL_FUNC IdxT elem_to_loc_1(uint elem, constant const StrideT &stride)</div><div class="ttdef"><b>Definition</b> utils.h:140</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a19dbbf8fea68b64bdd25dc8d36865171"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a19dbbf8fea68b64bdd25dc8d36865171">binary_vv2</a></div><div class="ttdeci">void binary_vv2(device const T *a, device const T *b, device U *c, uint2 index, uint2 grid_dim)</div><div class="ttdef"><b>Definition</b> binary.h:62</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a242b8b29a852c255467e50628c6dccf5"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a242b8b29a852c255467e50628c6dccf5">binary_ss</a></div><div class="ttdeci">void binary_ss(device const T *a, device const T *b, device U *c, uint index)</div><div class="ttdef"><b>Definition</b> binary.h:4</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a3d0bb75c43854274b6040c52914e5c12"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a3d0bb75c43854274b6040c52914e5c12">binary_g_nd1</a></div><div class="ttdeci">void binary_g_nd1(device const T *a, device const T *b, device U *c, constant const size_t &a_stride, constant const size_t &b_stride, uint index)</div><div class="ttdef"><b>Definition</b> binary.h:73</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a4116c35f2e4632366d1611d5a95ba141"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a4116c35f2e4632366d1611d5a95ba141">binary_sv</a></div><div class="ttdeci">void binary_sv(device const T *a, device const T *b, device U *c, uint index)</div><div class="ttdef"><b>Definition</b> binary.h:13</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a48bd82eb10f9c623ce7d28daec4fa512"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a48bd82eb10f9c623ce7d28daec4fa512">binary_vs2</a></div><div class="ttdeci">void binary_vs2(device const T *a, device const T *b, device U *c, uint2 index, uint2 grid_dim)</div><div class="ttdef"><b>Definition</b> binary.h:51</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a649851d133358dd5832a73b1061b3313"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a649851d133358dd5832a73b1061b3313">binary_vs</a></div><div class="ttdeci">void binary_vs(device const T *a, device const T *b, device U *c, uint index)</div><div class="ttdef"><b>Definition</b> binary.h:22</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a6808bfb006cb5473da087a2758d0d867"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a6808bfb006cb5473da087a2758d0d867">binary_g_nd1</a></div><div class="ttdeci">void binary_g_nd1(device const T *a, device const T *b, device U *c, constant const size_t &a_stride, constant const size_t &b_stride, uint index)</div><div class="ttdef"><b>Definition</b> binary.h:73</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_a6cefcfee68bd62f3a6924df0cd53dd49"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#a6cefcfee68bd62f3a6924df0cd53dd49">binary_g_nd2</a></div><div class="ttdeci">void binary_g_nd2(device const T *a, device const T *b, device U *c, constant const size_t a_strides[2], constant const size_t b_strides[2], uint2 index, uint2 grid_dim)</div><div class="ttdef"><b>Definition</b> binary.h:86</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_aa8c48b1b21d8f5a181f5443de2346589"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#aa8c48b1b21d8f5a181f5443de2346589">binary_sv2</a></div><div class="ttdeci">void binary_sv2(device const T *a, device const T *b, device U *c, uint2 index, uint2 grid_dim)</div><div class="ttdef"><b>Definition</b> binary.h:40</div></div>
|
||||
<div class="ttc" id="ametal_2kernels_2binary_8h_html_ab1b49438a70f6c707c18afd5bce12bb3"><div class="ttname"><a href="metal_2kernels_2binary_8h.html#ab1b49438a70f6c707c18afd5bce12bb3">binary_g</a></div><div class="ttdeci">void binary_g(device const T *a, device const T *b, device U *c, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, constant const int &ndim, uint3 index, uint3 grid_dim)</div><div class="ttdef"><b>Definition</b> binary.h:121</div></div>
|
||||
|
Reference in New Issue
Block a user