enum.DeviceSpecifier.html 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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 `DeviceSpecifier` enum in crate `ocl`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, DeviceSpecifier">
  9. <title>ocl::enums::DeviceSpecifier - 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 enum">
  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'>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></div><p class='location'><a href='../index.html'>ocl</a>::<wbr><a href='index.html'>enums</a></p><script>window.sidebarCurrent = {name: 'DeviceSpecifier', ty: 'enum', 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'>Enum <a href='../index.html'>ocl</a>::<wbr><a href='index.html'>enums</a>::<wbr><a class="enum" href=''>DeviceSpecifier</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/device.rs.html#67-75' title='goto source code'>[src]</a></span></h1>
  50. <pre class='rust enum'>pub enum DeviceSpecifier {
  51. All,
  52. First,
  53. Single(<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>),
  54. 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;),
  55. 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;),
  56. 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;),
  57. TypeFlags(<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>),
  58. }</pre><div class='docblock'><p>Specifies [what boils down to] a list of devices.</p>
  59. <p>The <code>Indices</code> variant is context-specific, not robust, and may lead to a
  60. panic if the context changes. It is useful for convenience only and not
  61. recommended for general use. The <code>WrappingIndices</code> variant is somewhat
  62. less dangerous but can still be somewhat machine-specific.</p>
  63. <p>The <code>TypeFlags</code> variant is used for specifying a list of devices using a
  64. bitfield (<code>DeviceType</code>) and is the most robust / portable.</p>
  65. <p>[FIXME: Add some links to the SDK]</p>
  66. </div><h2 id='variants' class='variants small-section-header'>
  67. Variants<a href='#variants' class='anchor'></a></h2>
  68. <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>
  69. <h2 id='methods' class='small-section-header'>
  70. Methods<a href='#methods' class='anchor'></a>
  71. </h2>
  72. <h3 id='impl' class='impl'><span class='in-band'><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><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></h3>
  73. <div class='impl-items'><h4 id='method.all' class="method"><span id='all.v' class='invisible'><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><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></span></h4>
  74. <div class='docblock'><p>Returns a <code>DeviceSpecifier::All</code> variant which specifies all
  75. devices on a platform.</p>
  76. </div><h4 id='method.first' class="method"><span id='first.v' class='invisible'><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><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></span></h4>
  77. <div class='docblock'><p>Returns a <code>DeviceSpecifier::First</code> variant which specifies only
  78. the first device on a platform.</p>
  79. </div><h4 id='method.single' class="method"><span id='single.v' class='invisible'><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><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></span></h4>
  80. <div class='docblock'><p>Returns a <code>DeviceSpecifier::Single</code> variant which specifies a single
  81. device.</p>
  82. </div><h4 id='method.list' class="method"><span id='list.v' class='invisible'><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><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></span></h4>
  83. <div class='docblock'><p>Returns a <code>DeviceSpecifier::List</code> variant which specifies a list of
  84. devices.</p>
  85. </div><h4 id='method.indices' class="method"><span id='indices.v' class='invisible'><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><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></span></h4>
  86. <div class='docblock'><p>Returns a <code>DeviceSpecifier::Indices</code> variant which specifies a list of
  87. devices by index.</p>
  88. <h3 id="safety" class="section-header"><a href="#safety">Safety</a></h3>
  89. <p>This variant is context-specific, not robust, and may lead to a panic
  90. if the context changes. It is useful for convenience only and not
  91. recommended for general use.</p>
  92. <p>Though using the <code>Indices</code> variant is not strictly unsafe in the usual
  93. way (will not lead to memory bugs, etc.), it is marked unsafe as a
  94. warning. Recommendations for a more idiomatic way to express this
  95. potential footgun are welcome.</p>
  96. <p>Using <code>::wrapping_indices</code> is a more robust (but still potentially
  97. non-portable) solution.</p>
  98. </div><h4 id='method.wrapping_indices' class="method"><span id='wrapping_indices.v' class='invisible'><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><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></span></h4>
  99. <div class='docblock'><p>Returns a <code>DeviceSpecifier::WrappingIndices</code> variant, specifying a
  100. list of devices by indices which are wrapped around (simply using the
  101. modulo operator) so that every index is always valid.</p>
  102. </div><h4 id='method.type_flags' class="method"><span id='type_flags.v' class='invisible'><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><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></span></h4>
  103. <div class='docblock'><p>Returns a <code>DeviceSpecifier::TypeFlags</code> variant which specifies a list
  104. of devices using a conventional bitfield.</p>
  105. </div><h4 id='method.to_device_list' class="method"><span id='to_device_list.v' class='invisible'><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><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></span></h4>
  106. <div class='docblock'><p>Returns the list of devices matching the parameters specified by this
  107. <code>DeviceSpecifier</code></p>
  108. <h3 id="panics" class="section-header"><a href="#panics">Panics</a></h3>
  109. <p>Any device indices listed within the <code>Indices</code> variant must be within
  110. the range of the number of devices for the platform specified by
  111. <code>Platform</code>. If no <code>platform</code> has been specified, this behaviour is
  112. undefined and could end up using any platform at all.</p>
  113. </div></div>
  114. <h2 id='implementations' class='small-section-header'>
  115. Trait Implementations<a href='#implementations' class='anchor'></a>
  116. </h2>
  117. <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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</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/device.rs.html#66' title='goto source code'>[src]</a></span></h3>
  118. <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/device.rs.html#66' title='goto source code'>[src]</a></span></h4>
  119. <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>
  120. </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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</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/device.rs.html#66' title='goto source code'>[src]</a></span></h3>
  121. <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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><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></h4>
  122. <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>
  123. </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>
  124. <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>
  125. </div></div><h3 id='impl-Default' class='impl'><span class='in-band'><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><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></h3>
  126. <div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><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><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></span></h4>
  127. <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>
  128. </div></div><h3 id='impl-From%3Cusize%3E' class='impl'><span class='in-band'><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><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></h3>
  129. <div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><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><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></span></h4>
  130. <div class='docblock'><p>Performs the conversion.</p>
  131. </div></div><h3 id='impl-From%3C%26%27a%20%5Busize%5D%3E' class='impl'><span class='in-band'><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><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></h3>
  132. <div class='impl-items'><h4 id='method.from-1' class="method"><span id='from.v-1' class='invisible'><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><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></span></h4>
  133. <div class='docblock'><p>Performs the conversion.</p>
  134. </div></div><h3 id='impl-From%3C%26%27a%20Vec%3Cusize%3E%3E' class='impl'><span class='in-band'><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><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></h3>
  135. <div class='impl-items'><h4 id='method.from-2' class="method"><span id='from.v-2' class='invisible'><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><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></span></h4>
  136. <div class='docblock'><p>Performs the conversion.</p>
  137. </div></div><h3 id='impl-From%3C%26%27a%20%5BDevice%5D%3E' class='impl'><span class='in-band'><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><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></h3>
  138. <div class='impl-items'><h4 id='method.from-3' class="method"><span id='from.v-3' class='invisible'><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><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></span></h4>
  139. <div class='docblock'><p>Performs the conversion.</p>
  140. </div></div><h3 id='impl-From%3C%26%27a%20Vec%3CDevice%3E%3E' class='impl'><span class='in-band'><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><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></h3>
  141. <div class='impl-items'><h4 id='method.from-4' class="method"><span id='from.v-4' class='invisible'><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><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></span></h4>
  142. <div class='docblock'><p>Performs the conversion.</p>
  143. </div></div><h3 id='impl-From%3CDevice%3E' class='impl'><span class='in-band'><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><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></h3>
  144. <div class='impl-items'><h4 id='method.from-5' class="method"><span id='from.v-5' class='invisible'><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><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></span></h4>
  145. <div class='docblock'><p>Performs the conversion.</p>
  146. </div></div><h3 id='impl-From%3C%26%27a%20Device%3E' class='impl'><span class='in-band'><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><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></h3>
  147. <div class='impl-items'><h4 id='method.from-6' class="method"><span id='from.v-6' class='invisible'><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><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></span></h4>
  148. <div class='docblock'><p>Performs the conversion.</p>
  149. </div></div><h3 id='impl-From%3CDeviceIdCore%3E' class='impl'><span class='in-band'><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><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></h3>
  150. <div class='impl-items'><h4 id='method.from-7' class="method"><span id='from.v-7' class='invisible'><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><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></span></h4>
  151. <div class='docblock'><p>Performs the conversion.</p>
  152. </div></div><h3 id='impl-From%3C%26%27a%20DeviceIdCore%3E' class='impl'><span class='in-band'><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><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></h3>
  153. <div class='impl-items'><h4 id='method.from-8' class="method"><span id='from.v-8' class='invisible'><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><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></span></h4>
  154. <div class='docblock'><p>Performs the conversion.</p>
  155. </div></div><h3 id='impl-From%3CDeviceType%3E' class='impl'><span class='in-band'><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><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></h3>
  156. <div class='impl-items'><h4 id='method.from-9' class="method"><span id='from.v-9' class='invisible'><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><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></span></h4>
  157. <div class='docblock'><p>Performs the conversion.</p>
  158. </div></div></section>
  159. <section id='search' class="content hidden"></section>
  160. <section class="footer"></section>
  161. <aside id="help" class="hidden">
  162. <div>
  163. <h1 class="hidden">Help</h1>
  164. <div class="shortcuts">
  165. <h2>Keyboard Shortcuts</h2>
  166. <dl>
  167. <dt><kbd>?</kbd></dt>
  168. <dd>Show this help dialog</dd>
  169. <dt><kbd>S</kbd></dt>
  170. <dd>Focus the search field</dd>
  171. <dt><kbd>↑</kbd></dt>
  172. <dd>Move up in search results</dd>
  173. <dt><kbd>↓</kbd></dt>
  174. <dd>Move down in search results</dd>
  175. <dt><kbd>↹</kbd></dt>
  176. <dd>Switch tab</dd>
  177. <dt><kbd>&#9166;</kbd></dt>
  178. <dd>Go to active search result</dd>
  179. <dt><kbd>+</kbd></dt>
  180. <dd>Expand all sections</dd>
  181. <dt><kbd>-</kbd></dt>
  182. <dd>Collapse all sections</dd>
  183. </dl>
  184. </div>
  185. <div class="infos">
  186. <h2>Search Tricks</h2>
  187. <p>
  188. Prefix searches with a type followed by a colon (e.g.
  189. <code>fn:</code>) to restrict the search to a given type.
  190. </p>
  191. <p>
  192. Accepted types are: <code>fn</code>, <code>mod</code>,
  193. <code>struct</code>, <code>enum</code>,
  194. <code>trait</code>, <code>type</code>, <code>macro</code>,
  195. and <code>const</code>.
  196. </p>
  197. <p>
  198. Search functions by type signature (e.g.
  199. <code>vec -> usize</code> or <code>* -> vec</code>)
  200. </p>
  201. </div>
  202. </div>
  203. </aside>
  204. <script>
  205. window.rootPath = "../../";
  206. window.currentCrate = "ocl";
  207. </script>
  208. <script src="../../main.js"></script>
  209. <script defer src="../../search-index.js"></script>
  210. </body>
  211. </html>