cu-core 0.1.0

Low level bindings to cuda apis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use ffi;
use std::ffi::{CStr, CString};
use std::path::{Path, PathBuf};

pub fn init(config_file: &str, output_file: &str) {
    let mut conf = CString::new(config_file).unwrap();
    let mut out = CString::new(output_file).unwrap();

    cuda_call!(ffi::cuProfilerInitialize(conf.as_ptr(), out.as_ptr(), ffi::CUoutput_mode_enum::CU_OUT_CSV));
}

pub fn start(){
    cuda_call!(ffi::cuProfilerStart());
}

pub fn stop(){
    cuda_call!(ffi::cuProfilerStop());
}