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

refactor: replace sample_autogen code with variadic function template #13928

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Swiftb0y
Copy link
Member

This replaces the ginormous autogenerated file a few function templates that do the same (sometimes even faster). The primary goal was to make the header smaller to potentially speedup builds (as sample.h which includes sample_autogen.h is included very often) by reducing the header size. In reality, only copyN* (where $N = 1, 2, 3$) are used in practice so I'm also fine if we just strip everything else from the file. Apart from that the function templates (while a bit difficult to read for sure) so anything the autogenerated code did while being very slightly faster as well.

Builds on my end (and can likely be made to build everywhere).

I would appreciate some opinion on how we want to proceed. I definitely want to throw out the functions we currently don't need and I'm open to whether we want to replace them with the variadic function template or not.

@Swiftb0y
Copy link
Member Author

okay, so this technically works. The build failure on MSVC looks like a compiler bug to me because it works on MSVC v19.30 (VS17) but not 19.29 (VS16).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant