enum.DeviceSpecifier.html 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!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 `DeviceSpecifier` enum in crate `ocl`."><meta name="keywords" content="rust, rustlang, rust-lang, DeviceSpecifier"><title>ocl::builders::DeviceSpecifier - 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="../../light.css" id="themeStyle"><script src="../../storage.js"></script></head><body class="rustdoc enum"><!--[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">&#9776;</div><p class='location'>Enum DeviceSpecifier</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.All">All</a><a href="#variant.First">First</a><a href="#variant.Single">Single</a><a href="#variant.List">List</a><a href="#variant.Indices">Indices</a><a href="#variant.WrappingIndices">WrappingIndices</a><a href="#variant.TypeFlags">TypeFlags</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.all">all</a><a href="#method.first">first</a><a href="#method.single">single</a><a href="#method.list">list</a><a href="#method.indices">indices</a><a href="#method.wrapping_indices">wrapping_indices</a><a href="#method.type_flags">type_flags</a><a href="#method.to_device_list">to_device_list</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Clone">Clone</a><a href="#impl-Default">Default</a><a href="#impl-From%3Cusize%3E">From&lt;usize&gt;</a><a href="#impl-From%3C%26%27a%20%5Busize%5D%3E">From&lt;&amp;&#39;a [usize]&gt;</a><a href="#impl-From%3C%26%27a%20Vec%3Cusize%3E%3E">From&lt;&amp;&#39;a Vec&lt;usize&gt;&gt;</a><a href="#impl-From%3C%26%27a%20%5BDevice%5D%3E">From&lt;&amp;&#39;a [Device]&gt;</a><a href="#impl-From%3C%26%27a%20Vec%3CDevice%3E%3E">From&lt;&amp;&#39;a Vec&lt;Device&gt;&gt;</a><a href="#impl-From%3CDevice%3E">From&lt;Device&gt;</a><a href="#impl-From%3C%26%27a%20Device%3E">From&lt;&amp;&#39;a Device&gt;</a><a href="#impl-From%3CDeviceIdCore%3E">From&lt;DeviceIdCore&gt;</a><a href="#impl-From%3C%26%27a%20DeviceIdCore%3E">From&lt;&amp;&#39;a DeviceIdCore&gt;</a><a href="#impl-From%3CDeviceType%3E">From&lt;DeviceType&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a></p><script>window.sidebarCurrent = {name: 'DeviceSpecifier', ty: 'enum', 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"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a>::<wbr><a class="enum" href=''>DeviceSpecifier</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/ocl/standard/device.rs.html#67-75' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust enum'>pub enum DeviceSpecifier {
  2. All,
  3. First,
  4. Single(<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>),
  5. List(<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/struct.Device.html" title="struct ocl::Device">Device</a>&gt;),
  6. Indices(<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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;),
  7. WrappingIndices(<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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;),
  8. TypeFlags(<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>),
  9. }</pre></div><div class='docblock'><p>Specifies [what boils down to] a list of devices.</p>
  10. <p>The <code>Indices</code> variant is context-specific, not robust, and may lead to a
  11. panic if the context changes. It is useful for convenience only and not
  12. recommended for general use. The <code>WrappingIndices</code> variant is somewhat
  13. less dangerous but can still be somewhat machine-specific.</p>
  14. <p>The <code>TypeFlags</code> variant is used for specifying a list of devices using a
  15. bitfield (<code>DeviceType</code>) and is the most robust / portable.</p>
  16. <p>[FIXME: Add some links to the SDK]</p>
  17. </div><h2 id='variants' class='variants small-section-header'>
  18. Variants<a href='#variants' class='anchor'></a></h2>
  19. <span id="variant.All" class="variant small-section-header"><a href="#variant.All" class="anchor field"></a><span id='All.v' class='invisible'><code>All</code></span></span><span id="variant.First" class="variant small-section-header"><a href="#variant.First" class="anchor field"></a><span id='First.v' class='invisible'><code>First</code></span></span><span id="variant.Single" class="variant small-section-header"><a href="#variant.Single" class="anchor field"></a><span id='Single.v' class='invisible'><code>Single(<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>)</code></span></span><span id="variant.List" class="variant small-section-header"><a href="#variant.List" class="anchor field"></a><span id='List.v' class='invisible'><code>List(<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/struct.Device.html" title="struct ocl::Device">Device</a>&gt;)</code></span></span><span id="variant.Indices" class="variant small-section-header"><a href="#variant.Indices" class="anchor field"></a><span id='Indices.v' class='invisible'><code>Indices(<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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;)</code></span></span><span id="variant.WrappingIndices" class="variant small-section-header"><a href="#variant.WrappingIndices" class="anchor field"></a><span id='WrappingIndices.v' class='invisible'><code>WrappingIndices(<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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;)</code></span></span><span id="variant.TypeFlags" class="variant small-section-header"><a href="#variant.TypeFlags" class="anchor field"></a><span id='TypeFlags.v' class='invisible'><code>TypeFlags(<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>)</code></span></span>
  20. <h2 id='methods' class='small-section-header'>
  21. Methods<a href='#methods' class='anchor'></a>
  22. </h2>
  23. <h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#77-180' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.all' class="method"><span id='all.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.all' class='fnname'>all</a>(self) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#81-83' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::All</code> variant which specifies all
  24. devices on a platform.</p>
  25. </div><h4 id='method.first' class="method"><span id='first.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.first' class='fnname'>first</a>(self) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#88-90' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::First</code> variant which specifies only
  26. the first device on a platform.</p>
  27. </div><h4 id='method.single' class="method"><span id='single.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.single' class='fnname'>single</a>(self, device: <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#95-97' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::Single</code> variant which specifies a single
  28. device.</p>
  29. </div><h4 id='method.list' class="method"><span id='list.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.list' class='fnname'>list</a>(self, list: <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/struct.Device.html" title="struct ocl::Device">Device</a>&gt;) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#102-104' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::List</code> variant which specifies a list of
  30. devices.</p>
  31. </div><h4 id='method.indices' class="method"><span id='indices.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub unsafe fn <a href='#method.indices' class='fnname'>indices</a>(self, indices: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#124-126' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::Indices</code> variant which specifies a list of
  32. devices by index.</p>
  33. <h3 id="safety" class="section-header"><a href="#safety">Safety</a></h3>
  34. <p>This variant is context-specific, not robust, and may lead to a panic
  35. if the context changes. It is useful for convenience only and not
  36. recommended for general use.</p>
  37. <p>Though using the <code>Indices</code> variant is not strictly unsafe in the usual
  38. way (will not lead to memory bugs, etc.), it is marked unsafe as a
  39. warning. Recommendations for a more idiomatic way to express this
  40. potential footgun are welcome.</p>
  41. <p>Using <code>::wrapping_indices</code> is a more robust (but still potentially
  42. non-portable) solution.</p>
  43. </div><h4 id='method.wrapping_indices' class="method"><span id='wrapping_indices.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.wrapping_indices' class='fnname'>wrapping_indices</a>(self, windices: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#132-134' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::WrappingIndices</code> variant, specifying a
  44. list of devices by indices which are wrapped around (simply using the
  45. modulo operator) so that every index is always valid.</p>
  46. </div><h4 id='method.type_flags' class="method"><span id='type_flags.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.type_flags' class='fnname'>type_flags</a>(self, flags: <a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#139-141' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a <code>DeviceSpecifier::TypeFlags</code> variant which specifies a list
  47. of devices using a conventional bitfield.</p>
  48. </div><h4 id='method.to_device_list' class="method"><span id='to_device_list.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.to_device_list' class='fnname'>to_device_list</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;<a class="struct" href="../../ocl/struct.Platform.html" title="struct ocl::Platform">Platform</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;platform: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;P&gt;<br>) -&gt; <a class="type" href="../../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</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/struct.Device.html" title="struct ocl::Device">Device</a>&gt;&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#153-179' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the list of devices matching the parameters specified by this
  49. <code>DeviceSpecifier</code></p>
  50. <h3 id="panics" class="section-header"><a href="#panics">Panics</a></h3>
  51. <p>Any device indices listed within the <code>Indices</code> variant must be within
  52. the range of the number of devices for the platform specified by
  53. <code>Platform</code>. If no <code>platform</code> has been specified, this behaviour is
  54. undefined and could end up using any platform at all.</p>
  55. </div></div>
  56. <h2 id='implementations' class='small-section-header'>
  57. Trait Implementations<a href='#implementations' class='anchor'></a>
  58. </h2>
  59. <div id='implementations-list'><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#66' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.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></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#66' title='goto source code'>[src]</a></td></tr></tbody></table></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>
  60. </div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-Clone' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#66' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><table class='table-display'><tbody><tr><td><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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#66' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
  61. </div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><table class='table-display'><tbody><tr><td><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></td><td><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#130-132' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><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>
  62. </div></div><h3 id='impl-Default' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-Default' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#182-186' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#183-185' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
  63. </div></div><h3 id='impl-From%3Cusize%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3Cusize%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#188-192' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#189-191' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  64. </div></div><h3 id='impl-From%3C%26%27a%20%5Busize%5D%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3C%26%27a%20%5Busize%5D%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#194-198' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-1' class="method"><span id='from.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(indices: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#195-197' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  65. </div></div><h3 id='impl-From%3C%26%27a%20Vec%3Cusize%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3C%26%27a%20Vec%3Cusize%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#200-204' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-2' class="method"><span id='from.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(indices: &amp;'a <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#201-203' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  66. </div></div><h3 id='impl-From%3C%26%27a%20%5BDevice%5D%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'a [</a><a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3C%26%27a%20%5BDevice%5D%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#206-210' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-3' class="method"><span id='from.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(devices: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'a [</a><a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#207-209' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  67. </div></div><h3 id='impl-From%3C%26%27a%20Vec%3CDevice%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a <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/struct.Device.html" title="struct ocl::Device">Device</a>&gt;&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3C%26%27a%20Vec%3CDevice%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#212-216' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-4' class="method"><span id='from.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(devices: &amp;'a <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/struct.Device.html" title="struct ocl::Device">Device</a>&gt;) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#213-215' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  68. </div></div><h3 id='impl-From%3CDevice%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3CDevice%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#218-222' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-5' class="method"><span id='from.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(device: <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#219-221' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  69. </div></div><h3 id='impl-From%3C%26%27a%20Device%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3C%26%27a%20Device%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#224-228' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-6' class="method"><span id='from.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(device: &amp;'a <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#225-227' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  70. </div></div><h3 id='impl-From%3CDeviceIdCore%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../../ocl_core/types/abs/struct.DeviceId.html" title="struct ocl_core::types::abs::DeviceId">DeviceIdCore</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3CDeviceIdCore%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#230-234' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-7' class="method"><span id='from.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(device: <a class="struct" href="../../ocl_core/types/abs/struct.DeviceId.html" title="struct ocl_core::types::abs::DeviceId">DeviceIdCore</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#231-233' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  71. </div></div><h3 id='impl-From%3C%26%27a%20DeviceIdCore%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a <a class="struct" href="../../ocl_core/types/abs/struct.DeviceId.html" title="struct ocl_core::types::abs::DeviceId">DeviceIdCore</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3C%26%27a%20DeviceIdCore%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#236-240' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-8' class="method"><span id='from.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(device: &amp;'a <a class="struct" href="../../ocl_core/types/abs/struct.DeviceId.html" title="struct ocl_core::types::abs::DeviceId">DeviceIdCore</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#237-239' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  72. </div></div><h3 id='impl-From%3CDeviceType%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>&gt; for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-From%3CDeviceType%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#242-246' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from-9' class="method"><span id='from.v-9' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(flags: <a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>) -&gt; <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#243-245' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
  73. </div></div></div>
  74. <h2 id='synthetic-implementations' class='small-section-header'>
  75. Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
  76. </h2>
  77. <div id='synthetic-implementations-list'>
  78. <h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></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>&#9166;</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><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "ocl";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>