Closed LutzCle closed 5 years ago
Huh, I didn't know about that. Useful to know, when you're writing a C-interop library. Thanks for the pull request (and thanks for your patience).
Yeah, I didn't know either, until it didn't compile. The rest of RustaCUDA seems solid so far, though. Thanks for the merge :-)
RustaCUDA currently doesn't compile on PPC64 architecture. The reason is that, according to the Rust documentation,
std::os::raw::c_char
can be defined in one of two ways: either asi8
, or asu8
.Coincidentally, x86_64 defines it as
i8
, whereas PPC64 defines it asu8
. This difference breaks the type cast indevice::Device::name
.Casting to
c_char
instead ofi8
solves the problem. With this fix, RustaCUDA compiles on PPC64.