# `ExCubecl.Command`
[🔗](https://github.com/ohhi-vn/ex_cubecl/blob/v0.4.0/lib/ex_cubecl/command.ex#L15)

A typed struct representing a pipeline command.

## Fields

  * `:op` — the operation type (currently only `:run_kernel`)
  * `:kernel` — the kernel name (e.g. `"elementwise_add"`)
  * `:inputs` — list of input buffer references
  * `:output` — output buffer reference
  * `:params` — optional map of kernel parameters (default `%{}`)

# `t`

```elixir
@type t() :: %ExCubecl.Command{
  inputs: [reference()],
  kernel: String.t(),
  op: :run_kernel | :filter | :overlay | :encode | :read_frame,
  output: reference(),
  params: map()
}
```

# `run_kernel`

```elixir
@spec run_kernel(String.t(), [reference()], reference(), map()) :: t()
```

Creates a new Command struct for running a kernel.

## Examples

    iex> cmd = ExCubecl.Command.run_kernel("elementwise_add", [input_buf], output_buf)
    iex> cmd.op
    :run_kernel
    iex> cmd.kernel
    "elementwise_add"

# `to_string`

```elixir
@spec to_string(t()) :: String.t()
```

Returns a human-readable string representation of the command.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
