ggml_view_tensor: View Tensor

View source: R/operations.R

ggml_view_tensorR Documentation

View Tensor

Description

Creates a view of the tensor (shares data, no copy)

Usage

ggml_view_tensor(ctx, src)

Arguments

ctx

GGML context

src

Source tensor

Value

View tensor (shares data with src)

Examples


ctx <- ggml_init(16 * 1024 * 1024)
a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 10)
view <- ggml_view_tensor(ctx, a)
# view shares data with a
ggml_free(ctx)


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