Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Make Buffer::device_type_ non-optional #39159

Closed
felipecrv opened this issue Dec 10, 2023 · 0 comments · Fixed by #39150
Closed

[C++] Make Buffer::device_type_ non-optional #39159

felipecrv opened this issue Dec 10, 2023 · 0 comments · Fixed by #39150

Comments

@felipecrv
Copy link
Contributor

Describe the enhancement requested

There is no need to wrap it in an option and if we are in a position where we can't determine the device type, "cpu" is probably the right default.

Component(s)

C++

felipecrv added a commit that referenced this issue Dec 11, 2023
### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: #39159

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
@felipecrv felipecrv added this to the 15.0.0 milestone Dec 11, 2023
mapleFU pushed a commit to mapleFU/arrow that referenced this issue Dec 13, 2023
…pache#39150)

### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: apache#39159

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
clayburn pushed a commit to clayburn/arrow that referenced this issue Jan 23, 2024
…pache#39150)

### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: apache#39159

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…pache#39150)

### Rationale for this change

Buffer should always have a device type. When unspecified, CPU can be assumed.

### What changes are included in this PR?

A change of the member variable type and some adjustments.

### Are these changes tested?

N/A.

### Are there any user-facing changes?

**This PR includes breaking changes to public APIs.**

`Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`.
* Closes: apache#39159

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant