File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
samples/introduction/async_api Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11use cuda_std:: prelude:: * ;
22
33#[ kernel]
4+ // SAFETY: The user must ensure that the number of (threads * blocks * grids)
5+ // must not be greater than the number of elements in `g_data`.
46pub unsafe fn increment ( g_data : * mut u32 , inc_value : u32 ) {
57 // This can also be obtained directly as
68 //
Original file line number Diff line number Diff line change 1- use cust:: context:: Context ;
21use cust:: device:: Device ;
32use cust:: event:: { Event , EventFlags } ;
43use cust:: function:: { BlockSize , GridSize } ;
4+ use cust:: launch;
55use cust:: memory:: { AsyncCopyDestination , DeviceBuffer , LockedBuffer } ;
66use cust:: module:: Module ;
77use cust:: prelude:: EventStatus ;
88use cust:: stream:: { Stream , StreamFlags } ;
9- use cust:: { CudaFlags , launch} ;
109use std:: time:: Instant ;
1110
1211static PTX : & str = include_str ! ( concat!( env!( "OUT_DIR" ) , "/kernels.ptx" ) ) ;
You can’t perform that action at this time.
0 commit comments