Skip to content

Eliminated redundancy in plugin initialization. #1868

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

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

kholland-intel
Copy link
Contributor

Passed the implementation of pi initialization into a "call_once" function, so
that plugin initiliazation only needs to be executed once. After the first time,
the already initiliazed plugin will be returned.

Also, updated pi::initialize to return const reference to the global vector of
plugins, rather than a temporary copy of it.

@kholland-intel kholland-intel requested review from smaslov-intel and a team as code owners June 10, 2020 15:46
@bader
Copy link
Contributor

bader commented Jun 10, 2020

Looks very similar to #1614.

@smaslov-intel
Copy link
Contributor

Looks very similar to #1614.

@bader It intentionally is. It additionally resolves the comment in https://github.com/intel/llvm/pull/1614/files#r423770533

The #1614 should be abandoned in favor of this PR.

smaslov-intel
smaslov-intel previously approved these changes Jun 10, 2020
@bader
Copy link
Contributor

bader commented Jun 10, 2020

Looks very similar to #1614.

@bader It intentionally is. It additionally resolves the comment in https://github.com/intel/llvm/pull/1614/files#r423770533

The #1614 should be abandoned in favor of this PR.

Okay. Thanks for the update. @smaslov-intel, please, close #1614.
@kholland-intel, please, fix formatting issues.

Passed the implementation of pi initialization into a "call_once" function, so
that plugin initiliazation only needs to be executed once. After the first time,
the already initiliazed plugin will be returned.

Also, updated pi::initialize to return const reference to the global vector of
plugins, rather than a temporary copy of it.
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