Skip to content

Much slower assigning with xt::view vs std::copy #1644

@gte620v

Description

@gte620v

Hi,

I think these two are equivalent, but the copy is about 3x faster. Am I misusing xt:view?

std::copy(source_tensor.begin(), source_tensor.end(), keep_tensor.begin() + start)

xt::view(keep_tensor, xt::range(start, stop)) = source_tensor

Thanks.

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