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

API support to initialize thread-local variables for a data structure #34

Open
nisargshah95 opened this issue Dec 4, 2020 · 0 comments

Comments

@nisargshah95
Copy link

nisargshah95 commented Dec 4, 2020

One thing I found missing was support to initialize thread-local variables of a data structure once OMP threads are created in benchmark_t::run. Maybe an optional method can be added to the base class tree_api which at least takes an int tid as input (this is returned by omp_get_thread_num() in the run method).

For eg, adding the following method to https://github.com/sfu-dis/pibench/blob/master/include/tree_api.hpp, which can be optionally implemented by wrapper classes:

/**
* Initialize thread-local variables
*/
virtual void thread_init(int tid) {
    // Do nothing
}
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

No branches or pull requests

1 participant