index.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 `ocl_core_vector` crate."><meta name="keywords" content="rust, rustlang, rust-lang, ocl_core_vector"><title>ocl_core_vector - 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 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">&#9776;</div><p class='location'>Crate ocl_core_vector</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'ocl_core_vector', ty: 'mod', relpath: '../'};</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'>Crate <a class="mod" href=''>ocl_core_vector</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_core_vector/lib.rs.html#1-41' title='goto source code'>[src]</a></span></h1><div class='docblock'><p>OpenCL scalar and vector primitive types.</p>
  2. <p>Primitives may have subtly different behaviour within Rust as they do
  3. within kernels. Wrapping is one example of this. Scalar integers
  4. within Rust may do overflow checks where in the kernel they do not.
  5. Therefore two slightly different implementations of the scalar types
  6. are provided in addition to a corresponding vector type for each.</p>
  7. <p>The <code>cl_...</code> (<code>cl_uchar</code>, <code>cl_int</code>, <code>cl_float</code>, etc.) types found in the
  8. main <code>ocl-core</code> library are simple aliases of the Rust built-in primitive
  9. types and therefore always behave exactly the same way. The
  10. uppercase-named types (<code>Uchar</code>, <code>Int</code>, <code>Float</code>, etc.) are designed to
  11. behave identically to their corresponding types within kernels.</p>
  12. <p>Please file an issue if any of the uppercase-named kernel-mimicking
  13. types deviate from what they should (as they are reasonably new this
  14. is definitely something to watch out for).</p>
  15. <p>Vector type fields can be accessed using index operations i.e. [0],
  16. [1], [2] ... etc. Plans for other ways of accessing fields (such as
  17. <code>.x()</code>, <code>.y()</code>, <code>.s0()</code>, <code>.s15()</code>, etc.) may be considered. Create an
  18. issue if you have an opinion on the matter.</p>
  19. <p>[NOTE]: This module may be renamed.</p>
  20. </div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
  21. <table>
  22. <tr class=' module-item'>
  23. <td><a class="struct" href="struct.Char.html"
  24. title='struct ocl_core_vector::Char'>Char</a></td>
  25. <td class='docblock-short'>
  26. </td>
  27. </tr>
  28. <tr class=' module-item'>
  29. <td><a class="struct" href="struct.Char2.html"
  30. title='struct ocl_core_vector::Char2'>Char2</a></td>
  31. <td class='docblock-short'>
  32. </td>
  33. </tr>
  34. <tr class=' module-item'>
  35. <td><a class="struct" href="struct.Char3.html"
  36. title='struct ocl_core_vector::Char3'>Char3</a></td>
  37. <td class='docblock-short'>
  38. </td>
  39. </tr>
  40. <tr class=' module-item'>
  41. <td><a class="struct" href="struct.Char4.html"
  42. title='struct ocl_core_vector::Char4'>Char4</a></td>
  43. <td class='docblock-short'>
  44. </td>
  45. </tr>
  46. <tr class=' module-item'>
  47. <td><a class="struct" href="struct.Char8.html"
  48. title='struct ocl_core_vector::Char8'>Char8</a></td>
  49. <td class='docblock-short'>
  50. </td>
  51. </tr>
  52. <tr class=' module-item'>
  53. <td><a class="struct" href="struct.Char16.html"
  54. title='struct ocl_core_vector::Char16'>Char16</a></td>
  55. <td class='docblock-short'>
  56. </td>
  57. </tr>
  58. <tr class=' module-item'>
  59. <td><a class="struct" href="struct.Double.html"
  60. title='struct ocl_core_vector::Double'>Double</a></td>
  61. <td class='docblock-short'>
  62. </td>
  63. </tr>
  64. <tr class=' module-item'>
  65. <td><a class="struct" href="struct.Double2.html"
  66. title='struct ocl_core_vector::Double2'>Double2</a></td>
  67. <td class='docblock-short'>
  68. </td>
  69. </tr>
  70. <tr class=' module-item'>
  71. <td><a class="struct" href="struct.Double3.html"
  72. title='struct ocl_core_vector::Double3'>Double3</a></td>
  73. <td class='docblock-short'>
  74. </td>
  75. </tr>
  76. <tr class=' module-item'>
  77. <td><a class="struct" href="struct.Double4.html"
  78. title='struct ocl_core_vector::Double4'>Double4</a></td>
  79. <td class='docblock-short'>
  80. </td>
  81. </tr>
  82. <tr class=' module-item'>
  83. <td><a class="struct" href="struct.Double8.html"
  84. title='struct ocl_core_vector::Double8'>Double8</a></td>
  85. <td class='docblock-short'>
  86. </td>
  87. </tr>
  88. <tr class=' module-item'>
  89. <td><a class="struct" href="struct.Double16.html"
  90. title='struct ocl_core_vector::Double16'>Double16</a></td>
  91. <td class='docblock-short'>
  92. </td>
  93. </tr>
  94. <tr class=' module-item'>
  95. <td><a class="struct" href="struct.Float.html"
  96. title='struct ocl_core_vector::Float'>Float</a></td>
  97. <td class='docblock-short'>
  98. </td>
  99. </tr>
  100. <tr class=' module-item'>
  101. <td><a class="struct" href="struct.Float2.html"
  102. title='struct ocl_core_vector::Float2'>Float2</a></td>
  103. <td class='docblock-short'>
  104. </td>
  105. </tr>
  106. <tr class=' module-item'>
  107. <td><a class="struct" href="struct.Float3.html"
  108. title='struct ocl_core_vector::Float3'>Float3</a></td>
  109. <td class='docblock-short'>
  110. </td>
  111. </tr>
  112. <tr class=' module-item'>
  113. <td><a class="struct" href="struct.Float4.html"
  114. title='struct ocl_core_vector::Float4'>Float4</a></td>
  115. <td class='docblock-short'>
  116. </td>
  117. </tr>
  118. <tr class=' module-item'>
  119. <td><a class="struct" href="struct.Float8.html"
  120. title='struct ocl_core_vector::Float8'>Float8</a></td>
  121. <td class='docblock-short'>
  122. </td>
  123. </tr>
  124. <tr class=' module-item'>
  125. <td><a class="struct" href="struct.Float16.html"
  126. title='struct ocl_core_vector::Float16'>Float16</a></td>
  127. <td class='docblock-short'>
  128. </td>
  129. </tr>
  130. <tr class=' module-item'>
  131. <td><a class="struct" href="struct.Int.html"
  132. title='struct ocl_core_vector::Int'>Int</a></td>
  133. <td class='docblock-short'>
  134. </td>
  135. </tr>
  136. <tr class=' module-item'>
  137. <td><a class="struct" href="struct.Int2.html"
  138. title='struct ocl_core_vector::Int2'>Int2</a></td>
  139. <td class='docblock-short'>
  140. </td>
  141. </tr>
  142. <tr class=' module-item'>
  143. <td><a class="struct" href="struct.Int3.html"
  144. title='struct ocl_core_vector::Int3'>Int3</a></td>
  145. <td class='docblock-short'>
  146. </td>
  147. </tr>
  148. <tr class=' module-item'>
  149. <td><a class="struct" href="struct.Int4.html"
  150. title='struct ocl_core_vector::Int4'>Int4</a></td>
  151. <td class='docblock-short'>
  152. </td>
  153. </tr>
  154. <tr class=' module-item'>
  155. <td><a class="struct" href="struct.Int8.html"
  156. title='struct ocl_core_vector::Int8'>Int8</a></td>
  157. <td class='docblock-short'>
  158. </td>
  159. </tr>
  160. <tr class=' module-item'>
  161. <td><a class="struct" href="struct.Int16.html"
  162. title='struct ocl_core_vector::Int16'>Int16</a></td>
  163. <td class='docblock-short'>
  164. </td>
  165. </tr>
  166. <tr class=' module-item'>
  167. <td><a class="struct" href="struct.Long.html"
  168. title='struct ocl_core_vector::Long'>Long</a></td>
  169. <td class='docblock-short'>
  170. </td>
  171. </tr>
  172. <tr class=' module-item'>
  173. <td><a class="struct" href="struct.Long2.html"
  174. title='struct ocl_core_vector::Long2'>Long2</a></td>
  175. <td class='docblock-short'>
  176. </td>
  177. </tr>
  178. <tr class=' module-item'>
  179. <td><a class="struct" href="struct.Long3.html"
  180. title='struct ocl_core_vector::Long3'>Long3</a></td>
  181. <td class='docblock-short'>
  182. </td>
  183. </tr>
  184. <tr class=' module-item'>
  185. <td><a class="struct" href="struct.Long4.html"
  186. title='struct ocl_core_vector::Long4'>Long4</a></td>
  187. <td class='docblock-short'>
  188. </td>
  189. </tr>
  190. <tr class=' module-item'>
  191. <td><a class="struct" href="struct.Long8.html"
  192. title='struct ocl_core_vector::Long8'>Long8</a></td>
  193. <td class='docblock-short'>
  194. </td>
  195. </tr>
  196. <tr class=' module-item'>
  197. <td><a class="struct" href="struct.Long16.html"
  198. title='struct ocl_core_vector::Long16'>Long16</a></td>
  199. <td class='docblock-short'>
  200. </td>
  201. </tr>
  202. <tr class=' module-item'>
  203. <td><a class="struct" href="struct.Short.html"
  204. title='struct ocl_core_vector::Short'>Short</a></td>
  205. <td class='docblock-short'>
  206. </td>
  207. </tr>
  208. <tr class=' module-item'>
  209. <td><a class="struct" href="struct.Short2.html"
  210. title='struct ocl_core_vector::Short2'>Short2</a></td>
  211. <td class='docblock-short'>
  212. </td>
  213. </tr>
  214. <tr class=' module-item'>
  215. <td><a class="struct" href="struct.Short3.html"
  216. title='struct ocl_core_vector::Short3'>Short3</a></td>
  217. <td class='docblock-short'>
  218. </td>
  219. </tr>
  220. <tr class=' module-item'>
  221. <td><a class="struct" href="struct.Short4.html"
  222. title='struct ocl_core_vector::Short4'>Short4</a></td>
  223. <td class='docblock-short'>
  224. </td>
  225. </tr>
  226. <tr class=' module-item'>
  227. <td><a class="struct" href="struct.Short8.html"
  228. title='struct ocl_core_vector::Short8'>Short8</a></td>
  229. <td class='docblock-short'>
  230. </td>
  231. </tr>
  232. <tr class=' module-item'>
  233. <td><a class="struct" href="struct.Short16.html"
  234. title='struct ocl_core_vector::Short16'>Short16</a></td>
  235. <td class='docblock-short'>
  236. </td>
  237. </tr>
  238. <tr class=' module-item'>
  239. <td><a class="struct" href="struct.Uchar.html"
  240. title='struct ocl_core_vector::Uchar'>Uchar</a></td>
  241. <td class='docblock-short'>
  242. </td>
  243. </tr>
  244. <tr class=' module-item'>
  245. <td><a class="struct" href="struct.Uchar2.html"
  246. title='struct ocl_core_vector::Uchar2'>Uchar2</a></td>
  247. <td class='docblock-short'>
  248. </td>
  249. </tr>
  250. <tr class=' module-item'>
  251. <td><a class="struct" href="struct.Uchar3.html"
  252. title='struct ocl_core_vector::Uchar3'>Uchar3</a></td>
  253. <td class='docblock-short'>
  254. </td>
  255. </tr>
  256. <tr class=' module-item'>
  257. <td><a class="struct" href="struct.Uchar4.html"
  258. title='struct ocl_core_vector::Uchar4'>Uchar4</a></td>
  259. <td class='docblock-short'>
  260. </td>
  261. </tr>
  262. <tr class=' module-item'>
  263. <td><a class="struct" href="struct.Uchar8.html"
  264. title='struct ocl_core_vector::Uchar8'>Uchar8</a></td>
  265. <td class='docblock-short'>
  266. </td>
  267. </tr>
  268. <tr class=' module-item'>
  269. <td><a class="struct" href="struct.Uchar16.html"
  270. title='struct ocl_core_vector::Uchar16'>Uchar16</a></td>
  271. <td class='docblock-short'>
  272. </td>
  273. </tr>
  274. <tr class=' module-item'>
  275. <td><a class="struct" href="struct.Uint.html"
  276. title='struct ocl_core_vector::Uint'>Uint</a></td>
  277. <td class='docblock-short'>
  278. </td>
  279. </tr>
  280. <tr class=' module-item'>
  281. <td><a class="struct" href="struct.Uint2.html"
  282. title='struct ocl_core_vector::Uint2'>Uint2</a></td>
  283. <td class='docblock-short'>
  284. </td>
  285. </tr>
  286. <tr class=' module-item'>
  287. <td><a class="struct" href="struct.Uint3.html"
  288. title='struct ocl_core_vector::Uint3'>Uint3</a></td>
  289. <td class='docblock-short'>
  290. </td>
  291. </tr>
  292. <tr class=' module-item'>
  293. <td><a class="struct" href="struct.Uint4.html"
  294. title='struct ocl_core_vector::Uint4'>Uint4</a></td>
  295. <td class='docblock-short'>
  296. </td>
  297. </tr>
  298. <tr class=' module-item'>
  299. <td><a class="struct" href="struct.Uint8.html"
  300. title='struct ocl_core_vector::Uint8'>Uint8</a></td>
  301. <td class='docblock-short'>
  302. </td>
  303. </tr>
  304. <tr class=' module-item'>
  305. <td><a class="struct" href="struct.Uint16.html"
  306. title='struct ocl_core_vector::Uint16'>Uint16</a></td>
  307. <td class='docblock-short'>
  308. </td>
  309. </tr>
  310. <tr class=' module-item'>
  311. <td><a class="struct" href="struct.Ulong.html"
  312. title='struct ocl_core_vector::Ulong'>Ulong</a></td>
  313. <td class='docblock-short'>
  314. </td>
  315. </tr>
  316. <tr class=' module-item'>
  317. <td><a class="struct" href="struct.Ulong2.html"
  318. title='struct ocl_core_vector::Ulong2'>Ulong2</a></td>
  319. <td class='docblock-short'>
  320. </td>
  321. </tr>
  322. <tr class=' module-item'>
  323. <td><a class="struct" href="struct.Ulong3.html"
  324. title='struct ocl_core_vector::Ulong3'>Ulong3</a></td>
  325. <td class='docblock-short'>
  326. </td>
  327. </tr>
  328. <tr class=' module-item'>
  329. <td><a class="struct" href="struct.Ulong4.html"
  330. title='struct ocl_core_vector::Ulong4'>Ulong4</a></td>
  331. <td class='docblock-short'>
  332. </td>
  333. </tr>
  334. <tr class=' module-item'>
  335. <td><a class="struct" href="struct.Ulong8.html"
  336. title='struct ocl_core_vector::Ulong8'>Ulong8</a></td>
  337. <td class='docblock-short'>
  338. </td>
  339. </tr>
  340. <tr class=' module-item'>
  341. <td><a class="struct" href="struct.Ulong16.html"
  342. title='struct ocl_core_vector::Ulong16'>Ulong16</a></td>
  343. <td class='docblock-short'>
  344. </td>
  345. </tr>
  346. <tr class=' module-item'>
  347. <td><a class="struct" href="struct.Ushort.html"
  348. title='struct ocl_core_vector::Ushort'>Ushort</a></td>
  349. <td class='docblock-short'>
  350. </td>
  351. </tr>
  352. <tr class=' module-item'>
  353. <td><a class="struct" href="struct.Ushort2.html"
  354. title='struct ocl_core_vector::Ushort2'>Ushort2</a></td>
  355. <td class='docblock-short'>
  356. </td>
  357. </tr>
  358. <tr class=' module-item'>
  359. <td><a class="struct" href="struct.Ushort3.html"
  360. title='struct ocl_core_vector::Ushort3'>Ushort3</a></td>
  361. <td class='docblock-short'>
  362. </td>
  363. </tr>
  364. <tr class=' module-item'>
  365. <td><a class="struct" href="struct.Ushort4.html"
  366. title='struct ocl_core_vector::Ushort4'>Ushort4</a></td>
  367. <td class='docblock-short'>
  368. </td>
  369. </tr>
  370. <tr class=' module-item'>
  371. <td><a class="struct" href="struct.Ushort8.html"
  372. title='struct ocl_core_vector::Ushort8'>Ushort8</a></td>
  373. <td class='docblock-short'>
  374. </td>
  375. </tr>
  376. <tr class=' module-item'>
  377. <td><a class="struct" href="struct.Ushort16.html"
  378. title='struct ocl_core_vector::Ushort16'>Ushort16</a></td>
  379. <td class='docblock-short'>
  380. </td>
  381. </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>&#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_core_vector";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>