+
Skip to content

Should tensors use Rc or Box under the hood? #62

@coreylowman

Description

@coreylowman

It seems easy enough to replace: 45e9bc6

The main difference is in Tensor::mut_data(). This will clone the data if there is more than one reference.

It should only be swapped if it actually saves on clones somehow. Its certainly harder to know when the copy actually happens with rc which is a downside

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载