Skip to content

[QST]Can I create a null tensor? #1812

@ziyuhuang123

Description

@ziyuhuang123

Hi! I am wondering can I create a null tensor?

I am creating a tensor within a {} but need to use it in another {}. The lifetime of a variable is within a {}. So I need to create the tensor before the first {}, like:

Tensor s;
{
auto s = ......
}

{
func(s, ......)
}

But it seems I can not create like Tensor s ???

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions