Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions taichi_glsl/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def iTime(self):
raise Exception(
'Add ``self.define_input()`` to ``on_init`` if you '
'wish to use inputs')
if ti.inside_kernel():
if ti.lang.impl.inside_kernel():
return ti.subscript(self._iTime, None)
else:
return self._iTime[None]
Expand All @@ -344,7 +344,7 @@ def iFrame(self):
raise Exception(
'Add ``self.define_input()`` to ``on_init`` if you '
'wish to use inputs')
if ti.inside_kernel():
if ti.lang.impl.inside_kernel():
return ti.subscript(self._iFrame, None)
else:
return self._iFrame[None]
Expand All @@ -358,7 +358,7 @@ def iMouse(self):
raise Exception(
'Add ``self.define_input()`` to ``on_init`` if you '
'wish to use inputs')
if ti.inside_kernel():
if ti.lang.impl.inside_kernel():
return self._iMouse.subscript(None)
else:
return self._iMouse[None]
Expand All @@ -377,7 +377,7 @@ def iMouseButton(self):
raise Exception(
'Add ``self.define_input()`` to ``on_init`` if you '
'wish to use inputs')
if ti.inside_kernel():
if ti.lang.impl.inside_kernel():
return self._iMouseButton.subscript(None)
else:
return self._iMouseButton[None]
Expand All @@ -396,7 +396,7 @@ def iKeyDirection(self):
raise Exception(
'Add ``self.define_input()`` to ``on_init`` if you '
'wish to use inputs')
if ti.inside_kernel():
if ti.lang.impl.inside_kernel():
return self._iKeyDirection.subscript(None)
else:
return self._iKeyDirection[None]
Expand Down
2 changes: 1 addition & 1 deletion taichi_glsl/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def _vector_getattr(self, key):

else:
for i, sgn in stk:
if ti.inside_kernel():
if ti.lang.impl.inside_kernel():
t = self.subscript(i) * sgn
ret.append(ti.expr_init(t))
else:
Expand Down