Learn R Programming

ggmlR (version 0.6.1)

ggml_set_i32: 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)

Value

NULL (invisible)

Arguments

tensor

Tensor of type GGML_TYPE_I32

data

Integer vector

Examples

Run this code
# \donttest{
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)
# }

Run the code above in your browser using DataLab