diff --git a/rustacuda_core/src/memory/mod.rs b/rustacuda_core/src/memory/mod.rs index 02e6e2b..c4a0bd6 100644 --- a/rustacuda_core/src/memory/mod.rs +++ b/rustacuda_core/src/memory/mod.rs @@ -87,20 +87,8 @@ unsafe impl DeviceCopy for Result {} unsafe impl DeviceCopy for PhantomData {} unsafe impl DeviceCopy for Wrapping {} -macro_rules! impl_device_copy_array { - ($($n:expr)*) => { - $( - unsafe impl DeviceCopy for [T;$ n] {} - )* - } -} +unsafe impl DeviceCopy for [T; N] {} -impl_device_copy_array! { - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 -} unsafe impl DeviceCopy for () {} unsafe impl DeviceCopy for (A, B) {} unsafe impl DeviceCopy for (A, B, C) {} diff --git a/src/device.rs b/src/device.rs index b30796c..5b803db 100644 --- a/src/device.rs +++ b/src/device.rs @@ -373,7 +373,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; 16] }; cuDeviceGetUuid(&mut cu_uuid, self.device).to_result()?; let uuid: [u8; 16] = ::std::mem::transmute(cu_uuid.bytes); Ok(uuid)