#[repr(C)]pub struct GPUComputingConfig {
pub backend: GPUComputingBackend,
pub power: GPUPowerSettings,
pub speed: GPUSpeedSettings,
pub memory: GPUMemorySettings,
pub gpu_index_in_backend_group: i64,
}Expand description
as config field you have to provide GPUComputingConfig which represent settings which you wanted
Fields§
§backend: GPUComputingBackendset backend which you want
power: GPUPowerSettingsset power settings which meets your needs
speed: GPUSpeedSettingsset speed settings which matches your needs
memory: GPUMemorySettingstell to gpu about your memory usage
gpu_index_in_backend_group: i64Optional Setting : if you know index of your prefered gpu device in the list gpu devices with the same backend , you can set it , to API gets resources from that gpu and use it for computing task
get_computing_gpu_infos function can be used to get list of them
free_gpu_devices_infos function must be used from C side of the program to deallocate
recived gpu infos , in Rust RAII will take care of it if it sets to negative value , API will automatically choose the gpu device
Trait Implementations§
Source§impl Clone for GPUComputingConfig
impl Clone for GPUComputingConfig
Source§fn clone(&self) -> GPUComputingConfig
fn clone(&self) -> GPUComputingConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GPUComputingConfig
impl RefUnwindSafe for GPUComputingConfig
impl Send for GPUComputingConfig
impl Sync for GPUComputingConfig
impl Unpin for GPUComputingConfig
impl UnwindSafe for GPUComputingConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)