fromValue static method

ggml_tensor_flag fromValue(
  1. int value
)

Implementation

static ggml_tensor_flag fromValue(int value) => switch (value) {
      1 => GGML_TENSOR_FLAG_INPUT,
      2 => GGML_TENSOR_FLAG_OUTPUT,
      4 => GGML_TENSOR_FLAG_PARAM,
      8 => GGML_TENSOR_FLAG_LOSS,
      _ => throw ArgumentError("Unknown value for ggml_tensor_flag: $value"),
    };