rustnn C and C++ API
WebNN graph construction and execution
Loading...
Searching...
No Matches
RustnnContextOptions Struct Reference

C representation of [MLContextOptions]. More...

#include <rustnn.h>

Public Attributes

enum RustnnPowerPreference power_preference
 WebNN power preference hint.
 
bool accelerated
 Whether to prefer an accelerated device.
 
enum RustnnBackend backend_hint
 Automatic corresponds to no Rust backend hint.
 
bool has_device_hint
 Whether device_hint should override automatic device selection.
 
struct RustnnBackendDevice device_hint
 Exact device to use when has_device_hint is true.
 
bool has_rustnn_options
 Whether rustnn_options should replace the Rust defaults.
 
struct RustnnOptions rustnn_options
 Backend settings used when has_rustnn_options is true.
 

Detailed Description

C representation of [MLContextOptions].

See WebNN context options.

Definition at line 330 of file rustnn.h.

Member Data Documentation

◆ accelerated

bool RustnnContextOptions::accelerated

Whether to prefer an accelerated device.

Definition at line 338 of file rustnn.h.

◆ backend_hint

enum RustnnBackend RustnnContextOptions::backend_hint

Automatic corresponds to no Rust backend hint.

Definition at line 342 of file rustnn.h.

◆ device_hint

struct RustnnBackendDevice RustnnContextOptions::device_hint

Exact device to use when has_device_hint is true.

Definition at line 350 of file rustnn.h.

◆ has_device_hint

bool RustnnContextOptions::has_device_hint

Whether device_hint should override automatic device selection.

Definition at line 346 of file rustnn.h.

◆ has_rustnn_options

bool RustnnContextOptions::has_rustnn_options

Whether rustnn_options should replace the Rust defaults.

Definition at line 354 of file rustnn.h.

◆ power_preference

enum RustnnPowerPreference RustnnContextOptions::power_preference

WebNN power preference hint.

Definition at line 334 of file rustnn.h.

◆ rustnn_options

struct RustnnOptions RustnnContextOptions::rustnn_options

Backend settings used when has_rustnn_options is true.

Definition at line 358 of file rustnn.h.


The documentation for this struct was generated from the following file: