struct.Kernel.html 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `Kernel` struct in crate `ocl`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, Kernel">
  9. <title>ocl::Kernel - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
  14. <script src="../storage.js"></script>
  15. </head>
  16. <body class="rustdoc struct">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Struct Kernel</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.builder">builder</a><a href="#method.named_arg_idx">named_arg_idx</a><a href="#method.set_arg_unchecked">set_arg_unchecked</a><a href="#method.set_arg">set_arg</a><a href="#method.set_arg_buf_named">set_arg_buf_named</a><a href="#method.set_arg_img_named">set_arg_img_named</a><a href="#method.set_arg_smp_named">set_arg_smp_named</a><a href="#method.set_arg_scl_named">set_arg_scl_named</a><a href="#method.set_arg_vec_named">set_arg_vec_named</a><a href="#method.set_arg_sampler_named">set_arg_sampler_named</a><a href="#method.cmd">cmd</a><a href="#method.enq">enq</a><a href="#method.set_default_queue">set_default_queue</a><a href="#method.get_gwo">get_gwo</a><a href="#method.get_gws">get_gws</a><a href="#method.get_lws">get_lws</a><a href="#method.set_default_global_work_offset">set_default_global_work_offset</a><a href="#method.set_default_global_work_size">set_default_global_work_size</a><a href="#method.set_default_local_work_size">set_default_local_work_size</a><a href="#method.default_queue">default_queue</a><a href="#method.default_global_work_offset">default_global_work_offset</a><a href="#method.default_global_work_size">default_global_work_size</a><a href="#method.default_local_work_size">default_local_work_size</a><a href="#method.as_core">as_core</a><a href="#method.info">info</a><a href="#method.wg_info">wg_info</a><a href="#method.arg_info">arg_info</a><a href="#method.name">name</a><a href="#method.num_args">num_args</a></div><a class="sidebar-title" href="#deref-methods">Methods from Deref&lt;Target=KernelCore&gt;</a><div class="sidebar-links"><a href="#method.as_ptr">as_ptr</a><a href="#method.program">program</a><a href="#method.devices">devices</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Deref">Deref</a><a href="#impl-Clone">Clone</a></div></div><p class='location'><a href='index.html'>ocl</a></p><script>window.sidebarCurrent = {name: 'Kernel', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>ocl</a>::<wbr><a class="struct" href=''>Kernel</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../src/ocl/standard/kernel.rs.html#481-490' title='goto source code'>[src]</a></span></h1>
  50. <pre class='rust struct'>pub struct Kernel { /* fields omitted */ }</pre><div class='docblock'><p>A kernel which represents a 'procedure'.</p>
  51. <p>Corresponds to code which must have already been compiled into a program.</p>
  52. <p>Set arguments using <code>::set_arg</code> or any of the <code>::set_arg...</code> methods.</p>
  53. <p><code>Kernel</code> includes features that a raw OpenCL kernel does not, including:</p>
  54. <ol>
  55. <li>Type-checked arguments (not just size-checked)</li>
  56. <li>Named arguments (with a <code>&amp;'static str</code> name)</li>
  57. <li>Prevention of a potential (difficult to debug) segfault if a buffer or
  58. image used by a kernel is dropped prematurely.</li>
  59. <li>Stored defaults for the:
  60. <ul>
  61. <li>Queue</li>
  62. <li>Global Work Offset</li>
  63. <li>Global Work Size</li>
  64. <li>Local Work Size</li>
  65. </ul>
  66. </li>
  67. </ol>
  68. <h3 id="clone-and-send" class="section-header"><a href="#clone-and-send"><code>Clone</code> and <code>Send</code></a></h3>
  69. <p>A <code>Kernel</code> may not be cloned but may be sent between threads. This ensures
  70. that no two threads create a race condition by attempting to set an
  71. argument and enqueue a kernel at the same time. Use the <code>KernelBuilder</code> to
  72. create multiple identical kernels (<code>KernelBuilder</code> is clonable and
  73. re-usable).</p>
  74. </div>
  75. <h2 id='methods' class='small-section-header'>
  76. Methods<a href='#methods' class='anchor'></a>
  77. </h2>
  78. <h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#492-847' title='goto source code'>[src]</a></span></h3>
  79. <div class='impl-items'><h4 id='method.builder' class="method"><span id='builder.v' class='invisible'><code>pub fn <a href='#method.builder' class='fnname'>builder</a>&lt;'p&gt;() -&gt; <a class="struct" href="../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a>&lt;'p&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#494-496' title='goto source code'>[src]</a></span></h4>
  80. <div class='docblock'><p>Returns a new <code>KernelBuilder</code>.</p>
  81. </div><h4 id='method.named_arg_idx' class="method"><span id='named_arg_idx.v' class='invisible'><code>pub fn <a href='#method.named_arg_idx' class='fnname'>named_arg_idx</a>(&amp;self, name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#525-527' title='goto source code'>[src]</a></span></h4>
  82. <div class='docblock'><p>Returns the argument index of a named argument if it exists.</p>
  83. </div><h4 id='method.set_arg_unchecked' class="method"><span id='set_arg_unchecked.v' class='invisible'><code>pub unsafe fn <a href='#method.set_arg_unchecked' class='fnname'>set_arg_unchecked</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;arg_idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;arg_val: <a class="struct" href="../ocl/enums/struct.ArgVal.html" title="struct ocl::enums::ArgVal">ArgVal</a><br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#537-539' title='goto source code'>[src]</a></span></h4>
  84. <div class='docblock'><p>Sets an argument by index without checks of any kind.</p>
  85. <p>Setting buffer or image (<code>cl_mem</code>) arguments this way may cause
  86. segfaults or errors if the buffer goes out of scope at any point
  87. before this kernel is dropped.</p>
  88. <p>This also bypasses the check to determine if the type of the value you
  89. pass here matches the type defined in your kernel.</p>
  90. </div><h4 id='method.set_arg' class="method"><span id='set_arg.v' class='invisible'><code>pub fn <a href='#method.set_arg' class='fnname'>set_arg</a>&lt;'a, T, Ai, Av&gt;(&amp;self, idx: Ai, arg: Av) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ai: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;ArgIdxSpecifier&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;Av: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;ArgValConverter&lt;'a, T&gt;&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#568-586' title='goto source code'>[src]</a></span></h4>
  91. <div class='docblock'><p>Sets a <code>Buffer</code>, <code>Image</code>, scalar, or vector argument by index or by
  92. name.</p>
  93. <h3 id="example" class="section-header"><a href="#example">Example</a></h3>
  94. <div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
  95. <span class="comment">// Create a kernel with arguments corresponding to those in the kernel.</span>
  96. <span class="comment">// Just for fun, one argument will be &#39;named&#39;:</span>
  97. <span class="kw">let</span> <span class="ident">kern</span> <span class="op">=</span> <span class="ident">ocl_pq</span>.<span class="ident">kernel_builder</span>(<span class="string">&quot;multiply_by_scalar&quot;</span>)
  98. .<span class="ident">arg</span>(<span class="kw-2">&amp;</span><span class="number">0</span>)
  99. .<span class="ident">arg</span>(<span class="prelude-val">None</span>::<span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">Buffer</span><span class="op">&lt;</span><span class="ident">f32</span><span class="op">&gt;&gt;</span>)
  100. .<span class="ident">arg_named</span>(<span class="string">&quot;result&quot;</span>, <span class="prelude-val">None</span>::<span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">Buffer</span><span class="op">&lt;</span><span class="ident">f32</span><span class="op">&gt;&gt;</span>)
  101. .<span class="ident">build</span>()<span class="question-mark">?</span>;
  102. <span class="comment">// Set our named argument. The Option&lt;_&gt; wrapper is, well... optional:</span>
  103. <span class="ident">kern</span>.<span class="ident">set_arg</span>(<span class="string">&quot;result&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">result_buffer</span>)<span class="question-mark">?</span>;
  104. <span class="comment">// We can also set arguments (named or not) by index. Just for</span>
  105. <span class="comment">// demonstration, we&#39;ll set one using an option:</span>
  106. <span class="ident">kern</span>.<span class="ident">set_arg</span>(<span class="number">0</span>, <span class="kw-2">&amp;</span><span class="ident">COEFF</span>)<span class="question-mark">?</span>;
  107. <span class="ident">kern</span>.<span class="ident">set_arg</span>(<span class="number">1</span>, <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">source_buffer</span>))<span class="question-mark">?</span>;
  108. <span class="ident">kern</span>.<span class="ident">set_arg</span>(<span class="number">2</span>, <span class="kw-2">&amp;</span><span class="ident">result_buffer</span>)<span class="question-mark">?</span>;</pre>
  109. </div><h4 id='method.set_arg_buf_named' class="method"><span id='set_arg_buf_named.v' class='invisible'><code>pub fn <a href='#method.set_arg_buf_named' class='fnname'>set_arg_buf_named</a>&lt;'a, T, M&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;M&gt;<br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;M: <a class="trait" href="../ocl_core/types/abs/trait.AsMem.html" title="trait ocl_core::types::abs::AsMem">AsMem</a>&lt;T&gt; + <a class="trait" href="../ocl_core/types/abs/trait.MemCmdAll.html" title="trait ocl_core::types::abs::MemCmdAll">MemCmdAll</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#590-604' title='goto source code'>[src]</a></span></h4>
  110. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::set_arg</code> instead.</p>
  111. </div></div><div class='docblock'><p>Modifies the kernel argument named: <code>name</code>.</p>
  112. </div><h4 id='method.set_arg_img_named' class="method"><span id='set_arg_img_named.v' class='invisible'><code>pub fn <a href='#method.set_arg_img_named' class='fnname'>set_arg_img_named</a>&lt;'a, T, M&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;image_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;M&gt;<br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;M: <a class="trait" href="../ocl_core/types/abs/trait.AsMem.html" title="trait ocl_core::types::abs::AsMem">AsMem</a>&lt;T&gt; + <a class="trait" href="../ocl_core/types/abs/trait.MemCmdAll.html" title="trait ocl_core::types::abs::MemCmdAll">MemCmdAll</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#608-622' title='goto source code'>[src]</a></span></h4>
  113. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::set_arg</code> instead.</p>
  114. </div></div><div class='docblock'><p>Modifies the kernel argument named: <code>name</code>.</p>
  115. </div><h4 id='method.set_arg_smp_named' class="method"><span id='set_arg_smp_named.v' class='invisible'><code>pub fn <a href='#method.set_arg_smp_named' class='fnname'>set_arg_smp_named</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;sampler_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../ocl/struct.Sampler.html" title="struct ocl::Sampler">Sampler</a>&gt;<br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#626-633' title='goto source code'>[src]</a></span></h4>
  116. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::set_arg_sampler_named</code> instead.</p>
  117. </div></div><div class='docblock'><p>Sets the value of a named sampler argument.</p>
  118. </div><h4 id='method.set_arg_scl_named' class="method"><span id='set_arg_scl_named.v' class='invisible'><code>pub fn <a href='#method.set_arg_scl_named' class='fnname'>set_arg_scl_named</a>&lt;'a, T, B&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;scalar: B<br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#637-642' title='goto source code'>[src]</a></span></h4>
  119. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::set_arg</code> instead.</p>
  120. </div></div><div class='docblock'><p>Modifies the kernel argument named: <code>name</code>.</p>
  121. </div><h4 id='method.set_arg_vec_named' class="method"><span id='set_arg_vec_named.v' class='invisible'><code>pub fn <a href='#method.set_arg_vec_named' class='fnname'>set_arg_vec_named</a>&lt;'a, T, B&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;vector: B<br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#646-651' title='goto source code'>[src]</a></span></h4>
  122. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::set_arg</code> instead.</p>
  123. </div></div><div class='docblock'><p>Modifies the kernel argument named: <code>name</code>.</p>
  124. </div><h4 id='method.set_arg_sampler_named' class="method"><span id='set_arg_sampler_named.v' class='invisible'><code>pub fn <a href='#method.set_arg_sampler_named' class='fnname'>set_arg_sampler_named</a>&lt;'a, Ai&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: Ai, <br>&nbsp;&nbsp;&nbsp;&nbsp;sampler_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../ocl/struct.Sampler.html" title="struct ocl::Sampler">Sampler</a>&gt;<br>) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ai: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;ArgIdxSpecifier&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#654-663' title='goto source code'>[src]</a></span></h4>
  125. <div class='docblock'><p>Sets the value of a named sampler argument.</p>
  126. </div><h4 id='method.cmd' class="method"><span id='cmd.v' class='invisible'><code>pub fn <a href='#method.cmd' class='fnname'>cmd</a>(&amp;self) -&gt; <a class="struct" href="../ocl/builders/struct.KernelCmd.html" title="struct ocl::builders::KernelCmd">KernelCmd</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#667-677' title='goto source code'>[src]</a></span></h4>
  127. <div class='docblock'><p>Returns a command builder which is used to chain parameters of an
  128. 'enqueue' command together.</p>
  129. </div><h4 id='method.enq' class="method"><span id='enq.v' class='invisible'><code>pub unsafe fn <a href='#method.enq' class='fnname'>enq</a>(&amp;self) -&gt; <a class="type" href="../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#689-691' title='goto source code'>[src]</a></span></h4>
  130. <div class='docblock'><p>Enqueues this kernel on the default queue using the default work sizes
  131. and offsets.</p>
  132. <p>Shorthand for <code>.cmd().enq()</code></p>
  133. <h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
  134. <p>All kernel code must be considered untrusted. Therefore the act of
  135. calling this function contains implied unsafety even though the API
  136. itself is safe.</p>
  137. </div><h4 id='method.set_default_queue' class="method"><span id='set_default_queue.v' class='invisible'><code>pub fn <a href='#method.set_default_queue' class='fnname'>set_default_queue</a>(&amp;mut self, queue: <a class="struct" href="../ocl/struct.Queue.html" title="struct ocl::Queue">Queue</a>) -&gt; &amp;mut <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#709-712' title='goto source code'>[src]</a></span></h4>
  138. <div class='docblock'><p>Changes the default queue.</p>
  139. <p>Returns a ref for chaining i.e.:</p>
  140. <p><code>kernel.set_default_queue(queue).enqueue(....);</code></p>
  141. <p>Even when used as above, the queue is changed permanently,
  142. not just for the one call. Changing the queue is cheap so feel free
  143. to change as often as needed.</p>
  144. <p>If you want to change the queue for only a single call, use:
  145. <code>::cmd.queue(...)...enq()...</code></p>
  146. <p>The new queue must be associated with a device associated with the
  147. kernel's program.</p>
  148. </div><h4 id='method.get_gwo' class="method"><span id='get_gwo.v' class='invisible'><code>pub fn <a href='#method.get_gwo' class='fnname'>get_gwo</a>(&amp;self) -&gt; <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#716-718' title='goto source code'>[src]</a></span></h4>
  149. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::global_work_offset</code> instead.</p>
  150. </div></div><div class='docblock'><p>Returns the default global work offset.</p>
  151. </div><h4 id='method.get_gws' class="method"><span id='get_gws.v' class='invisible'><code>pub fn <a href='#method.get_gws' class='fnname'>get_gws</a>(&amp;self) -&gt; <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#722-724' title='goto source code'>[src]</a></span></h4>
  152. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::global_work_size</code> instead.</p>
  153. </div></div><div class='docblock'><p>Returns the default global work size.</p>
  154. </div><h4 id='method.get_lws' class="method"><span id='get_lws.v' class='invisible'><code>pub fn <a href='#method.get_lws' class='fnname'>get_lws</a>(&amp;self) -&gt; <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#728-730' title='goto source code'>[src]</a></span></h4>
  155. <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::local_work_size</code> instead.</p>
  156. </div></div><div class='docblock'><p>Returns the default local work size.</p>
  157. </div><h4 id='method.set_default_global_work_offset' class="method"><span id='set_default_global_work_offset.v' class='invisible'><code>pub fn <a href='#method.set_default_global_work_offset' class='fnname'>set_default_global_work_offset</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;gwo: <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a><br>) -&gt; &amp;mut <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#733-736' title='goto source code'>[src]</a></span></h4>
  158. <div class='docblock'><p>Sets the default global work offset.</p>
  159. </div><h4 id='method.set_default_global_work_size' class="method"><span id='set_default_global_work_size.v' class='invisible'><code>pub fn <a href='#method.set_default_global_work_size' class='fnname'>set_default_global_work_size</a>(&amp;mut self, gws: <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>) -&gt; &amp;mut <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#739-742' title='goto source code'>[src]</a></span></h4>
  160. <div class='docblock'><p>Sets the default global work size.</p>
  161. </div><h4 id='method.set_default_local_work_size' class="method"><span id='set_default_local_work_size.v' class='invisible'><code>pub fn <a href='#method.set_default_local_work_size' class='fnname'>set_default_local_work_size</a>(&amp;mut self, lws: <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>) -&gt; &amp;mut <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#745-748' title='goto source code'>[src]</a></span></h4>
  162. <div class='docblock'><p>Sets the default local work size.</p>
  163. </div><h4 id='method.default_queue' class="method"><span id='default_queue.v' class='invisible'><code>pub fn <a href='#method.default_queue' class='fnname'>default_queue</a>&lt;'a&gt;(&amp;'a self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a <a class="struct" href="../ocl/struct.Queue.html" title="struct ocl::Queue">Queue</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#751-753' title='goto source code'>[src]</a></span></h4>
  164. <div class='docblock'><p>Returns the default queue for this kernel if one has been set.</p>
  165. </div><h4 id='method.default_global_work_offset' class="method"><span id='default_global_work_offset.v' class='invisible'><code>pub fn <a href='#method.default_global_work_offset' class='fnname'>default_global_work_offset</a>(&amp;self) -&gt; <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#756-758' title='goto source code'>[src]</a></span></h4>
  166. <div class='docblock'><p>Returns the default global work offset.</p>
  167. </div><h4 id='method.default_global_work_size' class="method"><span id='default_global_work_size.v' class='invisible'><code>pub fn <a href='#method.default_global_work_size' class='fnname'>default_global_work_size</a>(&amp;self) -&gt; <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#761-763' title='goto source code'>[src]</a></span></h4>
  168. <div class='docblock'><p>Returns the default global work size.</p>
  169. </div><h4 id='method.default_local_work_size' class="method"><span id='default_local_work_size.v' class='invisible'><code>pub fn <a href='#method.default_local_work_size' class='fnname'>default_local_work_size</a>(&amp;self) -&gt; <a class="enum" href="../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#766-768' title='goto source code'>[src]</a></span></h4>
  170. <div class='docblock'><p>Returns the default local work size.</p>
  171. </div><h4 id='method.as_core' class="method"><span id='as_core.v' class='invisible'><code>pub fn <a href='#method.as_core' class='fnname'>as_core</a>&lt;'a&gt;(&amp;'a self) -&gt; &amp;'a <a class="struct" href="../ocl_core/types/abs/struct.Kernel.html" title="struct ocl_core::types::abs::Kernel">KernelCore</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#773-775' title='goto source code'>[src]</a></span></h4>
  172. <div class='docblock'><p>Returns a reference to the core pointer wrapper, usable by functions in
  173. the <code>core</code> module.</p>
  174. </div><h4 id='method.info' class="method"><span id='info.v' class='invisible'><code>pub fn <a href='#method.info' class='fnname'>info</a>(&amp;self, info_kind: <a class="enum" href="../ocl/enums/enum.KernelInfo.html" title="enum ocl::enums::KernelInfo">KernelInfo</a>) -&gt; <a class="type" href="../ocl_core/error/type.Result.html" title="type ocl_core::error::Result">OclCoreResult</a>&lt;<a class="enum" href="../ocl/enums/enum.KernelInfoResult.html" title="enum ocl::enums::KernelInfoResult">KernelInfoResult</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#778-780' title='goto source code'>[src]</a></span></h4>
  175. <div class='docblock'><p>Returns information about this kernel.</p>
  176. </div><h4 id='method.wg_info' class="method"><span id='wg_info.v' class='invisible'><code>pub fn <a href='#method.wg_info' class='fnname'>wg_info</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;device: <a class="struct" href="../ocl/struct.Device.html" title="struct ocl::Device">Device</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;info_kind: <a class="enum" href="../ocl/enums/enum.KernelWorkGroupInfo.html" title="enum ocl::enums::KernelWorkGroupInfo">KernelWorkGroupInfo</a><br>) -&gt; <a class="type" href="../ocl_core/error/type.Result.html" title="type ocl_core::error::Result">OclCoreResult</a>&lt;<a class="enum" href="../ocl/enums/enum.KernelWorkGroupInfoResult.html" title="enum ocl::enums::KernelWorkGroupInfoResult">KernelWorkGroupInfoResult</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#783-786' title='goto source code'>[src]</a></span></h4>
  177. <div class='docblock'><p>Returns work group information for this kernel.</p>
  178. </div><h4 id='method.arg_info' class="method"><span id='arg_info.v' class='invisible'><code>pub fn <a href='#method.arg_info' class='fnname'>arg_info</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;arg_idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;info_kind: <a class="enum" href="../ocl/enums/enum.KernelArgInfo.html" title="enum ocl::enums::KernelArgInfo">KernelArgInfo</a><br>) -&gt; <a class="type" href="../ocl_core/error/type.Result.html" title="type ocl_core::error::Result">OclCoreResult</a>&lt;<a class="enum" href="../ocl/enums/enum.KernelArgInfoResult.html" title="enum ocl::enums::KernelArgInfoResult">KernelArgInfoResult</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#789-792' title='goto source code'>[src]</a></span></h4>
  179. <div class='docblock'><p>Returns argument information for this kernel.</p>
  180. </div><h4 id='method.name' class="method"><span id='name.v' class='invisible'><code>pub fn <a href='#method.name' class='fnname'>name</a>(&amp;self) -&gt; <a class="type" href="../ocl_core/error/type.Result.html" title="type ocl_core::error::Result">OclCoreResult</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#795-797' title='goto source code'>[src]</a></span></h4>
  181. <div class='docblock'><p>Returns the name of this kernel.</p>
  182. </div><h4 id='method.num_args' class="method"><span id='num_args.v' class='invisible'><code>pub fn <a href='#method.num_args' class='fnname'>num_args</a>(&amp;self) -&gt; <a class="type" href="../ocl_core/error/type.Result.html" title="type ocl_core::error::Result">OclCoreResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#800-806' title='goto source code'>[src]</a></span></h4>
  183. <div class='docblock'><p>Returns the number of arguments this kernel has.</p>
  184. </div></div>
  185. <h2 id='deref-methods' class='small-section-header'>
  186. Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = <a class="struct" href="../ocl_core/types/abs/struct.Kernel.html" title="struct ocl_core::types::abs::Kernel">KernelCore</a>&gt;<a href='#deref-methods' class='anchor'></a>
  187. </h2>
  188. <div class='impl-items'><h4 id='method.as_ptr' class="method"><span id='as_ptr.v' class='invisible'><code>pub fn <a href='#method.as_ptr' class='fnname'>as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="../libc/enum.c_void.html" title="enum libc::c_void">c_void</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl_core/types/abs.rs.html#899-901' title='goto source code'>[src]</a></span></h4>
  189. <div class='docblock'><p>Returns a pointer, do not store it.</p>
  190. </div><h4 id='method.program' class="method"><span id='program.v' class='invisible'><code>pub fn <a href='#method.program' class='fnname'>program</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../ocl_core/types/abs/struct.Program.html" title="struct ocl_core::types::abs::Program">Program</a>, <a class="struct" href="../ocl_core/error/struct.Error.html" title="struct ocl_core::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl_core/types/abs.rs.html#904-910' title='goto source code'>[src]</a></span></h4>
  191. <div class='docblock'><p>Returns the program associated with this kernel.</p>
  192. </div><h4 id='method.devices' class="method"><span id='devices.v' class='invisible'><code>pub fn <a href='#method.devices' class='fnname'>devices</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../ocl_core/types/abs/struct.DeviceId.html" title="struct ocl_core::types::abs::DeviceId">DeviceId</a>&gt;, <a class="struct" href="../ocl_core/error/struct.Error.html" title="struct ocl_core::error::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl_core/types/abs.rs.html#912-914' title='goto source code'>[src]</a></span></h4>
  193. </div>
  194. <h2 id='implementations' class='small-section-header'>
  195. Trait Implementations<a href='#implementations' class='anchor'></a>
  196. </h2>
  197. <h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#480' title='goto source code'>[src]</a></span></h3>
  198. <div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#480' title='goto source code'>[src]</a></span></h4>
  199. <div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
  200. </div></div><h3 id='impl-Display' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code><a href='#impl-Display' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#849-855' title='goto source code'>[src]</a></span></h3>
  201. <div class='impl-items'><h4 id='method.fmt-1' class="method"><span id='fmt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#850-854' title='goto source code'>[src]</a></span></h4>
  202. <div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
  203. </div></div><h3 id='impl-Deref' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code><a href='#impl-Deref' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#857-863' title='goto source code'>[src]</a></span></h3>
  204. <div class='impl-items'><h4 id='associatedtype.Target' class="type"><span id='Target.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = <a class="struct" href="../ocl_core/types/abs/struct.Kernel.html" title="struct ocl_core::types::abs::Kernel">KernelCore</a></code></span></h4>
  205. <div class='docblock'><p>The resulting type after dereferencing.</p>
  206. </div><h4 id='method.deref' class="method"><span id='deref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>&lt;'a&gt;(&amp;'a self) -&gt; &amp;'a <a class="struct" href="../ocl_core/types/abs/struct.Kernel.html" title="struct ocl_core::types::abs::Kernel">KernelCore</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#860-862' title='goto source code'>[src]</a></span></h4>
  207. <div class='docblock'><p>Dereferences the value.</p>
  208. </div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#865-870' title='goto source code'>[src]</a></span></h3>
  209. <div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../ocl/struct.Kernel.html" title="struct ocl::Kernel">Kernel</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ocl/standard/kernel.rs.html#867-869' title='goto source code'>[src]</a></span></h4>
  210. <div class='docblock'><p>Creates a new, identical kernel.</p>
  211. </div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
  212. <div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
  213. </div></div></section>
  214. <section id='search' class="content hidden"></section>
  215. <section class="footer"></section>
  216. <aside id="help" class="hidden">
  217. <div>
  218. <h1 class="hidden">Help</h1>
  219. <div class="shortcuts">
  220. <h2>Keyboard Shortcuts</h2>
  221. <dl>
  222. <dt><kbd>?</kbd></dt>
  223. <dd>Show this help dialog</dd>
  224. <dt><kbd>S</kbd></dt>
  225. <dd>Focus the search field</dd>
  226. <dt><kbd>↑</kbd></dt>
  227. <dd>Move up in search results</dd>
  228. <dt><kbd>↓</kbd></dt>
  229. <dd>Move down in search results</dd>
  230. <dt><kbd>↹</kbd></dt>
  231. <dd>Switch tab</dd>
  232. <dt><kbd>&#9166;</kbd></dt>
  233. <dd>Go to active search result</dd>
  234. <dt><kbd>+</kbd></dt>
  235. <dd>Expand all sections</dd>
  236. <dt><kbd>-</kbd></dt>
  237. <dd>Collapse all sections</dd>
  238. </dl>
  239. </div>
  240. <div class="infos">
  241. <h2>Search Tricks</h2>
  242. <p>
  243. Prefix searches with a type followed by a colon (e.g.
  244. <code>fn:</code>) to restrict the search to a given type.
  245. </p>
  246. <p>
  247. Accepted types are: <code>fn</code>, <code>mod</code>,
  248. <code>struct</code>, <code>enum</code>,
  249. <code>trait</code>, <code>type</code>, <code>macro</code>,
  250. and <code>const</code>.
  251. </p>
  252. <p>
  253. Search functions by type signature (e.g.
  254. <code>vec -> usize</code> or <code>* -> vec</code>)
  255. </p>
  256. </div>
  257. </div>
  258. </aside>
  259. <script>
  260. window.rootPath = "../";
  261. window.currentCrate = "ocl";
  262. </script>
  263. <script src="../main.js"></script>
  264. <script defer src="../search-index.js"></script>
  265. </body>
  266. </html>