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

[UR] Automatically generate ur_structure_type_t #670

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

veselypeta
Copy link
Contributor

This PR automatically generates $x_structure_type_t enumerations.

@@ -914,6 +969,9 @@ def parse(section, version, tags, meta, ref):
})

specs = sorted(specs, key=lambda s: s['header']['ordinal'])
_inline_extended_structs(specs, meta)
registry = [f for f in files if f.endswith('registry.yml')][0]
_generate_structure_type_t(specs, meta, registry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I understand why this can't simply be a part of the generate_registry function. Right now it's called almost immediately after.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps an artifact of a previous iteration of this change when it was generating a separate file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To generate the structure type we need to inline the extended structs, which happens after generate_registry, but since registry does not depend on this we could run these steps together after _inline_extended_structs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbalcer I've refactored this so now the entire registry.yml file is generated together.

@pbalcer pbalcer merged commit b6109c8 into oneapi-src:main Jul 5, 2023
@veselypeta veselypeta deleted the petr/563/structure_type branch July 5, 2023 09:53
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.

3 participants