fromValue static method

ggml_backend_buffer_usage fromValue(
  1. int value
)

Implementation

static ggml_backend_buffer_usage fromValue(int value) => switch (value) {
      0 => GGML_BACKEND_BUFFER_USAGE_ANY,
      1 => GGML_BACKEND_BUFFER_USAGE_WEIGHTS,
      2 => GGML_BACKEND_BUFFER_USAGE_COMPUTE,
      _ => throw ArgumentError(
          "Unknown value for ggml_backend_buffer_usage: $value"),
    };