@ti.kernel
def main():
gui = ti.GUI("gui", res=(res_x, res_y))
pos_sun, pos_earth, v_earth, v_sun, a_earth, a_sun = parameter()
while gui.running:
update(a_sun, a_earth, v_sun, v_earth, pos_sun, pos_earth)
gui.set_image(pixels)
gui.show()
error
On line 51 of file “C:\Users\PycharmProjects\pythonProject\taichi-test.py”, in main:
gui = ti.GUI(“gui”, res=(res_x, res_y))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Invalid constant scalar data type: <class ‘taichi.ui.gui.GUI’>
想问下这GUI这么能在KERNEL中运行