powered by
Creates a view of the tensor (shares data, no copy)
ggml_view_tensor(ctx, src)
View tensor (shares data with src)
GGML context
Source tensor
# \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