Skip to content

Commit 5e1534c

Browse files
committed
Fix pointer type inference error
1 parent 8552c21 commit 5e1534c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/utils/exchange/buffer/host.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ impl<T: StackOnly + PortableBitSemantics + TypeGraphLayout, const M2D: bool, con
7777
let mut uninit: CudaDropWrapper<LockedBuffer<DeviceCopyWithPortableBitSemantics<_>>> =
7878
CudaDropWrapper::from(LockedBuffer::uninitialized(vec.len())?);
7979

80+
let uninit_ptr: *mut DeviceCopyWithPortableBitSemantics<CudaExchangeItem<T, M2D, M2H>> =
81+
uninit.as_mut_ptr();
82+
8083
for (i, src) in vec.into_iter().enumerate() {
81-
uninit
82-
.as_mut_ptr()
84+
uninit_ptr
8385
.add(i)
8486
.write(DeviceCopyWithPortableBitSemantics::from(CudaExchangeItem(
8587
src,

0 commit comments

Comments
 (0)