Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly loosen DeviceCopy bounds #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 3 additions & 1 deletion rustacuda_core/src/memory/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod pointer;
pub use self::pointer::*;

use core::cell::UnsafeCell;
use core::marker::PhantomData;
use core::num::*;

Expand Down Expand Up @@ -84,8 +85,9 @@ impl_device_copy!(
);
unsafe impl<T: DeviceCopy> DeviceCopy for Option<T> {}
unsafe impl<L: DeviceCopy, R: DeviceCopy> DeviceCopy for Result<L, R> {}
unsafe impl<T: ?Sized + DeviceCopy> DeviceCopy for PhantomData<T> {}
unsafe impl<T: ?Sized> DeviceCopy for PhantomData<T> {}
unsafe impl<T: DeviceCopy> DeviceCopy for Wrapping<T> {}
unsafe impl<T: DeviceCopy + ?Sized> DeviceCopy for UnsafeCell<T> {}

macro_rules! impl_device_copy_array {
($($n:expr)*) => {
Expand Down