Learn R Programming

ggmlR (version 0.6.1)

ggml_new_i32: Create Scalar I32 Tensor

Description

Creates a 1-element tensor containing a single integer value. Useful for indices, counters, and other scalar integer operations.

Usage

ggml_new_i32(ctx, value)

Value

Tensor pointer (1-element I32 tensor)

Arguments

ctx

GGML context

value

Integer value

Examples

Run this code
# \donttest{
ctx <- ggml_init(1024 * 1024)
scalar <- ggml_new_i32(ctx, 42)
ggml_get_i32(scalar)
ggml_free(ctx)
# }

Run the code above in your browser using DataLab