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

[llvm] Add support for data types of different sizes on dynamic SNode #6490

Merged
merged 5 commits into from
Nov 2, 2022

Conversation

lin-hitonami
Copy link
Contributor

@lin-hitonami lin-hitonami commented Nov 1, 2022

Issue: #5420

Brief Summary

This PR splits append operation of Dynamic SNode to two steps:

  1. Allocate the space for the new element, increase the length by one, and return the address (void *) to the first byte of the new element.
  2. Use GetChStmt to get the pointer of the element (of the right type) from the address returned in step 1, and use GlobalStoreStmt to store the value into the address.

This PR breaks Dynamic SNode on Metal

@netlify
Copy link

netlify bot commented Nov 1, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit a4cc0a7
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/636208e9e2757600089cbd3d
😎 Deploy Preview https://deploy-preview-6490--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@lin-hitonami lin-hitonami changed the title [llvm] Add support for data types of different size on dynamic SNode [llvm] Add support for data types of different sizes on dynamic SNode Nov 1, 2022
@lin-hitonami lin-hitonami requested a review from k-ye November 1, 2022 08:09
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.

Thanks!!

@lin-hitonami lin-hitonami merged commit 2ee18c5 into taichi-dev:master Nov 2, 2022
@lin-hitonami lin-hitonami deleted the dynamic branch November 2, 2022 07:48
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…taichi-dev#6490)

Issue: taichi-dev#5420

### Brief Summary
This PR splits `append` operation of Dynamic SNode to two steps:
1. Allocate the space for the new element, increase the length by one,
and return the address (void *) to the first byte of the new element.
2. Use `GetChStmt` to get the pointer of the element (of the right type)
from the address returned in step 1, and use `GlobalStoreStmt` to store
the value into the address.

**This PR breaks Dynamic SNode on Metal**

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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