Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Use new setstorage and setdata to decrease code duplication across storage types #74

@mtfishman

Description

@mtfishman

New generic functions setstorage and setdata were introduced in #72. These can be used to decrease code duplication across storage types. Here is a running list of examples where they could be used:

  • similar(S::TensorStorage, ElT = Float64) = setdata(S, similar(data(S), ElT))
  • (S::TensorStorage * x::Number) = setdata(S, x*data(S))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions