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

Use std::span or iterator pairs for arguments instead of std::vector #130

Open
4 tasks
johannesugb opened this issue Dec 16, 2021 · 0 comments
Open
4 tasks
Labels
C++ C++-centric task enhancement New feature or request

Comments

@johannesugb
Copy link
Member

johannesugb commented Dec 16, 2021

Currently within Auto-Vk and Gears-Vk, when a function/method supports multiple elements for one particular argument, that argument's type is std::vector. That is bad, however, since users are forced to use std::vector. Better: Use std::span! Even better: use iterator pairs, just like the STL does, but the problem is that then everything must be templated, I guess. So, no need to change everything to templated code, but if possible at some place => do it!

Definition of done:

  • std::span<T> is used for arguments instead of std::vector<T> wherever the elements must be provided in contiguous memory (or if the affected code would have to be restructured too severely).
  • Pairs of iterators are used for arguments instead of std::vector<T> wherever it can be implemented in a straight-forward manner.
  • std::vector<T> is no longer used for passing arguments supporting 0..n elements
  • The coe is well documented and the Contribution Guidelines have been followed.
@johannesugb johannesugb added enhancement New feature or request C++ C++-centric task labels Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ C++-centric task enhancement New feature or request
Development

No branches or pull requests

1 participant