<!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 `prm` mod in crate `ocl`."> <meta name="keywords" content="rust, rustlang, rust-lang, prm"> <title>ocl::prm - 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 mod"> <!--[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'>Module prm</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>ocl</a></p><script>window.sidebarCurrent = {name: 'prm', ty: 'mod', 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'>Module <a href='../index.html'>ocl</a>::<wbr><a class="mod" href=''>prm</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/lib.rs.html#77-122' title='goto source code'>[src]</a></span></h1> <div class='docblock'><p>OpenCL scalar and vector primitive types.</p> <p>Rust primitives may have subtly different behaviour than OpenCL primitives within kernels. Wrapping is one example of this. Scalar integers within Rust may do overflow checks where in the kernel they do not. Therefore OpenCL-compatible implementations of each of the types are provided so that host and device side operations can be perfectly consistent.</p> <p>The <code>cl_...</code> (<code>cl_uchar</code>, <code>cl_int</code>, <code>cl_float</code>, etc.) types are simple aliases of the Rust built-in primitive types and do <strong>not</strong> behave the same way that the kernel-side equivalents do. The uppercase-named types, on the other hand, (<code>Uchar</code>, <code>Int</code>, <code>Float</code>, etc.) are designed to behave identically to their corresponding types within kernels.</p> <p>Please file an issue if any of the uppercase-named kernel-mimicking types deviate from what they should (as they are reasonably new this is definitely something to watch out for).</p> <p>Vector type fields can be accessed using index operations i.e. [0], [1], [2] ... etc. Plans for other ways of accessing fields (such as <code>.x()</code>, <code>.y()</code>, <code>.s0()</code>, <code>.s15()</code>, etc.) will be considered in the future (pending a number of additions/stabilizations to the Rust language). Create an issue if you have an opinion on the matter.</p> <p>[NOTE]: This module may be renamed.</p> </div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2> <table> <tr class=' module-item'> <td><a class="struct" href="struct.Char.html" title='struct ocl::prm::Char'>Char</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Char2.html" title='struct ocl::prm::Char2'>Char2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Char3.html" title='struct ocl::prm::Char3'>Char3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Char4.html" title='struct ocl::prm::Char4'>Char4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Char8.html" title='struct ocl::prm::Char8'>Char8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Char16.html" title='struct ocl::prm::Char16'>Char16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Double.html" title='struct ocl::prm::Double'>Double</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Double2.html" title='struct ocl::prm::Double2'>Double2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Double3.html" title='struct ocl::prm::Double3'>Double3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Double4.html" title='struct ocl::prm::Double4'>Double4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Double8.html" title='struct ocl::prm::Double8'>Double8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Double16.html" title='struct ocl::prm::Double16'>Double16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Float.html" title='struct ocl::prm::Float'>Float</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Float2.html" title='struct ocl::prm::Float2'>Float2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Float3.html" title='struct ocl::prm::Float3'>Float3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Float4.html" title='struct ocl::prm::Float4'>Float4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Float8.html" title='struct ocl::prm::Float8'>Float8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Float16.html" title='struct ocl::prm::Float16'>Float16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Int.html" title='struct ocl::prm::Int'>Int</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Int2.html" title='struct ocl::prm::Int2'>Int2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Int3.html" title='struct ocl::prm::Int3'>Int3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Int4.html" title='struct ocl::prm::Int4'>Int4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Int8.html" title='struct ocl::prm::Int8'>Int8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Int16.html" title='struct ocl::prm::Int16'>Int16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Long.html" title='struct ocl::prm::Long'>Long</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Long2.html" title='struct ocl::prm::Long2'>Long2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Long3.html" title='struct ocl::prm::Long3'>Long3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Long4.html" title='struct ocl::prm::Long4'>Long4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Long8.html" title='struct ocl::prm::Long8'>Long8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Long16.html" title='struct ocl::prm::Long16'>Long16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Short.html" title='struct ocl::prm::Short'>Short</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Short2.html" title='struct ocl::prm::Short2'>Short2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Short3.html" title='struct ocl::prm::Short3'>Short3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Short4.html" title='struct ocl::prm::Short4'>Short4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Short8.html" title='struct ocl::prm::Short8'>Short8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Short16.html" title='struct ocl::prm::Short16'>Short16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uchar.html" title='struct ocl::prm::Uchar'>Uchar</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uchar2.html" title='struct ocl::prm::Uchar2'>Uchar2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uchar3.html" title='struct ocl::prm::Uchar3'>Uchar3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uchar4.html" title='struct ocl::prm::Uchar4'>Uchar4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uchar8.html" title='struct ocl::prm::Uchar8'>Uchar8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uchar16.html" title='struct ocl::prm::Uchar16'>Uchar16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uint.html" title='struct ocl::prm::Uint'>Uint</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uint2.html" title='struct ocl::prm::Uint2'>Uint2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uint3.html" title='struct ocl::prm::Uint3'>Uint3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uint4.html" title='struct ocl::prm::Uint4'>Uint4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uint8.html" title='struct ocl::prm::Uint8'>Uint8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Uint16.html" title='struct ocl::prm::Uint16'>Uint16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ulong.html" title='struct ocl::prm::Ulong'>Ulong</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ulong2.html" title='struct ocl::prm::Ulong2'>Ulong2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ulong3.html" title='struct ocl::prm::Ulong3'>Ulong3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ulong4.html" title='struct ocl::prm::Ulong4'>Ulong4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ulong8.html" title='struct ocl::prm::Ulong8'>Ulong8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ulong16.html" title='struct ocl::prm::Ulong16'>Ulong16</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ushort.html" title='struct ocl::prm::Ushort'>Ushort</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ushort2.html" title='struct ocl::prm::Ushort2'>Ushort2</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ushort3.html" title='struct ocl::prm::Ushort3'>Ushort3</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ushort4.html" title='struct ocl::prm::Ushort4'>Ushort4</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ushort8.html" title='struct ocl::prm::Ushort8'>Ushort8</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="struct" href="struct.Ushort16.html" title='struct ocl::prm::Ushort16'>Ushort16</a></td> <td class='docblock-short'> </td> </tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2> <table> <tr class=' module-item'> <td><a class="type" href="type.cl_GLenum.html" title='type ocl::prm::cl_GLenum'>cl_GLenum</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_GLint.html" title='type ocl::prm::cl_GLint'>cl_GLint</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_GLuint.html" title='type ocl::prm::cl_GLuint'>cl_GLuint</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_bitfield.html" title='type ocl::prm::cl_bitfield'>cl_bitfield</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_bool.html" title='type ocl::prm::cl_bool'>cl_bool</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_char.html" title='type ocl::prm::cl_char'>cl_char</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_double.html" title='type ocl::prm::cl_double'>cl_double</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_float.html" title='type ocl::prm::cl_float'>cl_float</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_half.html" title='type ocl::prm::cl_half'>cl_half</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_int.html" title='type ocl::prm::cl_int'>cl_int</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_long.html" title='type ocl::prm::cl_long'>cl_long</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_short.html" title='type ocl::prm::cl_short'>cl_short</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_uchar.html" title='type ocl::prm::cl_uchar'>cl_uchar</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_uint.html" title='type ocl::prm::cl_uint'>cl_uint</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_ulong.html" title='type ocl::prm::cl_ulong'>cl_ulong</a></td> <td class='docblock-short'> </td> </tr> <tr class=' module-item'> <td><a class="type" href="type.cl_ushort.html" title='type ocl::prm::cl_ushort'>cl_ushort</a></td> <td class='docblock-short'> </td> </tr></table></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>