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

[Doc] Separate arithmetics.rst from syntax.rst and fill it with more details #1761

Merged
merged 4 commits into from
Aug 26, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = #

[Click here for the format server]


So that syntax.rst can focus on explaining Taichi kernels and functions.
I don't rename syntax.rst in afraid of broken links and spoil translators' work in syntax.po.

@codecov
Copy link

codecov bot commented Aug 24, 2020

Codecov Report

Merging #1761 into master will decrease coverage by 0.43%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1761      +/-   ##
==========================================
- Coverage   43.19%   42.75%   -0.44%     
==========================================
  Files          44       44              
  Lines        6075     6132      +57     
  Branches     1050     1070      +20     
==========================================
- Hits         2624     2622       -2     
- Misses       3297     3356      +59     
  Partials      154      154              
Impacted Files Coverage Δ
python/taichi/lang/ops.py 43.75% <66.66%> (-0.34%) ⬇️
python/taichi/lang/__init__.py 42.88% <0.00%> (-5.94%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1bde29...f74bf53. Read the comment docs.

Copy link
Contributor

@isdanni isdanni left a comment

Choose a reason for hiding this comment

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

🚀 as always.

docs/arithmetics.rst Outdated Show resolved Hide resolved
docs/arithmetics.rst Outdated Show resolved Hide resolved
Comment on lines +111 to +119
Builtin-alike functions
***********************

.. function:: abs(x)
.. function:: max(x, y, ...)
.. function:: min(x, y, ...)
.. function:: pow(x, y)

Same as ``x ** y``.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm kinda confused here. What does "Builtin-alike" mean? 🤔 Would just "built-in" be enough?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since abs and max are builtin functions, but they are replaced by ti.ti_abs and ti.ti_max by @ti.kernel, which is our functions. They just share the same interface with the Python built-in ones.

@archibate archibate requested a review from isdanni August 26, 2020 02:16
Copy link
Contributor

@isdanni isdanni left a comment

Choose a reason for hiding this comment

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

All good except needs to determine the Python/C style line :) Thanks!

@archibate archibate added the LGTM label Aug 26, 2020
Copy link

@ArkhamWJZ ArkhamWJZ left a comment

Choose a reason for hiding this comment

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

LGTM! I can't find anything that needs to be changed 👍

@archibate archibate merged commit 0077ccb into taichi-dev:master Aug 26, 2020
@yuanming-hu yuanming-hu mentioned this pull request Sep 1, 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.

3 participants