#opencl #vector

ocl-core-vector

OpenCL-compatible vector primitive types

1 unstable release

Uses old Rust 2015

0.1.0 Apr 11, 2017

#33 in #opencl

Download history 1333/week @ 2021-06-27 1121/week @ 2021-07-04 1101/week @ 2021-07-11 1114/week @ 2021-07-18 998/week @ 2021-07-25 964/week @ 2021-08-01 981/week @ 2021-08-08 837/week @ 2021-08-15 714/week @ 2021-08-22 702/week @ 2021-08-29 721/week @ 2021-09-05 731/week @ 2021-09-12 561/week @ 2021-09-19 553/week @ 2021-09-26 315/week @ 2021-10-03 280/week @ 2021-10-10

6,289 downloads per month
Used in 41 crates (2 directly)

MIT/Apache

41KB
651 lines

ocl-core-vector

OpenCL-compatible vector primitive types.

TODO

Easy interoperability with ndarray.


lib.rs:

OpenCL scalar and vector primitive types.

Primitives may have subtly different behaviour within Rust as they do within kernels. Wrapping is one example of this. Scalar integers within Rust may do overflow checks where in the kernel they do not. Therefore two slightly different implementations of the scalar types are provided in addition to a corresponding vector type for each.

The cl_... (cl_uchar, cl_int, cl_float, etc.) types found in the main ocl-core library are simple aliases of the Rust built-in primitive types and therefore always behave exactly the same way. The uppercase-named types (Uchar, Int, Float, etc.) are designed to behave identically to their corresponding types within kernels.

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).

Vector type fields can be accessed using index operations i.e. [0], [1], [2] ... etc. Plans for other ways of accessing fields (such as .x(), .y(), .s0(), .s15(), etc.) may be considered. Create an issue if you have an opinion on the matter.

[NOTE]: This module may be renamed.

Dependencies

~215KB