powered by
Creates a copy of a tensor with the same shape and type
ggml_dup_tensor(ctx, tensor)
New tensor pointer with same shape
GGML context
Tensor to duplicate
# \donttest{ ctx <- ggml_init(1024 * 1024) a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 100) b <- ggml_dup_tensor(ctx, a) ggml_nelements(b) ggml_free(ctx) # }
Run the code above in your browser using DataLab