@@ -71,10 +71,19 @@ impl<
71
71
> CudaKernelParameter for PerThreadShallowCopy < T >
72
72
{
73
73
#[ cfg( feature = "host" ) ]
74
- type AsyncHostType < ' stream , ' b > = T where Self : ' b ;
74
+ type AsyncHostType < ' stream , ' b >
75
+ = T
76
+ where
77
+ Self : ' b ;
75
78
#[ cfg( any( feature = "device" , doc) ) ]
76
- type DeviceType < ' b > = T where Self : ' b ;
77
- type FfiType < ' stream , ' b > = crate :: utils:: adapter:: RustToCudaWithPortableBitCopySemantics < T > where Self : ' b ;
79
+ type DeviceType < ' b >
80
+ = T
81
+ where
82
+ Self : ' b ;
83
+ type FfiType < ' stream , ' b >
84
+ = crate :: utils:: adapter:: RustToCudaWithPortableBitCopySemantics < T >
85
+ where
86
+ Self : ' b ;
78
87
#[ cfg( feature = "host" ) ]
79
88
type SyncHostType = T ;
80
89
@@ -154,14 +163,19 @@ impl<
154
163
> CudaKernelParameter for & ' a PerThreadShallowCopy < T >
155
164
{
156
165
#[ cfg( feature = "host" ) ]
157
- type AsyncHostType < ' stream , ' b > = crate :: utils:: r#async:: AsyncProj <
158
- ' b ,
159
- ' stream ,
160
- crate :: host:: HostAndDeviceConstRef < ' b , T > ,
161
- > where Self : ' b ;
166
+ type AsyncHostType < ' stream , ' b >
167
+ = crate :: utils:: r#async:: AsyncProj < ' b , ' stream , crate :: host:: HostAndDeviceConstRef < ' b , T > >
168
+ where
169
+ Self : ' b ;
162
170
#[ cfg( any( feature = "device" , doc) ) ]
163
- type DeviceType < ' b > = & ' b T where Self : ' b ;
164
- type FfiType < ' stream , ' b > = DeviceConstRef < ' b , T > where Self : ' b ;
171
+ type DeviceType < ' b >
172
+ = & ' b T
173
+ where
174
+ Self : ' b ;
175
+ type FfiType < ' stream , ' b >
176
+ = DeviceConstRef < ' b , T >
177
+ where
178
+ Self : ' b ;
165
179
#[ cfg( feature = "host" ) ]
166
180
type SyncHostType = & ' a T ;
167
181
@@ -242,12 +256,19 @@ impl<
242
256
> CudaKernelParameter for & ' a PtxJit < PerThreadShallowCopy < T > >
243
257
{
244
258
#[ cfg( feature = "host" ) ]
245
- type AsyncHostType < ' stream , ' b > =
246
- <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b > where Self : ' b ;
259
+ type AsyncHostType < ' stream , ' b >
260
+ = <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b >
261
+ where
262
+ Self : ' b ;
247
263
#[ cfg( any( feature = "device" , doc) ) ]
248
- type DeviceType < ' b > = <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: DeviceType < ' b > where Self : ' b ;
249
- type FfiType < ' stream , ' b > =
250
- <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: FfiType < ' stream , ' b > where Self : ' b ;
264
+ type DeviceType < ' b >
265
+ = <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: DeviceType < ' b >
266
+ where
267
+ Self : ' b ;
268
+ type FfiType < ' stream , ' b >
269
+ = <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: FfiType < ' stream , ' b >
270
+ where
271
+ Self : ' b ;
251
272
#[ cfg( feature = "host" ) ]
252
273
type SyncHostType = <& ' a PerThreadShallowCopy < T > as CudaKernelParameter >:: SyncHostType ;
253
274
@@ -363,14 +384,19 @@ impl<
363
384
> CudaKernelParameter for & ' a ShallowInteriorMutable < T >
364
385
{
365
386
#[ cfg( feature = "host" ) ]
366
- type AsyncHostType < ' stream , ' b > = crate :: utils:: r#async:: AsyncProj <
367
- ' b ,
368
- ' stream ,
369
- crate :: host:: HostAndDeviceConstRef < ' b , T >
370
- > where Self : ' b ;
387
+ type AsyncHostType < ' stream , ' b >
388
+ = crate :: utils:: r#async:: AsyncProj < ' b , ' stream , crate :: host:: HostAndDeviceConstRef < ' b , T > >
389
+ where
390
+ Self : ' b ;
371
391
#[ cfg( any( feature = "device" , doc) ) ]
372
- type DeviceType < ' b > = & ' b T where Self : ' b ;
373
- type FfiType < ' stream , ' b > = DeviceConstRef < ' b , T > where Self : ' b ;
392
+ type DeviceType < ' b >
393
+ = & ' b T
394
+ where
395
+ Self : ' b ;
396
+ type FfiType < ' stream , ' b >
397
+ = DeviceConstRef < ' b , T >
398
+ where
399
+ Self : ' b ;
374
400
#[ cfg( feature = "host" ) ]
375
401
/// The kernel takes a mutable borrow of the interior mutable data to ensure
376
402
/// the interior mutability is limited to just this kernel invocation.
@@ -498,19 +524,27 @@ impl<
498
524
> CudaKernelParameter for DeepPerThreadBorrow < T >
499
525
{
500
526
#[ cfg( feature = "host" ) ]
501
- type AsyncHostType < ' stream , ' b > = crate :: utils:: r#async:: Async <
527
+ type AsyncHostType < ' stream , ' b >
528
+ = crate :: utils:: r#async:: Async <
502
529
' b ,
503
530
' stream ,
504
531
crate :: host:: HostAndDeviceOwned <
505
532
' b ,
506
533
DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > ,
507
534
> ,
508
535
crate :: utils:: r#async:: NoCompletion ,
509
- > where Self : ' b ;
536
+ >
537
+ where
538
+ Self : ' b ;
510
539
#[ cfg( any( feature = "device" , doc) ) ]
511
- type DeviceType < ' b > = T where Self : ' b ;
512
- type FfiType < ' stream , ' b > =
513
- DeviceOwnedRef < ' b , DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > > where Self : ' b ;
540
+ type DeviceType < ' b >
541
+ = T
542
+ where
543
+ Self : ' b ;
544
+ type FfiType < ' stream , ' b >
545
+ = DeviceOwnedRef < ' b , DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > >
546
+ where
547
+ Self : ' b ;
514
548
#[ cfg( feature = "host" ) ]
515
549
type SyncHostType = T ;
516
550
@@ -586,18 +620,26 @@ impl<
586
620
587
621
impl < ' a , T : Sync + RustToCuda > CudaKernelParameter for & ' a DeepPerThreadBorrow < T > {
588
622
#[ cfg( feature = "host" ) ]
589
- type AsyncHostType < ' stream , ' b > = crate :: utils:: r#async:: AsyncProj <
623
+ type AsyncHostType < ' stream , ' b >
624
+ = crate :: utils:: r#async:: AsyncProj <
590
625
' b ,
591
626
' stream ,
592
627
crate :: host:: HostAndDeviceConstRef <
593
628
' b ,
594
629
DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > ,
595
630
> ,
596
- > where Self : ' b ;
631
+ >
632
+ where
633
+ Self : ' b ;
597
634
#[ cfg( any( feature = "device" , doc) ) ]
598
- type DeviceType < ' b > = & ' b T where Self : ' b ;
599
- type FfiType < ' stream , ' b > =
600
- DeviceConstRef < ' b , DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > > where Self : ' b ;
635
+ type DeviceType < ' b >
636
+ = & ' b T
637
+ where
638
+ Self : ' b ;
639
+ type FfiType < ' stream , ' b >
640
+ = DeviceConstRef < ' b , DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > >
641
+ where
642
+ Self : ' b ;
601
643
#[ cfg( feature = "host" ) ]
602
644
type SyncHostType = & ' a T ;
603
645
@@ -671,18 +713,26 @@ impl<'a, T: Sync + RustToCuda + SafeMutableAliasing> CudaKernelParameter
671
713
for & ' a mut DeepPerThreadBorrow < T >
672
714
{
673
715
#[ cfg( feature = "host" ) ]
674
- type AsyncHostType < ' stream , ' b > = crate :: utils:: r#async:: AsyncProj <
716
+ type AsyncHostType < ' stream , ' b >
717
+ = crate :: utils:: r#async:: AsyncProj <
675
718
' b ,
676
719
' stream ,
677
720
crate :: host:: HostAndDeviceMutRef <
678
721
' b ,
679
722
DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > ,
680
723
> ,
681
- > where Self : ' b ;
724
+ >
725
+ where
726
+ Self : ' b ;
682
727
#[ cfg( any( feature = "device" , doc) ) ]
683
- type DeviceType < ' b > = & ' b mut T where Self : ' b ;
684
- type FfiType < ' stream , ' b > =
685
- DeviceMutRef < ' b , DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > > where Self : ' b ;
728
+ type DeviceType < ' b >
729
+ = & ' b mut T
730
+ where
731
+ Self : ' b ;
732
+ type FfiType < ' stream , ' b >
733
+ = DeviceMutRef < ' b , DeviceAccessible < <T as RustToCuda >:: CudaRepresentation > >
734
+ where
735
+ Self : ' b ;
686
736
#[ cfg( feature = "host" ) ]
687
737
type SyncHostType = & ' a mut T ;
688
738
@@ -768,12 +818,19 @@ impl<
768
818
> CudaKernelParameter for PtxJit < DeepPerThreadBorrow < T > >
769
819
{
770
820
#[ cfg( feature = "host" ) ]
771
- type AsyncHostType < ' stream , ' b > =
772
- <DeepPerThreadBorrow < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b > where Self : ' b ;
821
+ type AsyncHostType < ' stream , ' b >
822
+ = <DeepPerThreadBorrow < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b >
823
+ where
824
+ Self : ' b ;
773
825
#[ cfg( any( feature = "device" , doc) ) ]
774
- type DeviceType < ' b > = <DeepPerThreadBorrow < T > as CudaKernelParameter >:: DeviceType < ' b > where Self : ' b ;
775
- type FfiType < ' stream , ' b > =
776
- <DeepPerThreadBorrow < T > as CudaKernelParameter >:: FfiType < ' stream , ' b > where Self : ' b ;
826
+ type DeviceType < ' b >
827
+ = <DeepPerThreadBorrow < T > as CudaKernelParameter >:: DeviceType < ' b >
828
+ where
829
+ Self : ' b ;
830
+ type FfiType < ' stream , ' b >
831
+ = <DeepPerThreadBorrow < T > as CudaKernelParameter >:: FfiType < ' stream , ' b >
832
+ where
833
+ Self : ' b ;
777
834
#[ cfg( feature = "host" ) ]
778
835
type SyncHostType = <DeepPerThreadBorrow < T > as CudaKernelParameter >:: SyncHostType ;
779
836
@@ -852,12 +909,19 @@ impl<
852
909
853
910
impl < ' a , T : Sync + RustToCuda > CudaKernelParameter for & ' a PtxJit < DeepPerThreadBorrow < T > > {
854
911
#[ cfg( feature = "host" ) ]
855
- type AsyncHostType < ' stream , ' b > =
856
- <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b > where Self : ' b ;
912
+ type AsyncHostType < ' stream , ' b >
913
+ = <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b >
914
+ where
915
+ Self : ' b ;
857
916
#[ cfg( any( feature = "device" , doc) ) ]
858
- type DeviceType < ' b > = <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: DeviceType < ' b > where Self : ' b ;
859
- type FfiType < ' stream , ' b > =
860
- <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: FfiType < ' stream , ' b > where Self : ' b ;
917
+ type DeviceType < ' b >
918
+ = <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: DeviceType < ' b >
919
+ where
920
+ Self : ' b ;
921
+ type FfiType < ' stream , ' b >
922
+ = <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: FfiType < ' stream , ' b >
923
+ where
924
+ Self : ' b ;
861
925
#[ cfg( feature = "host" ) ]
862
926
type SyncHostType = <& ' a DeepPerThreadBorrow < T > as CudaKernelParameter >:: SyncHostType ;
863
927
@@ -936,12 +1000,19 @@ impl<'a, T: Sync + RustToCuda + SafeMutableAliasing> CudaKernelParameter
936
1000
for & ' a mut PtxJit < DeepPerThreadBorrow < T > >
937
1001
{
938
1002
#[ cfg( feature = "host" ) ]
939
- type AsyncHostType < ' stream , ' b > =
940
- <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b > where Self : ' b ;
1003
+ type AsyncHostType < ' stream , ' b >
1004
+ = <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: AsyncHostType < ' stream , ' b >
1005
+ where
1006
+ Self : ' b ;
941
1007
#[ cfg( any( feature = "device" , doc) ) ]
942
- type DeviceType < ' b > = <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: DeviceType < ' b > where Self : ' b ;
943
- type FfiType < ' stream , ' b > =
944
- <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: FfiType < ' stream , ' b > where Self : ' b ;
1008
+ type DeviceType < ' b >
1009
+ = <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: DeviceType < ' b >
1010
+ where
1011
+ Self : ' b ;
1012
+ type FfiType < ' stream , ' b >
1013
+ = <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: FfiType < ' stream , ' b >
1014
+ where
1015
+ Self : ' b ;
945
1016
#[ cfg( feature = "host" ) ]
946
1017
type SyncHostType = <& ' a mut DeepPerThreadBorrow < T > as CudaKernelParameter >:: SyncHostType ;
947
1018
@@ -1066,10 +1137,19 @@ mod private_shared {
1066
1137
1067
1138
impl < ' a , T : ' static > CudaKernelParameter for & ' a mut crate :: utils:: shared:: ThreadBlockShared < T > {
1068
1139
#[ cfg( feature = "host" ) ]
1069
- type AsyncHostType < ' stream , ' b > = & ' b mut crate :: utils:: shared:: ThreadBlockShared < T > where Self : ' b ;
1140
+ type AsyncHostType < ' stream , ' b >
1141
+ = & ' b mut crate :: utils:: shared:: ThreadBlockShared < T >
1142
+ where
1143
+ Self : ' b ;
1070
1144
#[ cfg( any( feature = "device" , doc) ) ]
1071
- type DeviceType < ' b > = & ' b mut crate :: utils:: shared:: ThreadBlockShared < T > where Self : ' b ;
1072
- type FfiType < ' stream , ' b > = private_shared:: ThreadBlockSharedFfi < T > where Self : ' b ;
1145
+ type DeviceType < ' b >
1146
+ = & ' b mut crate :: utils:: shared:: ThreadBlockShared < T >
1147
+ where
1148
+ Self : ' b ;
1149
+ type FfiType < ' stream , ' b >
1150
+ = private_shared:: ThreadBlockSharedFfi < T >
1151
+ where
1152
+ Self : ' b ;
1073
1153
#[ cfg( feature = "host" ) ]
1074
1154
type SyncHostType = Self ;
1075
1155
@@ -1144,10 +1224,19 @@ impl<'a, T: 'static + PortableBitSemantics + TypeGraphLayout> CudaKernelParamete
1144
1224
for & ' a mut crate :: utils:: shared:: ThreadBlockSharedSlice < T >
1145
1225
{
1146
1226
#[ cfg( feature = "host" ) ]
1147
- type AsyncHostType < ' stream , ' b > = & ' b mut crate :: utils:: shared:: ThreadBlockSharedSlice < T > where Self : ' b ;
1227
+ type AsyncHostType < ' stream , ' b >
1228
+ = & ' b mut crate :: utils:: shared:: ThreadBlockSharedSlice < T >
1229
+ where
1230
+ Self : ' b ;
1148
1231
#[ cfg( any( feature = "device" , doc) ) ]
1149
- type DeviceType < ' b > = & ' b mut crate :: utils:: shared:: ThreadBlockSharedSlice < T > where Self : ' b ;
1150
- type FfiType < ' stream , ' b > = private_shared:: ThreadBlockSharedSliceFfi < T > where Self : ' b ;
1232
+ type DeviceType < ' b >
1233
+ = & ' b mut crate :: utils:: shared:: ThreadBlockSharedSlice < T >
1234
+ where
1235
+ Self : ' b ;
1236
+ type FfiType < ' stream , ' b >
1237
+ = private_shared:: ThreadBlockSharedSliceFfi < T >
1238
+ where
1239
+ Self : ' b ;
1151
1240
#[ cfg( feature = "host" ) ]
1152
1241
type SyncHostType = Self ;
1153
1242
0 commit comments