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

[opengl] add TI_ENABLE_OPENGL env var to disable OpenGL #962

Merged
merged 5 commits into from
May 13, 2020

Conversation

archibate
Copy link
Collaborator

@archibate archibate requested review from yuanming-hu and k-ye and removed request for yuanming-hu May 12, 2020 16:11
@yuanming-hu
Copy link
Member

Thanks! I'm at a meeting but I'll take a look in the afternoon! Please don't wait for me - take care and get enough sleep :-)

Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Looks good except for a few places to discuss.

taichi/backends/cuda/cuda_driver.cpp Outdated Show resolved Hide resolved

TLANG_NAMESPACE_BEGIN

static int get_environ_config(const std::string &name, int default_value = 0)
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to make an interface like template <typename T> get_environ_config(const std::string &name, const T &default_value) { ... }, and then specialize it for int?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess use override functions instead of T is better idea, since the func stoi and stof.

Copy link
Member

Choose a reason for hiding this comment

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

You can always use different conversion functions in different specializations. Or you can simply use if constexpr.

taichi/backends/metal/api.cpp Outdated Show resolved Hide resolved
@archibate archibate requested a review from yuanming-hu May 13, 2020 04:05
Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM now. Let's have this released in v0.6.4 so that people using virtual machines can have a try :-)

@archibate archibate merged commit e919a2c into taichi-dev:master May 13, 2020
@yuanming-hu yuanming-hu changed the title [opengl] add TI_WITH_OPENGL env var to disable OpenGL [opengl] add TI_ENABLE_OPENGL env var to disable OpenGL May 13, 2020
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