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] [refactor] Separate ti.Vector and ti.Matrix implementations #2683

Open
strongoier opened this issue Aug 14, 2021 · 0 comments
Open

[Lang] [refactor] Separate ti.Vector and ti.Matrix implementations #2683

strongoier opened this issue Aug 14, 2021 · 0 comments
Labels
discussion Welcome discussion! refactor Refactor of API or codebases welcome contribution

Comments

@strongoier
Copy link
Contributor

strongoier commented Aug 14, 2021

Currently ti.Vector is implemented as ti.Matrix with m=1. However, this makes code in other parts unable to distinguish between a vector and an actual matrix with m=1, which causes some ad-hoc checks and parameters when number of dimensions matters. For example, we need to manually specify whether to treat m=1 as an actual dimension when transferring to/from external arrays. To get rid of these, we need to separate ti.Vector and ti.Matrix into two classes.

@strongoier strongoier added welcome contribution discussion Welcome discussion! refactor Refactor of API or codebases labels Aug 14, 2021
@strongoier strongoier changed the title Separate ti.Vector and ti.Matrix implementations [Lang] [refactor] Separate ti.Vector and ti.Matrix implementations Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Welcome discussion! refactor Refactor of API or codebases welcome contribution
Projects
None yet
Development

No branches or pull requests

1 participant