INNER CODE UNIT · Rust

host_func_v2_outcome

NVlabs/cuda-oxide · cuda-bindings/src/lib.rs:120

fn host_func_v2_outcome(v2_result: CUresult, sync_mode: ::core::ffi::c_uint) -> HostFuncV2Outcome {
    if v2_result != cudaError_enum_CUDA_ERROR_NOT_FOUND {
        HostFuncV2Outcome::Done(v2_result)
    } else if sync_mode == CU_HOST_TASK_BLOCKING {
        HostFuncV2Outcome::FallBackToV1
    } else {
        HostFuncV2Outcome::Unsupported
    }
}

#[cfg(test)]
mod host_func_dispatch_tests {
    use super::*;

    #[test]
    fn driver_result_stands_when_the_v2_entry_point_exists() {
        for code in [
            cudaError_enum_CUDA_SUCCESS,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…