cubecl_matmul/components/global/
copy_mechanism.rs1use cubecl_core as cubecl;
2use cubecl_core::prelude::barrier::Barrier;
3use cubecl_core::prelude::*;
4
5#[cube]
6pub trait CopyMechanism: CubeType + Sync + Send + 'static {
8 fn memcpy_async<ES: Numeric>(
10 this: &Self,
11 source: &Slice<Line<ES>>,
12 destination: &mut SliceMut<Line<ES>>,
13 );
14}
15
16#[cube]
17impl CopyMechanism for Barrier {
18 fn memcpy_async<ES: Numeric>(
19 this: &Self,
20 source: &Slice<Line<ES>>,
21 destination: &mut SliceMut<Line<ES>>,
22 ) {
23 this.memcpy_async(source, destination)
24 }
25}