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

[Lang] [type] Refine SNode with quant 2/n: Enable struct for on bit_array with bit_vectorize off #5253

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

strongoier
Copy link
Contributor

@strongoier strongoier commented Jun 24, 2022

Related issue = #4857

Previous implementation of struct for on bit_array assumes bit_vectorize is on, and you cannot access a single element inside. However, bit_vectorize is designed for 0/1 arrays, which is not suitable for normal cases. This PR turns bit_vectorize off by default, and supports reading/writing a single element inside struct for on bit_array.

Notes:

  • bit_vectorize == 1 means 1-bit vectorization, which is indeed saying that bit_vectorize is off
  • The key here is to add listgen for the bit_array SNode when bit_vectorize is off

@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit 27a794c
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62b928518d56980008db2468

@strongoier strongoier requested review from k-ye and ailzhang June 27, 2022 05:05
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

LGTM!
btw bit_vectorized==1 => bit_vectorized is off isn't that intuitive but I'd assume you'll refactor this in the followup PRs?

@strongoier
Copy link
Contributor Author

LGTM! btw bit_vectorized==1 => bit_vectorized is off isn't that intuitive but I'd assume you'll refactor this in the followup PRs?

Yep :-)

@strongoier strongoier merged commit 8630f4d into taichi-dev:master Jun 27, 2022
@strongoier strongoier deleted the bit-array-struct-for branch June 27, 2022 09:33
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.

2 participants