123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="generator" content="rustdoc">
- <meta name="description" content="API documentation for the Rust `KernelBuilder` struct in crate `ocl`.">
- <meta name="keywords" content="rust, rustlang, rust-lang, KernelBuilder">
- <title>ocl::builders::KernelBuilder - Rust</title>
- <link rel="stylesheet" type="text/css" href="../../normalize.css">
- <link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
-
- <link rel="stylesheet" type="text/css" href="../../dark.css">
- <link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
- <script src="../../storage.js"></script>
-
-
-
- </head>
- <body class="rustdoc struct">
- <!--[if lte IE 8]>
- <div class="warning">
- This old browser is unsupported and will most likely display funky
- things.
- </div>
- <![endif]-->
-
- <nav class="sidebar">
- <div class="sidebar-menu">☰</div>
-
- <p class='location'>Struct KernelBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.program">program</a><a href="#method.name">name</a><a href="#method.queue">queue</a><a href="#method.gwo">gwo</a><a href="#method.gws">gws</a><a href="#method.lws">lws</a><a href="#method.global_work_offset">global_work_offset</a><a href="#method.global_work_size">global_work_size</a><a href="#method.local_work_size">local_work_size</a><a href="#method.arg">arg</a><a href="#method.arg_buf">arg_buf</a><a href="#method.arg_img">arg_img</a><a href="#method.arg_smp">arg_smp</a><a href="#method.arg_scl">arg_scl</a><a href="#method.arg_vec">arg_vec</a><a href="#method.arg_loc">arg_loc</a><a href="#method.arg_sampler">arg_sampler</a><a href="#method.arg_local">arg_local</a><a href="#method.arg_named">arg_named</a><a href="#method.arg_buf_named">arg_buf_named</a><a href="#method.arg_img_named">arg_img_named</a><a href="#method.arg_smp_named">arg_smp_named</a><a href="#method.arg_scl_named">arg_scl_named</a><a href="#method.arg_vec_named">arg_vec_named</a><a href="#method.arg_sampler_named">arg_sampler_named</a><a href="#method.disable_mem_arg_retention">disable_mem_arg_retention</a><a href="#method.disable_arg_type_check">disable_arg_type_check</a><a href="#method.build">build</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div></div><p class='location'><a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a></p><script>window.sidebarCurrent = {name: 'KernelBuilder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
- </nav>
- <div class="theme-picker">
- <button id="theme-picker" aria-label="Pick another theme!">
- <img src="../../brush.svg" width="18" alt="Pick another theme!">
- </button>
- <div id="theme-choices"></div>
- </div>
- <script src="../../theme.js"></script>
- <nav class="sub">
- <form class="search-form js-only">
- <div class="search-container">
- <input class="search-input" name="search"
- autocomplete="off"
- placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
- type="search">
- </div>
- </form>
- </nav>
- <section id='main' class="content">
- <h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a>::<wbr><a class="struct" href=''>KernelBuilder</a></span><span class='out-of-band'><span id='render-detail'>
- <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
- [<span class='inner'>−</span>]
- </a>
- </span><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#926-937' title='goto source code'>[src]</a></span></h1>
- <pre class='rust struct'>pub struct KernelBuilder<'b> { /* fields omitted */ }</pre><div class='docblock'><p>A kernel builder.</p>
- <h3 id="examples" class="section-header"><a href="#examples">Examples</a></h3>
- <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">
- <span class="comment">// Create a kernel:</span>
- <span class="kw">let</span> <span class="ident">kernel</span> <span class="op">=</span> <span class="ident">Kernel</span>::<span class="ident">builder</span>()
- .<span class="ident">program</span>(<span class="kw-2">&</span><span class="ident">program</span>)
- .<span class="ident">name</span>(<span class="string">"process"</span>)
- .<span class="ident">queue</span>(<span class="ident">queue</span>.<span class="ident">clone</span>())
- .<span class="ident">global_work_size</span>(<span class="kw-2">&</span><span class="ident">gws_patch_count</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span>(<span class="ident">patch_size</span> <span class="kw">as</span> <span class="ident">i32</span>))
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">source_buffer</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">destination_buffer</span>)
- .<span class="ident">build</span>()<span class="question-mark">?</span>;</pre>
- <p>Re-use and clone:</p>
- <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">
- <span class="comment">// Create a builder for re-use:</span>
- <span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">Kernel</span>::<span class="ident">builder</span>()
- .<span class="ident">program</span>(<span class="kw-2">&</span><span class="ident">program</span>)
- .<span class="ident">name</span>(<span class="string">"process"</span>)
- .<span class="ident">queue</span>(<span class="ident">queue</span>.<span class="ident">clone</span>())
- .<span class="ident">global_work_size</span>([<span class="number">512</span>, <span class="number">64</span>, <span class="number">64</span>])
- .<span class="ident">arg</span>(<span class="kw-2">&</span>(<span class="ident">patch_size</span> <span class="kw">as</span> <span class="ident">i32</span>))
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">source_buffer</span>)
- .<span class="ident">arg_named</span>(<span class="string">"dest"</span>, <span class="kw-2">&</span><span class="ident">destination_buffer</span>);
- <span class="comment">// Create multiple kernels using the same builder:</span>
- <span class="kw">let</span> <span class="ident">kernel_0</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build</span>()<span class="question-mark">?</span>;
- <span class="kw">let</span> <span class="ident">kernel_1</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build</span>()<span class="question-mark">?</span>;
- <span class="comment">// Clone the builder:</span>
- <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">builder_clone</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">clone</span>();
- <span class="comment">// Modify a default parameter:</span>
- <span class="ident">builder_clone</span>.<span class="ident">global_work_size</span>([<span class="number">1024</span>, <span class="number">128</span>, <span class="number">128</span>]);
- <span class="comment">// Create another kernel using the cloned builder:</span>
- <span class="kw">let</span> <span class="ident">kernel_2</span> <span class="op">=</span> <span class="ident">builder_clone</span>.<span class="ident">build</span>()<span class="question-mark">?</span>;
- <span class="comment">// Modify one of the arguments using the created kernel directly</span>
- <span class="comment">// (arguments cannot be modified using the builder):</span>
- <span class="ident">kernel_2</span>.<span class="ident">set_arg</span>(<span class="string">"dest"</span>, <span class="kw-2">&</span><span class="ident">alternate_destination_buffer</span>)<span class="question-mark">?</span>;
- <span class="comment">// Arguments can also be referred to by index:</span>
- <span class="ident">kernel_2</span>.<span class="ident">set_arg</span>(<span class="number">1</span>, <span class="kw-2">&</span><span class="ident">alternate_source_buffer</span>)<span class="question-mark">?</span>;</pre>
- </div>
- <h2 id='methods' class='small-section-header'>
- Methods<a href='#methods' class='anchor'></a>
- </h2>
- <h3 id='impl' class='impl'><span class='in-band'><code>impl<'b> <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></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#939-1448' title='goto source code'>[src]</a></span></h3>
- <div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#941-954' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Returns a new kernel builder.</p>
- </div><h4 id='method.program' class="method"><span id='program.v' class='invisible'><code>pub fn <a href='#method.program' class='fnname'>program</a><'s>(<br> &'s mut self, <br> program: &'b <a class="struct" href="../../ocl/struct.Program.html" title="struct ocl::Program">Program</a><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#957-960' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Specifies a program object with a successfully built executable.</p>
- </div><h4 id='method.name' class="method"><span id='name.v' class='invisible'><code>pub fn <a href='#method.name' class='fnname'>name</a><'s, S>(&'s mut self, name: S) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#964-968' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Specifies a function name in the program declared with the <code>__kernel</code>
- qualifier (e.g. <code>__kernel void add_values(...</code>).</p>
- </div><h4 id='method.queue' class="method"><span id='queue.v' class='invisible'><code>pub fn <a href='#method.queue' class='fnname'>queue</a><'s>(&'s mut self, queue: <a class="struct" href="../../ocl/struct.Queue.html" title="struct ocl::Queue">Queue</a>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#976-979' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Sets the default queue to be used by all subsequent enqueue commands
- unless otherwise changed (with <code>::set_default_queue</code>) or overridden
- (by <code>::cmd().queue(...)...</code>).</p>
- <p>The queue must be associated with a device associated with the
- kernel's program.</p>
- </div><h4 id='method.gwo' class="method"><span id='gwo.v' class='invisible'><code>pub fn <a href='#method.gwo' class='fnname'>gwo</a><'s, D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>>>(<br> &'s mut self, <br> gwo: D<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#986-989' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::global_work_offset</code> instead.</p>
- </div></div><div class='docblock'><p>Sets the default global work offset.</p>
- <p>Used when enqueuing kernel commands. Superseded if specified while
- building a queue command with <code>::cmd</code>.</p>
- </div><h4 id='method.gws' class="method"><span id='gws.v' class='invisible'><code>pub fn <a href='#method.gws' class='fnname'>gws</a><'s, D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>>>(<br> &'s mut self, <br> gws: D<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#996-999' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::global_work_size</code> instead.</p>
- </div></div><div class='docblock'><p>Sets the default global work size.</p>
- <p>Used when enqueuing kernel commands. Superseded if specified while
- building a queue command with <code>::cmd</code>.</p>
- </div><h4 id='method.lws' class="method"><span id='lws.v' class='invisible'><code>pub fn <a href='#method.lws' class='fnname'>lws</a><'s, D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>>>(<br> &'s mut self, <br> lws: D<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1006-1009' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18.0<p>: Use <code>::local_work_size</code> instead.</p>
- </div></div><div class='docblock'><p>Sets the default local work size.</p>
- <p>Used when enqueuing kernel commands. Superseded if specified while
- building a queue command with <code>::cmd</code>.</p>
- </div><h4 id='method.global_work_offset' class="method"><span id='global_work_offset.v' class='invisible'><code>pub fn <a href='#method.global_work_offset' class='fnname'>global_work_offset</a><'s, D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>>>(<br> &'s mut self, <br> gwo: D<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1015-1018' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Sets the default global work offset.</p>
- <p>Used when enqueuing kernel commands. Superseded if specified while
- building a queue command with <code>::cmd</code>.</p>
- </div><h4 id='method.global_work_size' class="method"><span id='global_work_size.v' class='invisible'><code>pub fn <a href='#method.global_work_size' class='fnname'>global_work_size</a><'s, D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>>>(<br> &'s mut self, <br> gws: D<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1024-1027' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Sets the default global work size.</p>
- <p>Used when enqueuing kernel commands. Superseded if specified while
- building a queue command with <code>::cmd</code>.</p>
- </div><h4 id='method.local_work_size' class="method"><span id='local_work_size.v' class='invisible'><code>pub fn <a href='#method.local_work_size' class='fnname'>local_work_size</a><'s, D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>>>(<br> &'s mut self, <br> lws: D<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1033-1036' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Sets the default local work size.</p>
- <p>Used when enqueuing kernel commands. Superseded if specified while
- building a queue command with <code>::cmd</code>.</p>
- </div><h4 id='method.arg' class="method"><span id='arg.v' class='invisible'><code>pub fn <a href='#method.arg' class='fnname'>arg</a><'s, T, A>(&'s mut self, arg: A) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br> A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><ArgValConverter<'b, T>>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1132-1137' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Adds a new <code>Buffer</code>, <code>Image</code>, scalar, or vector argument to the
- kernel.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <h3 id="example" class="section-header"><a href="#example">Example</a></h3>
- <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">
- <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">"multiply_by_scalar"</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="number">100.0f32</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">source_buffer</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">result_buffer</span>)
- .<span class="ident">build</span>()<span class="question-mark">?</span>;</pre>
- </div><h4 id='method.arg_buf' class="method"><span id='arg_buf.v' class='invisible'><code>pub fn <a href='#method.arg_buf' class='fnname'>arg_buf</a><'s, T, M>(<br> &'s mut self, <br> buffer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'b </a>M<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br> M: 'b + <a class="trait" href="../../ocl_core/types/abs/trait.AsMem.html" title="trait ocl_core::types::abs::AsMem">AsMem</a><T> + <a class="trait" href="../../ocl_core/types/abs/trait.MemCmdAll.html" title="trait ocl_core::types::abs::MemCmdAll">MemCmdAll</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1144-1148' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg instead.</p>
- </div></div><div class='docblock'><p>Adds a new argument to the kernel specifying the buffer object represented
- by 'buffer'.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- </div><h4 id='method.arg_img' class="method"><span id='arg_img.v' class='invisible'><code>pub fn <a href='#method.arg_img' class='fnname'>arg_img</a><'s, T, M>(<br> &'s mut self, <br> image: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'b </a>M<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br> M: 'b + <a class="trait" href="../../ocl_core/types/abs/trait.AsMem.html" title="trait ocl_core::types::abs::AsMem">AsMem</a><T> + <a class="trait" href="../../ocl_core/types/abs/trait.MemCmdAll.html" title="trait ocl_core::types::abs::MemCmdAll">MemCmdAll</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1155-1159' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg instead.</p>
- </div></div><div class='docblock'><p>Adds a new argument to the kernel specifying the image object represented
- by 'image'.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- </div><h4 id='method.arg_smp' class="method"><span id='arg_smp.v' class='invisible'><code>pub fn <a href='#method.arg_smp' class='fnname'>arg_smp</a><'s>(<br> &'s mut self, <br> sampler: &'b <a class="struct" href="../../ocl/struct.Sampler.html" title="struct ocl::Sampler">Sampler</a><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1165-1168' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_sampler instead.</p>
- </div></div><div class='docblock'><p>Adds a new argument to the kernel specifying the sampler object represented
- by 'sampler'. Argument is added to the bottom of the argument
- order.</p>
- </div><h4 id='method.arg_scl' class="method"><span id='arg_scl.v' class='invisible'><code>pub fn <a href='#method.arg_scl' class='fnname'>arg_scl</a><'s, T>(&'s mut self, scalar: T) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1174-1178' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg instead.</p>
- </div></div><div class='docblock'><p>Adds a new argument specifying the value: <code>scalar</code>.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- </div><h4 id='method.arg_vec' class="method"><span id='arg_vec.v' class='invisible'><code>pub fn <a href='#method.arg_vec' class='fnname'>arg_vec</a><'s, T>(&'s mut self, vector: T) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1184-1188' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg instead.</p>
- </div></div><div class='docblock'><p>Adds a new argument specifying the value: <code>vector</code>.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- </div><h4 id='method.arg_loc' class="method"><span id='arg_loc.v' class='invisible'><code>pub fn <a href='#method.arg_loc' class='fnname'>arg_loc</a><'s, T>(&'s mut self, length: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1198-1202' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_local instead.</p>
- </div></div><div class='docblock'><p>Adds a new argument specifying the allocation of a local variable of size
- <code>length * sizeof(T)</code> bytes (builder_style).</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Local variables are used to share data between work items in the same
- workgroup.</p>
- </div><h4 id='method.arg_sampler' class="method"><span id='arg_sampler.v' class='invisible'><code>pub fn <a href='#method.arg_sampler' class='fnname'>arg_sampler</a><'s>(<br> &'s mut self, <br> sampler: &'b <a class="struct" href="../../ocl/struct.Sampler.html" title="struct ocl::Sampler">Sampler</a><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1207-1210' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Adds a new argument to the kernel specifying the sampler object represented
- by 'sampler'. Argument is added to the bottom of the argument
- order.</p>
- </div><h4 id='method.arg_local' class="method"><span id='arg_local.v' class='invisible'><code>pub fn <a href='#method.arg_local' class='fnname'>arg_local</a><'s, T>(<br> &'s mut self, <br> length: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1219-1223' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Adds a new argument specifying the allocation of a local variable of size
- <code>length * sizeof(T)</code> bytes (builder_style).</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Local variables are used to share data between work items in the same
- workgroup.</p>
- </div><h4 id='method.arg_named' class="method"><span id='arg_named.v' class='invisible'><code>pub fn <a href='#method.arg_named' class='fnname'>arg_named</a><'s, T, A>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> arg: A<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br> A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><ArgValConverter<'b, T>>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1252-1258' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Adds a new <em>named</em> <code>Buffer</code>, <code>Image</code>, scalar, or vector argument to the
- kernel.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>To set a <code>Buffer</code> or <code>Image</code> argument to <code>None</code> (null), you must use a
- type annotation (e.g. <code>None::<&Buffer<f32>></code>). Scalar and vector
- arguments may not be null; use zero (e.g. <code>&0</code>) instead.</p>
- <p>Named arguments can be modified later using <code>::set_arg()</code>.</p>
- <h3 id="example-1" class="section-header"><a href="#example-1">Example</a></h3>
- <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">
- <span class="comment">// Create a kernel with arguments corresponding to those in the kernel.</span>
- <span class="comment">// One argument will be 'named':</span>
- <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">"multiply_by_scalar"</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">COEFF</span>)
- .<span class="ident">arg</span>(<span class="kw-2">&</span><span class="ident">source_buffer</span>)
- .<span class="ident">arg_named</span>(<span class="string">"result"</span>, <span class="prelude-val">None</span>::<span class="op"><</span><span class="kw-2">&</span><span class="ident">Buffer</span><span class="op"><</span><span class="ident">f32</span><span class="op">>></span>)
- .<span class="ident">build</span>()<span class="question-mark">?</span>;
- <span class="comment">// Set our named argument. The Option<_> wrapper is, well... optional:</span>
- <span class="ident">kern</span>.<span class="ident">set_arg</span>(<span class="string">"result"</span>, <span class="kw-2">&</span><span class="ident">result_buffer</span>)<span class="question-mark">?</span>;
- <span class="comment">// We can also set arguments (named or not) by index:</span>
- <span class="ident">kern</span>.<span class="ident">set_arg</span>(<span class="number">2</span>, <span class="kw-2">&</span><span class="ident">result_buffer</span>)<span class="question-mark">?</span>;</pre>
- </div><h4 id='method.arg_buf_named' class="method"><span id='arg_buf_named.v' class='invisible'><code>pub fn <a href='#method.arg_buf_named' class='fnname'>arg_buf_named</a><'s, T, M>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> buffer_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'b </a>M><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br> M: 'b + <a class="trait" href="../../ocl_core/types/abs/trait.AsMem.html" title="trait ocl_core::types::abs::AsMem">AsMem</a><T> + <a class="trait" href="../../ocl_core/types/abs/trait.MemCmdAll.html" title="trait ocl_core::types::abs::MemCmdAll">MemCmdAll</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1267-1272' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_named instead.</p>
- </div></div><div class='docblock'><p>Adds a new <em>named</em> argument specifying the buffer object represented by
- 'buffer'.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Named arguments can be easily modified later using <code>::set_arg_buf_named()</code>.</p>
- </div><h4 id='method.arg_img_named' class="method"><span id='arg_img_named.v' class='invisible'><code>pub fn <a href='#method.arg_img_named' class='fnname'>arg_img_named</a><'s, T, M>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> image_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'b </a>M><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,<br> M: 'b + <a class="trait" href="../../ocl_core/types/abs/trait.AsMem.html" title="trait ocl_core::types::abs::AsMem">AsMem</a><T> + <a class="trait" href="../../ocl_core/types/abs/trait.MemCmdAll.html" title="trait ocl_core::types::abs::MemCmdAll">MemCmdAll</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1281-1286' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_named instead.</p>
- </div></div><div class='docblock'><p>Adds a new <em>named</em> argument specifying the image object represented by
- 'image'.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Named arguments can be easily modified later using <code>::set_arg_img_named()</code>.</p>
- </div><h4 id='method.arg_smp_named' class="method"><span id='arg_smp_named.v' class='invisible'><code>pub fn <a href='#method.arg_smp_named' class='fnname'>arg_smp_named</a><'s>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> sampler_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'b <a class="struct" href="../../ocl/struct.Sampler.html" title="struct ocl::Sampler">Sampler</a>><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1295-1299' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_sampler_named instead.</p>
- </div></div><div class='docblock'><p>Adds a new <em>named</em> argument specifying the sampler object represented by
- 'sampler'.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Named arguments can be easily modified later using <code>::set_arg_smp_named()</code>.</p>
- </div><h4 id='method.arg_scl_named' class="method"><span id='arg_scl_named.v' class='invisible'><code>pub fn <a href='#method.arg_scl_named' class='fnname'>arg_scl_named</a><'s, T>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> scalar: T<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1309-1314' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_named instead.</p>
- </div></div><div class='docblock'><p>Adds a new <em>named</em> argument specifying the value: <code>scalar</code>.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Scalar arguments may not be null, use zero (e.g. <code>&0</code>) instead.</p>
- <p>Named arguments can be easily modified later using <code>::set_arg_scl_named()</code>.</p>
- </div><h4 id='method.arg_vec_named' class="method"><span id='arg_vec_named.v' class='invisible'><code>pub fn <a href='#method.arg_vec_named' class='fnname'>arg_vec_named</a><'s, T>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> vector: T<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1324-1329' title='goto source code'>[src]</a></span></h4>
- <div class='stability'><div class='stab deprecated'>Deprecated since 0.18<p>: Use ::arg_named instead.</p>
- </div></div><div class='docblock'><p>Adds a new <em>named</em> argument specifying the value: <code>vector</code>.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Vector arguments may not be null, use zero (e.g. <code>&0</code>) instead.</p>
- <p>Named arguments can be easily modified later using <code>::set_arg_vec_named()</code>.</p>
- </div><h4 id='method.arg_sampler_named' class="method"><span id='arg_sampler_named.v' class='invisible'><code>pub fn <a href='#method.arg_sampler_named' class='fnname'>arg_sampler_named</a><'s>(<br> &'s mut self, <br> name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> sampler_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'b <a class="struct" href="../../ocl/struct.Sampler.html" title="struct ocl::Sampler">Sampler</a>><br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1337-1341' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Adds a new <em>named</em> argument specifying the sampler object represented by
- 'sampler'.</p>
- <p>The argument is added to the bottom of the argument order.</p>
- <p>Named arguments can be easily modified later using <code>::set_arg_smp_named()</code>.</p>
- </div><h4 id='method.disable_mem_arg_retention' class="method"><span id='disable_mem_arg_retention.v' class='invisible'><code>pub unsafe fn <a href='#method.disable_mem_arg_retention' class='fnname'>disable_mem_arg_retention</a><'s>(<br> &'s mut self<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1353-1356' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Specifies whether or not to store a copy of memory objects (<code>Buffer</code>
- and <code>Image</code>).</p>
- <h3 id="safety" class="section-header"><a href="#safety">Safety</a></h3>
- <p>Disabling memory object argument retention can lead to a misleading
- error message or a difficult to debug segfault (depending on the
- platform) <em>if</em> a memory object is dropped before a kernel referring to
- it is enqueued. Only disable this if you are certain all of the memory
- objects set as kernel arguments will outlive the <code>Kernel</code> itself.</p>
- </div><h4 id='method.disable_arg_type_check' class="method"><span id='disable_arg_type_check.v' class='invisible'><code>pub unsafe fn <a href='#method.disable_arg_type_check' class='fnname'>disable_arg_type_check</a><'s>(<br> &'s mut self<br>) -> &'s mut <a class="struct" href="../../ocl/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/kernel.rs.html#1366-1369' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Disables argument type checking when setting arguments.</p>
- <p>Because the performance cost of argument type checking is negligible,
- disabling is not recommended.</p>
- <p>Argument type checking will automatically be disabled if any of the
- devices in use do not support OpenCL version 1.2 or higher or if
- argument information is not available on the associated platform.</p>
- </div><h4 id='method.build' class="method"><span id='build.v' class='invisible'><code>pub fn <a href='#method.build' class='fnname'>build</a>(&self) -> <a class="type" href="../../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a><<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#1372-1447' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Builds and returns a new <code>Kernel</code></p>
- </div></div>
- <h2 id='implementations' class='small-section-header'>
- Trait Implementations<a href='#implementations' class='anchor'></a>
- </h2>
- <h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl<'b> <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/builders/struct.KernelBuilder.html" title="struct ocl::builders::KernelBuilder">KernelBuilder</a><'b></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#925' title='goto source code'>[src]</a></span></h3>
- <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>(&self, __arg_0: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <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#925' title='goto source code'>[src]</a></span></h4>
- <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>
- </div></div></section>
- <section id='search' class="content hidden"></section>
- <section class="footer"></section>
- <aside id="help" class="hidden">
- <div>
- <h1 class="hidden">Help</h1>
- <div class="shortcuts">
- <h2>Keyboard Shortcuts</h2>
- <dl>
- <dt><kbd>?</kbd></dt>
- <dd>Show this help dialog</dd>
- <dt><kbd>S</kbd></dt>
- <dd>Focus the search field</dd>
- <dt><kbd>↑</kbd></dt>
- <dd>Move up in search results</dd>
- <dt><kbd>↓</kbd></dt>
- <dd>Move down in search results</dd>
- <dt><kbd>↹</kbd></dt>
- <dd>Switch tab</dd>
- <dt><kbd>⏎</kbd></dt>
- <dd>Go to active search result</dd>
- <dt><kbd>+</kbd></dt>
- <dd>Expand all sections</dd>
- <dt><kbd>-</kbd></dt>
- <dd>Collapse all sections</dd>
- </dl>
- </div>
- <div class="infos">
- <h2>Search Tricks</h2>
- <p>
- Prefix searches with a type followed by a colon (e.g.
- <code>fn:</code>) to restrict the search to a given type.
- </p>
- <p>
- Accepted types are: <code>fn</code>, <code>mod</code>,
- <code>struct</code>, <code>enum</code>,
- <code>trait</code>, <code>type</code>, <code>macro</code>,
- and <code>const</code>.
- </p>
- <p>
- Search functions by type signature (e.g.
- <code>vec -> usize</code> or <code>* -> vec</code>)
- </p>
- </div>
- </div>
- </aside>
-
- <script>
- window.rootPath = "../../";
- window.currentCrate = "ocl";
- </script>
- <script src="../../main.js"></script>
- <script defer src="../../search-index.js"></script>
- </body>
- </html>
|