use crate::prelude::*;
pub fn copy_bulk<C: CubePrimitive>(_from: &[C], _to: &mut [C], _length: usize) {}
pub mod copy_bulk {
use cubecl_ir::dialect::memory::CopyOp;
use crate::ir::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) }.value(scope);
let target = unsafe { *to.__expand_as_mut_ptr_method(scope) }.value(scope);
scope.register(&CopyOp::new(scope.ctx_mut(), source, target, length));
}
}
pub fn copy<C: CubePrimitive>(_from: &C, _to: &mut C) {}
pub mod copy {
use cubecl_ir::dialect::memory::CopyOp;
use crate::ir::Scope;
use super::*;
pub fn expand<C: CubePrimitive>(
scope: &Scope,
from: &NativeExpand<C>,
to: &mut NativeExpand<C>,
) {
let source = from.value(scope);
let target = to.value(scope);
scope.register(&CopyOp::new(scope.ctx_mut(), source, target, 1));
}
}