Skip to content
New issue

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

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

Already on GitHub? # to your account

Buffer from_iter method is inconsistent across buffer implementations #1001

Closed
maplant opened this issue Jul 28, 2018 · 1 comment
Closed

Comments

@maplant
Copy link

maplant commented Jul 28, 2018

CpuAccessibleBuffer defines its from_iter method with the following signature:

pub fn from_iter<I>(
    device: Arc<Device>, 
    usage: BufferUsage, 
    data: I
) -> Result<Arc<CpuAccessibleBuffer<[T]>>, DeviceMemoryAllocError> 

However, ImmutableBuffer defines it with a slightly different ordering:

pub fn from_iter<D>(
    data: D, 
    usage: BufferUsage, 
    queue: Arc<Queue>
) -> Result<(Arc<ImmutableBuffer<[T]>>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), DeviceMemoryAllocError> 

The issue here is that data is the last parameter in CpuAccessibleBuffer's method, while in ImmutableBuffer's method it is the first. This ordering is inconsistent and would benefit from a change.

@Rua
Copy link
Contributor

Rua commented Jan 12, 2023

This is solved by #2127.

@Rua Rua closed this as completed Jan 12, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants