You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a feature request than a bug report.
Compiling an arbitrary OpenCL program that uses ocl crate gives the following error while compiling ocl-core on an ARM device (odroid-XU4)
Compiling ocl-core v0.3.0(file:///home/odroid/workspace/ubench_rust/ocl/ocl-core)
ocl/ocl-core/src/functions.rs:1202:85:1202:92 error: the trait bound `std::vec::Vec<*const i8>: std::iter::FromIterator<*const u8>` is not satisfied [E0277]
ocl/ocl-core/src/functions.rs:1202let kern_string_ptrs:Vec<*const i8> = src_strings.iter().map(|cs| cs.as_ptr()).collect();
^~~~~~~
ocl/ocl-core/src/functions.rs:1202:85:1202:92 help: run `rustc --explain E0277` to see a detailed explanation
ocl/ocl-core/src/functions.rs:1202:85:1202:92 note: a collection of type `std::vec::Vec<*const i8>` cannot be built from an iterator over elements of type `*const u8`
ocl/ocl-core/src/functions.rs:1209:9:1209:54 error: mismatched types [E0308]
ocl/ocl-core/src/functions.rs:1209 kern_string_ptrs.as_ptr()as*const*consti8,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ocl/ocl-core/src/functions.rs:1209:9:1209:54 help: run `rustc --explain E0308` to see a detailed explanation
ocl/ocl-core/src/functions.rs:1209:9:1209:54 note: expected type `*const*const u8`
ocl/ocl-core/src/functions.rs:1209:9:1209:54 note: found type `*const*const i8`
ocl/ocl-core/src/functions.rs:1317:9:1317:38 error: mismatched types [E0308]
ocl/ocl-core/src/functions.rs:1317 options.as_ptr()as*consti8,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ocl/ocl-core/src/functions.rs:1317:9:1317:38 help: run `rustc --explain E0308` to see a detailed explanation
ocl/ocl-core/src/functions.rs:1317:9:1317:38 note: expected type `*const u8`
ocl/ocl-core/src/functions.rs:1317:9:1317:38 note: found type `*const i8`
error: aborting due to 3 previous errors
error:Could not compile `ocl-core`.
This is not due to bug in your code, but because the rust nightly is not entirely supported for arm. Check this issue here.
The fix I found with some google-fu is to use *const _ instead of *const i8 at these locations. I can confirm this solution compiles fine on ARM and on my laptop (x86_64).
I'll anyway send you a PR soon that fixes this issue. Could you wrap it in a feature and push it upstream?
The text was updated successfully, but these errors were encountered:
I consider small machines like your 'odroid' to be extremely important to the future of parallel computing. I want to make sure that this library not only supports them, but makes it as easy as possible to develop on them.
This is more of a feature request than a bug report.
Compiling an arbitrary OpenCL program that uses ocl crate gives the following error while compiling ocl-core on an ARM device (odroid-XU4)
This is not due to bug in your code, but because the rust nightly is not entirely supported for arm. Check this issue here.
The fix I found with some google-fu is to use
*const _
instead of*const i8
at these locations. I can confirm this solution compiles fine on ARM and on my laptop (x86_64).I'll anyway send you a PR soon that fixes this issue. Could you wrap it in a feature and push it upstream?
The text was updated successfully, but these errors were encountered: