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

Add init global state interface #1077

Merged
merged 1 commit into from
Nov 29, 2022
Merged

Add init global state interface #1077

merged 1 commit into from
Nov 29, 2022

Conversation

andyfengHKU
Copy link
Contributor

@andyfengHKU andyfengHKU commented Nov 29, 2022

This PR differentiate the initialization between global and local state. Global state should be only initialized once while local state is initialized for each thread.

Remove following code pattern in global state

if (!initialized)
    initialize
initialized = true

Other change
We used to rely on vectors to get input data type. This design is bad since it requires first generate vector (i.e. initialize local state) before accessing data type. This PR also changes this by giving data type during construction.

src/include/processor/processor_task.h Outdated Show resolved Hide resolved
src/processor/processor.cpp Outdated Show resolved Hide resolved
src/processor/processor_task.cpp Outdated Show resolved Hide resolved
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.

None yet

2 participants