File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,24 @@ pub trait FitsIntoDeviceRegister: private::FitsIntoDeviceRegister {}
2
2
impl < T : private:: FitsIntoDeviceRegister > FitsIntoDeviceRegister for T { }
3
3
4
4
mod private {
5
+ #[ marker]
5
6
pub trait FitsIntoDeviceRegister { }
6
7
impl < T > FitsIntoDeviceRegister for T where
7
8
AssertTypeFitsInto64Bits < { TypeSize :: check :: < T > ( ) } > : FitsInto64Bits
8
9
{
9
10
}
10
11
12
+ // Since T: Sized, the pointers are thin, and must thus fit into device
13
+ // registers
14
+ impl < ' r , T : rustacuda_core:: DeviceCopy + ' r > FitsIntoDeviceRegister
15
+ for crate :: common:: DeviceConstRef < ' r , T >
16
+ {
17
+ }
18
+ impl < ' r , T : rustacuda_core:: DeviceCopy + ' r > FitsIntoDeviceRegister
19
+ for crate :: common:: DeviceMutRef < ' r , T >
20
+ {
21
+ }
22
+
11
23
#[ derive( PartialEq , Eq ) ]
12
24
pub enum TypeSize {
13
25
TypeFitsInto64Bits ,
You can’t perform that action at this time.
0 commit comments