[−][src]Function core::arch::nvptx::vprintf
pub unsafe extern "C" fn vprintf(
format: *const u8,
valist: *const c_void
) -> i32
This is supported on
target_arch="nvptx"
or target_arch="nvptx64"
only.Print formatted output from a kernel to a host-side output stream.
Syscall arguments:
status
: The status value that is returned byvprintf
.format
: A pointer to the format specifier input (uses commonprintf
format).valist
: A pointer to the valist input.
#[repr(C)] struct PrintArgs(f32, f32, f32, i32); vprintf( "int(%f + %f) = int(%f) = %d\n".as_ptr(), transmute(&PrintArgs(a, b, a + b, (a + b) as i32)), );Run
Sources: Programming Guide, PTX Interoperability.