How to launch cuda stream in rust

if use ffi. how can i manage cuda stream?
or is there any context to manage cuda algorithm.
or any example.

for example, we need to call function ptr in c++ is there any concept in rust ???

Please see RustaCUDA for launching CUDA programs.

Function pointers over ffi are done using an Option<extern "abi" fn(args) -> ret>, since a null function pointer is invalid, so a None variant of that Option occupies the null pointer. You just need to unwrap it, and call it.

sorry, i just want to call .cu file to rust, how can i manage the cuda context ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.