luqmana / rust-opencl

OpenCL bindings for Rust.
Other
170 stars 42 forks source link

device_type is not human readable #82

Closed sevagh closed 7 years ago

sevagh commented 8 years ago

I get this kind of output from opencl::hl::Device.device_type(): 

sevagh commented 8 years ago

I did some digging to try to make a patch for it. The problem is that cl_device_type, in cl.rs, is defined as a bitfield, and in hl.rs (https://github.com/luqmana/rust-opencl/blob/master/src/hl.rs#L93) the bitfield is put into String::from_utf8_unchecked