//! CPU 设备管理(单例)
usestd::cell::RefCell;thread_local!{staticIS_CPU_SET:RefCell<bool>=const{RefCell::new(false)};}/// 设置 CPU 为当前设备(无参数,总是成功)
pubfnset_device(){IS_CPU_SET.with(|s|*s.borrow_mut()=true);}/// 获取当前是否为 CPU 设备
pubfnget_device()->bool{IS_CPU_SET.with(|s|*s.borrow())}