Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def place():
ti.root.dense(ti.ij, n // 16).dense(ti.ij, (32, 16)).place(x)
@ti.layout
def place():
ti.root.dense(ti.ij, n // 16).dense(ti.ij, (32, 16)).place(x)
def place():
ti.root.dense(ti.i, n // 4).dense(ti.i, 4).place(x)
ti.root.dense(ti.i, n).place(y)
def place():
ti.root.dense(ti.i, 1).place(x)
def place():
ti.root.dense(ti.i, 1).place(x, x.grad, y, y.grad)
def xy():
ti.root.dense(ti.i, 16).place(x)
def values():
ti.root.dense(ti.ij, (n, m)).place(val)
def place():
ti.root.dense(ti.i, 1).place(x, x.grad, y, y.grad)
def data():
ti.root.dense(ti.i, n).place(x, y, x.grad, y.grad) # place gradient tensors
ti.root.place(L, L.grad)
def place():
ti.root.dense(ti.ij, (n_actuators, n_sin_waves)).place(weights)
ti.root.dense(ti.i, n_actuators).place(bias)
ti.root.dense(ti.ij, (max_steps, n_actuators)).place(actuation)
ti.root.dense(ti.i, n_particles).place(actuator_id, particle_type)
ti.root.dense(ti.l, max_steps).dense(ti.k, n_particles).place(x, v, C, F)
ti.root.dense(ti.ijk, n_grid).place(grid_v_in, grid_m_in, grid_v_out)
ti.root.place(loss, x_avg)
ti.root.dense(ti.ij,
(visualize_resolution, visualize_resolution)).place(screen)
ti.root.lazy_grad()