static mut ComputeBackendList : *mut Mutex<Vec<Box<ComputeBackend>>> = 0 as *mut Mutex<Vec<Box<ComputeBackend>>>;
pub struct BackendManager {
pub fn init() {
assert!(ComputeBackendList == 0 as *mut Mutex<Vec<Box<ComputeBackend>>>);
unsafe {
ComputeBackendList = Box::into_raw(Box::new(Mutex::new(Vec::<Box<ComputeBackend>>::new())));
}
}
pub fn finalize() {
assert!(ComputeBackendList != 0 as *mut Mutex<Vec<Box<ComputeBackend>>>);
let dealoc = unsafe {
Box::from_raw(ComputeBackendList);
}
}
}