cubecl_core/frontend/operation/
copy.rs1use crate::prelude::*;
2
3pub fn copy_bulk<C: CubePrimitive>(
18 _from: &Slice<C>,
19 _from_index: u32,
20 _to: &mut SliceMut<C>,
21 _to_index: u32,
22 _length: u32,
23) {
24}
25
26pub mod copy_bulk {
27 use crate::ir::{CopyMemoryBulkOperator, Instruction, Operator, Scope};
28
29 use super::*;
30
31 pub fn expand<C: CubeType>(
33 scope: &mut Scope,
34 from: ExpandElementTyped<Slice<C>>,
35 from_index: ExpandElementTyped<u32>,
36 to: ExpandElementTyped<SliceMut<C>>,
37 to_index: ExpandElementTyped<u32>,
38 length: u32,
39 ) {
40 scope.register(Instruction::new(
41 Operator::CopyMemoryBulk(CopyMemoryBulkOperator {
42 out_index: to_index.expand.consume(),
43 input: from.expand.consume(),
44 in_index: from_index.expand.consume(),
45 len: length.into(),
46 }),
47 *to.expand,
48 ));
49 }
50}