ggml_reshape_1d: Reshape to 1D (Graph)

View source: R/operations.R

ggml_reshape_1dR Documentation

Reshape to 1D (Graph)

Description

Reshapes tensor to 1D with ne0 elements

Usage

ggml_reshape_1d(ctx, a, ne0)

Arguments

ctx

GGML context

a

Input tensor

ne0

Size of dimension 0

Value

Reshaped tensor

Examples


ctx <- ggml_init(16 * 1024 * 1024)
a <- ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 3, 4)
ggml_set_f32(a, 1:12)
result <- ggml_reshape_1d(ctx, a, 12)
ggml_free(ctx)


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