chore: refactorings for more code reorganizing
This commit is contained in:
@@ -1543,6 +1543,28 @@ impl Buffer {
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn copy_from(
|
||||
&self,
|
||||
destination_offset: u64,
|
||||
source: &Self,
|
||||
source_offset: u64,
|
||||
bytes: u64,
|
||||
operation: &str,
|
||||
) -> Result<(), String> {
|
||||
call(
|
||||
unsafe {
|
||||
ds4_gpu_tensor_copy(
|
||||
self.raw(),
|
||||
destination_offset,
|
||||
source.raw(),
|
||||
source_offset,
|
||||
bytes,
|
||||
)
|
||||
},
|
||||
operation,
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn raw(&self) -> *mut GpuTensor {
|
||||
self.0.as_ptr()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user