pub unsafe fn compile_program<O: Clone + Into<Vec<u8>>>(
    prog: nvrtcProgram,
    options: &[O]
) -> Result<(), NvrtcError>
Expand description

Compiles an already created program. Options should be of the form specified in nvrtc’s supported compiler options.

See nvrtcCompileProgram() docs

Example:

let prog = create_program("extern \"C\" __global__ void kernel() { }").unwrap();
unsafe { compile_program(prog, &["--ftz=true", "--fmad=true"]) }.unwrap();

Safety

prog must be created from create_program() and not have been freed by destroy_program().