Taichi: General power operator x ** y

Created on 15 Feb 2020  路  5Comments  路  Source: taichi-dev/taichi

Concisely describe the proposed feature
Allow using x ** y in Taichi kernels

Describe the solution you'd like
In the preprocessor, convert x ** y into ti.pow(x, y).
Add a binary operator pow to the IR and codegen.

Implementing this feature will help the contributor understand the Taichi compiler code structure. Assigning this task to our great intern @xumingkuan as a practice.

Issue raised here: https://forum.taichi.graphics/t/the-right-use-method-of-sqrt/68

feature request

Most helpful comment

What a great chance to dive into the Taichi compiler! May I have a try (just for exercise)?

All 5 comments

What a great chance to dive into the Taichi compiler! May I have a try (just for exercise)?

Sure, thanks! Let's reduce some burden on @xumingkuan then.

Just passing by. Duplicated with #247?

This is nicely implemented by @archibate.

Was this page helpful?
0 / 5 - 0 ratings