ggml_set_i32: Set I32 Data

View source: R/tensors.R

ggml_set_i32R Documentation

Set I32 Data

Description

Sets integer data in an I32 tensor. Used for indices (ggml_get_rows) and position tensors (ggml_rope).

Usage

ggml_set_i32(tensor, data)

Arguments

tensor

Tensor of type GGML_TYPE_I32

data

Integer vector

Value

NULL (invisible)

Examples


ctx <- ggml_init(1024 * 1024)
pos <- ggml_new_tensor_1d(ctx, GGML_TYPE_I32, 10)
ggml_set_i32(pos, 0:9)
ggml_get_i32(pos)
ggml_free(ctx)


ggmlR documentation built on July 14, 2026, 1:08 a.m.