MCPcopy Create free account
hub / github.com/cogentcore/core / Clone

Method Clone

tensor/bits.go:257–261  ·  view source on GitHub ↗

Clone clones this tensor, creating a duplicate copy of itself with its own separate memory representation of all the values, and returns that as a Tensor (which can be converted into the known type as needed).

()

Source from the content-addressed store, hash-verified

255// own separate memory representation of all the values, and returns
256// that as a Tensor (which can be converted into the known type as needed).
257func (tsr *Bits) Clone() Tensor {
258 csr := NewBitsShape(&tsr.Shp)
259 csr.Values = tsr.Values.Clone()
260 return csr
261}
262
263// CopyFrom copies all avail values from other tensor into this tensor, with an
264// optimized implementation if the other tensor is of the same type, and

Callers

nothing calls this directly

Calls 2

NewBitsShapeFunction · 0.85
CloneMethod · 0.65

Tested by

no test coverage detected