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

Remove DataType and consistently use const Type * #5167

Open
2 tasks
strongoier opened this issue Jun 14, 2022 · 2 comments
Open
2 tasks

Remove DataType and consistently use const Type * #5167

strongoier opened this issue Jun 14, 2022 · 2 comments
Assignees
Labels
c++ C++ engineering related refactor Refactor of API or codebases welcome contribution

Comments

@strongoier
Copy link
Contributor

Currently, types in Taichi are created and owned by:

class TypeFactory {

A type with same parameters is only created once, so the pointer to it can serve as its unique identifier, which allows trivial equality check.

Some refactoring tasks:

  • Because a type should not be modified once creation, const Type * should be used everywhere.
  • The following class,

    taichi/taichi/ir/type.h

    Lines 53 to 54 in 77ec1a0

    // A "Type" handle. This should be removed later.
    class TI_DLL_EXPORT DataType {
    , is legacy and should be removed.
@strongoier strongoier added welcome contribution refactor Refactor of API or codebases c++ C++ engineering related labels Jun 14, 2022
@taichi-ci-bot taichi-ci-bot moved this to Untriaged in Taichi Lang Jun 14, 2022
@victoriacity victoriacity moved this from Untriaged to Backlog in Taichi Lang Jun 17, 2022
matthewd28 added a commit to matthewd28/taichi that referenced this issue Oct 2, 2022
Modifying TypeFactory class functions to be of const type.
Issue link: taichi-dev#5167
@lin-hitonami lin-hitonami self-assigned this Dec 20, 2022
@Ris-Bali
Copy link

Ris-Bali commented Apr 17, 2023

Hey, @lin-hitonami are you still working on this ? If not I would like to have a look at this issue. Thanks

@lin-hitonami
Copy link
Contributor

@Ris-Bali I'm not working on this. Please go ahead if you want to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ C++ engineering related refactor Refactor of API or codebases welcome contribution
Projects
Status: Backlog
Development

No branches or pull requests

3 participants