Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::error::{CudaResult, ToResult};
use cuda_driver_sys::*;
use std::ffi::CStr;
use std::ops::Range;
use std::os::raw::c_char;

/// All supported device attributes for [Device::get_attribute](struct.Device.html#method.get_attribute)
#[repr(u32)]
Expand Down Expand Up @@ -373,7 +374,7 @@ impl Device {
/// ```
pub fn uuid(self) -> CudaResult<[u8; 16]> {
unsafe {
let mut cu_uuid = CUuuid { bytes: [0i8; 16] };
let mut cu_uuid = CUuuid { bytes: [0 as c_char; 16] };
cuDeviceGetUuid(&mut cu_uuid, self.device).to_result()?;
let uuid: [u8; 16] = ::std::mem::transmute(cu_uuid.bytes);
Ok(uuid)
Expand Down