use crate::prelude::*;
pub fn copy_bulk<C: CubePrimitive>(_from: &[C], _to: &mut [C], _length: usize) {}
pub mod copy_bulk {
use cubecl_ir::{CopyMemoryOperands, Memory};
use crate::ir::{Instruction, Scope};
use super::*;
pub fn expand<C: CubePrimitive>(
scope: &Scope,
from: &SliceExpand<C>,
to: &mut SliceExpand<C>,
length: usize,
) {
let source = unsafe { *from.__expand_as_ptr_method(scope) }.expand;
let target = unsafe { *to.__expand_as_mut_ptr_method(scope) }.expand;
scope.register(Instruction::no_out(Memory::CopyMemory(
CopyMemoryOperands {
source,
target,
len: length,
},
)));
}
}
pub fn copy<C: CubePrimitive>(_from: &C, _to: &mut C) {}
pub mod copy {
use cubecl_ir::{CopyMemoryOperands, Memory};
use crate::ir::{Instruction, Scope};
use super::*;
pub fn expand<C: CubePrimitive>(
scope: &Scope,
from: &NativeExpand<C>,
to: &mut NativeExpand<C>,
) {
let source = from.expand;
let target = to.expand;
scope.register(Instruction::no_out(Memory::CopyMemory(
CopyMemoryOperands {
source,
target,
len: 1,
},
)));
}
}