Learn R Programming

ggmlR (version 0.6.1)

ggml_view_tensor: View Tensor

Description

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

Usage

ggml_view_tensor(ctx, src)

Value

View tensor (shares data with src)

Arguments

ctx

GGML context

src

Source tensor

Examples

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

Run the code above in your browser using DataLab