coreylowman / cudarc

Safe rust wrapper around CUDA toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update dtoh_sync_copy

zjsec opened this issue · comments

commented
pub fn dtoh_sync_copy<T: DeviceRepr>(
    self: &Arc<Self>,
    src: &CudaSlice<T>,
) -> Result<Vec<T>, result::DriverError>

Would it be better to modify it to the following?

pub fn dtoh_sync_copy<T: DeviceRepr, Src: DevicePtr<T>>(
    self: &Arc<Self>,
    src: &Src,
) -> Result<Vec<T>, result::DriverError>

Yes I think that'd be a nice improvement