Skip to content

[C++] Use ViewOrCopyTo instead of CopyTo when pretty printing non-CPU data #43507

Closed

Description

@jorisvandenbossche

As a follow-up on #41664 (PR #42010), which ensured to copy data to the CPU when trying to pretty print it.

But, the PR was using CopyTo when the data was not using a CPU device allocation type, i.e.:

    if (array.device_type() != DeviceAllocationType::kCPU) {
      ARROW_ASSIGN_OR_RAISE(auto array_cpu, array.CopyTo(default_cpu_memory_manager()));
      ...

But this should better use ViewOrCopyTo, in case the data can be viewed as CPU data without a copy.

Activity

  1. added a commit that references this issue on Aug 1, 2024
  2. added a commit that references this issue on Aug 2, 2024
  3. added this to the 18.0.0 milestone on Aug 2, 2024
  4. kou commented on Aug 2, 2024

    @kou
    Member

    Issue resolved by pull request 43508
    #43508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions