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

Support for thread-local variables #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alastairreid
Copy link
Owner

This adds the ability to split the spec state into multiple structs.
e.g., in a GPU spec you might have state that is one of: thread-local, processor-local, cluster-local and platform-local.
You can control this by adding the --split-state flag and providing a configuration file that uses regexps to define which variables are in each group.

This functionality is tested by the demo.

Supporting multiple structs required a change to the asl2c.py command line because, instead of having just one struct pointer, we need a separate pointer for each struct.

A surprising complication was the handling of RAM blocks. These require an initializer which has to be applied to each struct before it can be used.

Note that this changes the thread-local flag to thread-shared
This is done to make thread-local be the default
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