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 332 of file rustnn.h.

Member Data Documentation

◆ accelerated

bool RustnnContextOptions::accelerated

Whether to prefer an accelerated device.

Definition at line 340 of file rustnn.h.

◆ backend_hint

enum RustnnBackend RustnnContextOptions::backend_hint

Automatic corresponds to no Rust backend hint.

Definition at line 344 of file rustnn.h.

◆ device_hint

struct RustnnBackendDevice RustnnContextOptions::device_hint

Exact device to use when has_device_hint is true.

Definition at line 352 of file rustnn.h.

◆ has_device_hint

bool RustnnContextOptions::has_device_hint

Whether device_hint should override automatic device selection.

Definition at line 348 of file rustnn.h.

◆ has_rustnn_options

bool RustnnContextOptions::has_rustnn_options

Whether rustnn_options should replace the Rust defaults.

Definition at line 356 of file rustnn.h.

◆ power_preference

enum RustnnPowerPreference RustnnContextOptions::power_preference

WebNN power preference hint.

Definition at line 336 of file rustnn.h.

◆ rustnn_options

struct RustnnOptions RustnnContextOptions::rustnn_options

Backend settings used when has_rustnn_options is true.

Definition at line 360 of file rustnn.h.


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