warp-lang 1.9.0__py3-none-win_amd64.whl → 1.10.0rc2__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of warp-lang might be problematic. Click here for more details.

Files changed (350) hide show
  1. warp/__init__.py +301 -287
  2. warp/__init__.pyi +2220 -313
  3. warp/_src/__init__.py +14 -0
  4. warp/_src/autograd.py +1075 -0
  5. warp/_src/build.py +618 -0
  6. warp/_src/build_dll.py +640 -0
  7. warp/{builtins.py → _src/builtins.py} +1497 -226
  8. warp/_src/codegen.py +4359 -0
  9. warp/{config.py → _src/config.py} +178 -169
  10. warp/_src/constants.py +57 -0
  11. warp/_src/context.py +8294 -0
  12. warp/_src/dlpack.py +462 -0
  13. warp/_src/fabric.py +355 -0
  14. warp/_src/fem/__init__.py +14 -0
  15. warp/_src/fem/adaptivity.py +508 -0
  16. warp/_src/fem/cache.py +687 -0
  17. warp/_src/fem/dirichlet.py +188 -0
  18. warp/{fem → _src/fem}/domain.py +40 -30
  19. warp/_src/fem/field/__init__.py +131 -0
  20. warp/_src/fem/field/field.py +701 -0
  21. warp/{fem → _src/fem}/field/nodal_field.py +30 -15
  22. warp/{fem → _src/fem}/field/restriction.py +1 -1
  23. warp/{fem → _src/fem}/field/virtual.py +53 -27
  24. warp/_src/fem/geometry/__init__.py +32 -0
  25. warp/{fem → _src/fem}/geometry/adaptive_nanogrid.py +77 -163
  26. warp/_src/fem/geometry/closest_point.py +97 -0
  27. warp/{fem → _src/fem}/geometry/deformed_geometry.py +14 -22
  28. warp/{fem → _src/fem}/geometry/element.py +32 -10
  29. warp/{fem → _src/fem}/geometry/geometry.py +48 -20
  30. warp/{fem → _src/fem}/geometry/grid_2d.py +12 -23
  31. warp/{fem → _src/fem}/geometry/grid_3d.py +12 -23
  32. warp/{fem → _src/fem}/geometry/hexmesh.py +40 -63
  33. warp/{fem → _src/fem}/geometry/nanogrid.py +255 -248
  34. warp/{fem → _src/fem}/geometry/partition.py +121 -63
  35. warp/{fem → _src/fem}/geometry/quadmesh.py +26 -45
  36. warp/{fem → _src/fem}/geometry/tetmesh.py +40 -63
  37. warp/{fem → _src/fem}/geometry/trimesh.py +26 -45
  38. warp/{fem → _src/fem}/integrate.py +164 -158
  39. warp/_src/fem/linalg.py +383 -0
  40. warp/_src/fem/operator.py +396 -0
  41. warp/_src/fem/polynomial.py +229 -0
  42. warp/{fem → _src/fem}/quadrature/pic_quadrature.py +15 -20
  43. warp/{fem → _src/fem}/quadrature/quadrature.py +95 -47
  44. warp/_src/fem/space/__init__.py +248 -0
  45. warp/{fem → _src/fem}/space/basis_function_space.py +20 -11
  46. warp/_src/fem/space/basis_space.py +679 -0
  47. warp/{fem → _src/fem}/space/dof_mapper.py +3 -3
  48. warp/{fem → _src/fem}/space/function_space.py +14 -13
  49. warp/{fem → _src/fem}/space/grid_2d_function_space.py +4 -7
  50. warp/{fem → _src/fem}/space/grid_3d_function_space.py +4 -4
  51. warp/{fem → _src/fem}/space/hexmesh_function_space.py +4 -10
  52. warp/{fem → _src/fem}/space/nanogrid_function_space.py +3 -9
  53. warp/{fem → _src/fem}/space/partition.py +117 -60
  54. warp/{fem → _src/fem}/space/quadmesh_function_space.py +4 -10
  55. warp/{fem → _src/fem}/space/restriction.py +66 -33
  56. warp/_src/fem/space/shape/__init__.py +152 -0
  57. warp/{fem → _src/fem}/space/shape/cube_shape_function.py +9 -9
  58. warp/{fem → _src/fem}/space/shape/shape_function.py +8 -9
  59. warp/{fem → _src/fem}/space/shape/square_shape_function.py +6 -6
  60. warp/{fem → _src/fem}/space/shape/tet_shape_function.py +3 -3
  61. warp/{fem → _src/fem}/space/shape/triangle_shape_function.py +3 -3
  62. warp/{fem → _src/fem}/space/tetmesh_function_space.py +3 -9
  63. warp/_src/fem/space/topology.py +459 -0
  64. warp/{fem → _src/fem}/space/trimesh_function_space.py +3 -9
  65. warp/_src/fem/types.py +112 -0
  66. warp/_src/fem/utils.py +486 -0
  67. warp/_src/jax.py +186 -0
  68. warp/_src/jax_experimental/__init__.py +14 -0
  69. warp/_src/jax_experimental/custom_call.py +387 -0
  70. warp/_src/jax_experimental/ffi.py +1284 -0
  71. warp/_src/jax_experimental/xla_ffi.py +656 -0
  72. warp/_src/marching_cubes.py +708 -0
  73. warp/_src/math.py +414 -0
  74. warp/_src/optim/__init__.py +14 -0
  75. warp/_src/optim/adam.py +163 -0
  76. warp/_src/optim/linear.py +1606 -0
  77. warp/_src/optim/sgd.py +112 -0
  78. warp/_src/paddle.py +406 -0
  79. warp/_src/render/__init__.py +14 -0
  80. warp/_src/render/imgui_manager.py +289 -0
  81. warp/_src/render/render_opengl.py +3636 -0
  82. warp/_src/render/render_usd.py +937 -0
  83. warp/_src/render/utils.py +160 -0
  84. warp/_src/sparse.py +2716 -0
  85. warp/_src/tape.py +1206 -0
  86. warp/{thirdparty → _src/thirdparty}/unittest_parallel.py +9 -2
  87. warp/_src/torch.py +391 -0
  88. warp/_src/types.py +5870 -0
  89. warp/_src/utils.py +1693 -0
  90. warp/autograd.py +12 -1054
  91. warp/bin/warp-clang.dll +0 -0
  92. warp/bin/warp.dll +0 -0
  93. warp/build.py +8 -588
  94. warp/build_dll.py +6 -471
  95. warp/codegen.py +6 -4246
  96. warp/constants.py +6 -39
  97. warp/context.py +12 -7851
  98. warp/dlpack.py +6 -444
  99. warp/examples/distributed/example_jacobi_mpi.py +4 -5
  100. warp/examples/fem/example_adaptive_grid.py +1 -1
  101. warp/examples/fem/example_apic_fluid.py +1 -1
  102. warp/examples/fem/example_burgers.py +8 -8
  103. warp/examples/fem/example_diffusion.py +1 -1
  104. warp/examples/fem/example_distortion_energy.py +1 -1
  105. warp/examples/fem/example_mixed_elasticity.py +2 -2
  106. warp/examples/fem/example_navier_stokes.py +1 -1
  107. warp/examples/fem/example_nonconforming_contact.py +7 -7
  108. warp/examples/fem/example_stokes.py +1 -1
  109. warp/examples/fem/example_stokes_transfer.py +1 -1
  110. warp/examples/fem/utils.py +2 -2
  111. warp/examples/interop/example_jax_callable.py +1 -1
  112. warp/examples/interop/example_jax_ffi_callback.py +1 -1
  113. warp/examples/interop/example_jax_kernel.py +3 -2
  114. warp/examples/tile/example_tile_mcgp.py +191 -0
  115. warp/fabric.py +6 -337
  116. warp/fem/__init__.py +159 -97
  117. warp/fem/adaptivity.py +7 -489
  118. warp/fem/cache.py +9 -648
  119. warp/fem/dirichlet.py +6 -184
  120. warp/fem/field/__init__.py +8 -109
  121. warp/fem/field/field.py +7 -652
  122. warp/fem/geometry/__init__.py +7 -18
  123. warp/fem/geometry/closest_point.py +11 -77
  124. warp/fem/linalg.py +18 -366
  125. warp/fem/operator.py +11 -369
  126. warp/fem/polynomial.py +9 -209
  127. warp/fem/space/__init__.py +5 -211
  128. warp/fem/space/basis_space.py +6 -662
  129. warp/fem/space/shape/__init__.py +41 -118
  130. warp/fem/space/topology.py +6 -437
  131. warp/fem/types.py +6 -81
  132. warp/fem/utils.py +11 -444
  133. warp/jax.py +8 -165
  134. warp/jax_experimental/__init__.py +14 -1
  135. warp/jax_experimental/custom_call.py +8 -342
  136. warp/jax_experimental/ffi.py +17 -853
  137. warp/jax_experimental/xla_ffi.py +5 -596
  138. warp/marching_cubes.py +5 -689
  139. warp/math.py +16 -393
  140. warp/native/array.h +385 -37
  141. warp/native/builtin.h +316 -39
  142. warp/native/bvh.cpp +43 -9
  143. warp/native/bvh.cu +62 -27
  144. warp/native/bvh.h +310 -309
  145. warp/native/clang/clang.cpp +102 -97
  146. warp/native/coloring.cpp +0 -1
  147. warp/native/crt.h +208 -0
  148. warp/native/exports.h +156 -0
  149. warp/native/hashgrid.cu +2 -0
  150. warp/native/intersect.h +24 -1
  151. warp/native/intersect_tri.h +44 -35
  152. warp/native/mat.h +1456 -276
  153. warp/native/mesh.cpp +4 -4
  154. warp/native/mesh.cu +4 -2
  155. warp/native/mesh.h +176 -61
  156. warp/native/quat.h +0 -52
  157. warp/native/scan.cu +2 -0
  158. warp/native/sort.cu +22 -13
  159. warp/native/sort.h +2 -0
  160. warp/native/sparse.cu +7 -3
  161. warp/native/spatial.h +12 -0
  162. warp/native/tile.h +837 -70
  163. warp/native/tile_radix_sort.h +1 -1
  164. warp/native/tile_reduce.h +394 -46
  165. warp/native/tile_scan.h +4 -4
  166. warp/native/vec.h +469 -53
  167. warp/native/version.h +23 -0
  168. warp/native/volume.cpp +1 -1
  169. warp/native/volume.cu +1 -0
  170. warp/native/volume.h +1 -1
  171. warp/native/volume_builder.cu +2 -0
  172. warp/native/warp.cpp +60 -32
  173. warp/native/warp.cu +313 -201
  174. warp/native/warp.h +14 -11
  175. warp/optim/__init__.py +6 -3
  176. warp/optim/adam.py +6 -145
  177. warp/optim/linear.py +14 -1585
  178. warp/optim/sgd.py +6 -94
  179. warp/paddle.py +6 -388
  180. warp/render/__init__.py +8 -4
  181. warp/render/imgui_manager.py +7 -267
  182. warp/render/render_opengl.py +6 -3616
  183. warp/render/render_usd.py +6 -918
  184. warp/render/utils.py +6 -142
  185. warp/sparse.py +37 -2563
  186. warp/tape.py +6 -1188
  187. warp/tests/__main__.py +1 -1
  188. warp/tests/cuda/test_async.py +4 -4
  189. warp/tests/cuda/test_conditional_captures.py +1 -1
  190. warp/tests/cuda/test_multigpu.py +1 -1
  191. warp/tests/cuda/test_streams.py +58 -1
  192. warp/tests/geometry/test_bvh.py +157 -22
  193. warp/tests/geometry/test_hash_grid.py +38 -0
  194. warp/tests/geometry/test_marching_cubes.py +0 -1
  195. warp/tests/geometry/test_mesh.py +5 -3
  196. warp/tests/geometry/test_mesh_query_aabb.py +5 -12
  197. warp/tests/geometry/test_mesh_query_point.py +5 -2
  198. warp/tests/geometry/test_mesh_query_ray.py +15 -3
  199. warp/tests/geometry/test_volume_write.py +5 -5
  200. warp/tests/interop/test_dlpack.py +14 -14
  201. warp/tests/interop/test_jax.py +1382 -79
  202. warp/tests/interop/test_paddle.py +1 -1
  203. warp/tests/test_adam.py +0 -1
  204. warp/tests/test_arithmetic.py +9 -9
  205. warp/tests/test_array.py +529 -100
  206. warp/tests/test_array_reduce.py +3 -3
  207. warp/tests/test_atomic.py +12 -8
  208. warp/tests/test_atomic_bitwise.py +209 -0
  209. warp/tests/test_atomic_cas.py +4 -4
  210. warp/tests/test_bool.py +2 -2
  211. warp/tests/test_builtins_resolution.py +5 -571
  212. warp/tests/test_codegen.py +34 -15
  213. warp/tests/test_conditional.py +1 -1
  214. warp/tests/test_context.py +6 -6
  215. warp/tests/test_copy.py +242 -161
  216. warp/tests/test_ctypes.py +3 -3
  217. warp/tests/test_devices.py +24 -2
  218. warp/tests/test_examples.py +16 -84
  219. warp/tests/test_fabricarray.py +35 -35
  220. warp/tests/test_fast_math.py +0 -2
  221. warp/tests/test_fem.py +60 -14
  222. warp/tests/test_fixedarray.py +3 -3
  223. warp/tests/test_func.py +8 -5
  224. warp/tests/test_generics.py +1 -1
  225. warp/tests/test_indexedarray.py +24 -24
  226. warp/tests/test_intersect.py +39 -9
  227. warp/tests/test_large.py +1 -1
  228. warp/tests/test_lerp.py +3 -1
  229. warp/tests/test_linear_solvers.py +1 -1
  230. warp/tests/test_map.py +49 -4
  231. warp/tests/test_mat.py +52 -62
  232. warp/tests/test_mat_constructors.py +4 -5
  233. warp/tests/test_mat_lite.py +1 -1
  234. warp/tests/test_mat_scalar_ops.py +121 -121
  235. warp/tests/test_math.py +34 -0
  236. warp/tests/test_module_aot.py +4 -4
  237. warp/tests/test_modules_lite.py +28 -2
  238. warp/tests/test_print.py +11 -11
  239. warp/tests/test_quat.py +93 -58
  240. warp/tests/test_runlength_encode.py +1 -1
  241. warp/tests/test_scalar_ops.py +38 -10
  242. warp/tests/test_smoothstep.py +1 -1
  243. warp/tests/test_sparse.py +126 -15
  244. warp/tests/test_spatial.py +105 -87
  245. warp/tests/test_special_values.py +6 -6
  246. warp/tests/test_static.py +7 -7
  247. warp/tests/test_struct.py +13 -2
  248. warp/tests/test_triangle_closest_point.py +48 -1
  249. warp/tests/test_tuple.py +96 -0
  250. warp/tests/test_types.py +82 -9
  251. warp/tests/test_utils.py +52 -52
  252. warp/tests/test_vec.py +29 -29
  253. warp/tests/test_vec_constructors.py +5 -5
  254. warp/tests/test_vec_scalar_ops.py +97 -97
  255. warp/tests/test_version.py +75 -0
  256. warp/tests/tile/test_tile.py +239 -0
  257. warp/tests/tile/test_tile_atomic_bitwise.py +403 -0
  258. warp/tests/tile/test_tile_cholesky.py +7 -4
  259. warp/tests/tile/test_tile_load.py +26 -2
  260. warp/tests/tile/test_tile_mathdx.py +3 -3
  261. warp/tests/tile/test_tile_matmul.py +1 -1
  262. warp/tests/tile/test_tile_mlp.py +2 -4
  263. warp/tests/tile/test_tile_reduce.py +214 -13
  264. warp/tests/unittest_suites.py +6 -14
  265. warp/tests/unittest_utils.py +10 -9
  266. warp/tests/walkthrough_debug.py +3 -1
  267. warp/torch.py +6 -373
  268. warp/types.py +29 -5750
  269. warp/utils.py +10 -1659
  270. {warp_lang-1.9.0.dist-info → warp_lang-1.10.0rc2.dist-info}/METADATA +47 -103
  271. warp_lang-1.10.0rc2.dist-info/RECORD +468 -0
  272. warp_lang-1.10.0rc2.dist-info/licenses/licenses/Gaia-LICENSE.txt +6 -0
  273. warp_lang-1.10.0rc2.dist-info/licenses/licenses/appdirs-LICENSE.txt +22 -0
  274. warp_lang-1.10.0rc2.dist-info/licenses/licenses/asset_pixel_jpg-LICENSE.txt +3 -0
  275. warp_lang-1.10.0rc2.dist-info/licenses/licenses/cuda-LICENSE.txt +1582 -0
  276. warp_lang-1.10.0rc2.dist-info/licenses/licenses/dlpack-LICENSE.txt +201 -0
  277. warp_lang-1.10.0rc2.dist-info/licenses/licenses/fp16-LICENSE.txt +28 -0
  278. warp_lang-1.10.0rc2.dist-info/licenses/licenses/libmathdx-LICENSE.txt +220 -0
  279. warp_lang-1.10.0rc2.dist-info/licenses/licenses/llvm-LICENSE.txt +279 -0
  280. warp_lang-1.10.0rc2.dist-info/licenses/licenses/moller-LICENSE.txt +16 -0
  281. warp_lang-1.10.0rc2.dist-info/licenses/licenses/nanovdb-LICENSE.txt +2 -0
  282. warp_lang-1.10.0rc2.dist-info/licenses/licenses/nvrtc-LICENSE.txt +1592 -0
  283. warp_lang-1.10.0rc2.dist-info/licenses/licenses/svd-LICENSE.txt +23 -0
  284. warp_lang-1.10.0rc2.dist-info/licenses/licenses/unittest_parallel-LICENSE.txt +21 -0
  285. warp_lang-1.10.0rc2.dist-info/licenses/licenses/usd-LICENSE.txt +213 -0
  286. warp_lang-1.10.0rc2.dist-info/licenses/licenses/windingnumber-LICENSE.txt +21 -0
  287. warp/examples/assets/cartpole.urdf +0 -110
  288. warp/examples/assets/crazyflie.usd +0 -0
  289. warp/examples/assets/nv_ant.xml +0 -92
  290. warp/examples/assets/nv_humanoid.xml +0 -183
  291. warp/examples/assets/quadruped.urdf +0 -268
  292. warp/examples/optim/example_bounce.py +0 -266
  293. warp/examples/optim/example_cloth_throw.py +0 -228
  294. warp/examples/optim/example_drone.py +0 -870
  295. warp/examples/optim/example_inverse_kinematics.py +0 -182
  296. warp/examples/optim/example_inverse_kinematics_torch.py +0 -191
  297. warp/examples/optim/example_softbody_properties.py +0 -400
  298. warp/examples/optim/example_spring_cage.py +0 -245
  299. warp/examples/optim/example_trajectory.py +0 -227
  300. warp/examples/sim/example_cartpole.py +0 -143
  301. warp/examples/sim/example_cloth.py +0 -225
  302. warp/examples/sim/example_cloth_self_contact.py +0 -316
  303. warp/examples/sim/example_granular.py +0 -130
  304. warp/examples/sim/example_granular_collision_sdf.py +0 -202
  305. warp/examples/sim/example_jacobian_ik.py +0 -244
  306. warp/examples/sim/example_particle_chain.py +0 -124
  307. warp/examples/sim/example_quadruped.py +0 -203
  308. warp/examples/sim/example_rigid_chain.py +0 -203
  309. warp/examples/sim/example_rigid_contact.py +0 -195
  310. warp/examples/sim/example_rigid_force.py +0 -133
  311. warp/examples/sim/example_rigid_gyroscopic.py +0 -115
  312. warp/examples/sim/example_rigid_soft_contact.py +0 -140
  313. warp/examples/sim/example_soft_body.py +0 -196
  314. warp/examples/tile/example_tile_walker.py +0 -327
  315. warp/sim/__init__.py +0 -74
  316. warp/sim/articulation.py +0 -793
  317. warp/sim/collide.py +0 -2570
  318. warp/sim/graph_coloring.py +0 -307
  319. warp/sim/import_mjcf.py +0 -791
  320. warp/sim/import_snu.py +0 -227
  321. warp/sim/import_urdf.py +0 -579
  322. warp/sim/import_usd.py +0 -898
  323. warp/sim/inertia.py +0 -357
  324. warp/sim/integrator.py +0 -245
  325. warp/sim/integrator_euler.py +0 -2000
  326. warp/sim/integrator_featherstone.py +0 -2101
  327. warp/sim/integrator_vbd.py +0 -2487
  328. warp/sim/integrator_xpbd.py +0 -3295
  329. warp/sim/model.py +0 -4821
  330. warp/sim/particles.py +0 -121
  331. warp/sim/render.py +0 -431
  332. warp/sim/utils.py +0 -431
  333. warp/tests/sim/disabled_kinematics.py +0 -244
  334. warp/tests/sim/test_cloth.py +0 -863
  335. warp/tests/sim/test_collision.py +0 -743
  336. warp/tests/sim/test_coloring.py +0 -347
  337. warp/tests/sim/test_inertia.py +0 -161
  338. warp/tests/sim/test_model.py +0 -226
  339. warp/tests/sim/test_sim_grad.py +0 -287
  340. warp/tests/sim/test_sim_grad_bounce_linear.py +0 -212
  341. warp/tests/sim/test_sim_kinematics.py +0 -98
  342. warp/thirdparty/__init__.py +0 -0
  343. warp_lang-1.9.0.dist-info/RECORD +0 -456
  344. /warp/{fem → _src/fem}/quadrature/__init__.py +0 -0
  345. /warp/{tests/sim → _src/thirdparty}/__init__.py +0 -0
  346. /warp/{thirdparty → _src/thirdparty}/appdirs.py +0 -0
  347. /warp/{thirdparty → _src/thirdparty}/dlpack.py +0 -0
  348. {warp_lang-1.9.0.dist-info → warp_lang-1.10.0rc2.dist-info}/WHEEL +0 -0
  349. {warp_lang-1.9.0.dist-info → warp_lang-1.10.0rc2.dist-info}/licenses/LICENSE.md +0 -0
  350. {warp_lang-1.9.0.dist-info → warp_lang-1.10.0rc2.dist-info}/top_level.txt +0 -0
warp/__init__.pyi CHANGED
@@ -20,6 +20,7 @@ from typing import Tuple
20
20
  from typing import Callable
21
21
  from typing import TypeVar
22
22
  from typing import Generic
23
+ from typing import Sequence
23
24
  from typing import overload as over
24
25
 
25
26
  Length = TypeVar("Length", bound=int)
@@ -36,302 +37,1731 @@ FabricArray = Generic[DType]
36
37
  IndexedFabricArray = Generic[DType]
37
38
  Tile = Generic[DType, Shape]
38
39
 
39
- from warp.types import array as array
40
- from warp.types import array1d as array1d
41
- from warp.types import array2d as array2d
42
- from warp.types import array3d as array3d
43
- from warp.types import array4d as array4d
44
- from warp.types import constant as constant
45
- from warp.types import from_ptr as from_ptr
46
- from warp.types import fixedarray as fixedarray
47
- from warp.types import indexedarray as indexedarray
48
- from warp.types import indexedarray1d as indexedarray1d
49
- from warp.types import indexedarray2d as indexedarray2d
50
- from warp.types import indexedarray3d as indexedarray3d
51
- from warp.types import indexedarray4d as indexedarray4d
52
- from warp.fabric import fabricarray as fabricarray
53
- from warp.fabric import fabricarrayarray as fabricarrayarray
54
- from warp.fabric import indexedfabricarray as indexedfabricarray
55
- from warp.fabric import indexedfabricarrayarray as indexedfabricarrayarray
56
- from warp.types import tile as tile
57
-
58
- from warp.types import bool as bool
59
- from warp.types import int8 as int8
60
- from warp.types import uint8 as uint8
61
- from warp.types import int16 as int16
62
- from warp.types import uint16 as uint16
63
- from warp.types import int32 as int32
64
- from warp.types import uint32 as uint32
65
- from warp.types import int64 as int64
66
- from warp.types import uint64 as uint64
67
- from warp.types import float16 as float16
68
- from warp.types import float32 as float32
69
- from warp.types import float64 as float64
70
-
71
- from warp.types import vec2 as vec2
72
- from warp.types import vec2b as vec2b
73
- from warp.types import vec2ub as vec2ub
74
- from warp.types import vec2s as vec2s
75
- from warp.types import vec2us as vec2us
76
- from warp.types import vec2i as vec2i
77
- from warp.types import vec2ui as vec2ui
78
- from warp.types import vec2l as vec2l
79
- from warp.types import vec2ul as vec2ul
80
- from warp.types import vec2h as vec2h
81
- from warp.types import vec2f as vec2f
82
- from warp.types import vec2d as vec2d
83
-
84
- from warp.types import vec3 as vec3
85
- from warp.types import vec3b as vec3b
86
- from warp.types import vec3ub as vec3ub
87
- from warp.types import vec3s as vec3s
88
- from warp.types import vec3us as vec3us
89
- from warp.types import vec3i as vec3i
90
- from warp.types import vec3ui as vec3ui
91
- from warp.types import vec3l as vec3l
92
- from warp.types import vec3ul as vec3ul
93
- from warp.types import vec3h as vec3h
94
- from warp.types import vec3f as vec3f
95
- from warp.types import vec3d as vec3d
96
-
97
- from warp.types import vec4 as vec4
98
- from warp.types import vec4b as vec4b
99
- from warp.types import vec4ub as vec4ub
100
- from warp.types import vec4s as vec4s
101
- from warp.types import vec4us as vec4us
102
- from warp.types import vec4i as vec4i
103
- from warp.types import vec4ui as vec4ui
104
- from warp.types import vec4l as vec4l
105
- from warp.types import vec4ul as vec4ul
106
- from warp.types import vec4h as vec4h
107
- from warp.types import vec4f as vec4f
108
- from warp.types import vec4d as vec4d
109
-
110
- from warp.types import mat22 as mat22
111
- from warp.types import mat22h as mat22h
112
- from warp.types import mat22f as mat22f
113
- from warp.types import mat22d as mat22d
114
-
115
- from warp.types import mat33 as mat33
116
- from warp.types import mat33h as mat33h
117
- from warp.types import mat33f as mat33f
118
- from warp.types import mat33d as mat33d
119
-
120
- from warp.types import mat44 as mat44
121
- from warp.types import mat44h as mat44h
122
- from warp.types import mat44f as mat44f
123
- from warp.types import mat44d as mat44d
124
-
125
- from warp.types import quat as quat
126
- from warp.types import quath as quath
127
- from warp.types import quatf as quatf
128
- from warp.types import quatd as quatd
129
-
130
- from warp.types import transform as transform
131
- from warp.types import transformh as transformh
132
- from warp.types import transformf as transformf
133
- from warp.types import transformd as transformd
134
-
135
- from warp.types import spatial_vector as spatial_vector
136
- from warp.types import spatial_vectorh as spatial_vectorh
137
- from warp.types import spatial_vectorf as spatial_vectorf
138
- from warp.types import spatial_vectord as spatial_vectord
139
-
140
- from warp.types import spatial_matrix as spatial_matrix
141
- from warp.types import spatial_matrixh as spatial_matrixh
142
- from warp.types import spatial_matrixf as spatial_matrixf
143
- from warp.types import spatial_matrixd as spatial_matrixd
144
-
145
- from warp.types import Int as Int
146
- from warp.types import Float as Float
147
- from warp.types import Scalar as Scalar
148
-
149
- from warp.types import Bvh as Bvh
150
- from warp.types import Mesh as Mesh
151
- from warp.types import HashGrid as HashGrid
152
- from warp.types import Volume as Volume
153
- from warp.types import BvhQuery as BvhQuery
154
- from warp.types import HashGridQuery as HashGridQuery
155
- from warp.types import MeshQueryAABB as MeshQueryAABB
156
- from warp.types import MeshQueryPoint as MeshQueryPoint
157
- from warp.types import MeshQueryRay as MeshQueryRay
158
-
159
- from warp.types import matmul as matmul
160
- from warp.types import adj_matmul as adj_matmul
161
- from warp.types import batched_matmul as batched_matmul
162
- from warp.types import adj_batched_matmul as adj_batched_matmul
163
-
164
- from warp.types import vector as vec
165
- from warp.types import matrix as mat
166
-
167
- from warp.types import matrix_from_cols as matrix_from_cols
168
- from warp.types import matrix_from_rows as matrix_from_rows
169
-
170
- from warp.types import dtype_from_numpy as dtype_from_numpy
171
- from warp.types import dtype_to_numpy as dtype_to_numpy
172
-
173
- from warp.types import from_ipc_handle as from_ipc_handle
174
-
175
- from warp.context import init as init
176
- from warp.context import func as func
177
- from warp.context import func_grad as func_grad
178
- from warp.context import func_replay as func_replay
179
- from warp.context import func_native as func_native
180
- from warp.context import kernel as kernel
181
- from warp.context import struct as struct
182
- from warp.context import overload as overload
183
-
184
- from warp.context import is_cpu_available as is_cpu_available
185
- from warp.context import is_cuda_available as is_cuda_available
186
- from warp.context import is_device_available as is_device_available
187
- from warp.context import get_devices as get_devices
188
- from warp.context import get_preferred_device as get_preferred_device
189
- from warp.context import get_cuda_devices as get_cuda_devices
190
- from warp.context import get_cuda_device_count as get_cuda_device_count
191
- from warp.context import get_cuda_device as get_cuda_device
192
- from warp.context import map_cuda_device as map_cuda_device
193
- from warp.context import unmap_cuda_device as unmap_cuda_device
194
- from warp.context import get_device as get_device
195
- from warp.context import set_device as set_device
196
- from warp.context import synchronize_device as synchronize_device
197
-
198
- from warp.context import zeros as zeros
199
- from warp.context import zeros_like as zeros_like
200
- from warp.context import ones as ones
201
- from warp.context import ones_like as ones_like
202
- from warp.context import full as full
203
- from warp.context import full_like as full_like
204
- from warp.context import clone as clone
205
- from warp.context import empty as empty
206
- from warp.context import empty_like as empty_like
207
- from warp.context import copy as copy
208
- from warp.context import from_numpy as from_numpy
209
-
210
- from warp.context import launch as launch
211
- from warp.context import launch_tiled as launch_tiled
212
- from warp.context import synchronize as synchronize
213
- from warp.context import compile_aot_module as compile_aot_module
214
- from warp.context import force_load as force_load
215
- from warp.context import load_module as load_module
216
- from warp.context import load_aot_module as load_aot_module
217
- from warp.context import event_from_ipc_handle as event_from_ipc_handle
218
-
219
- from warp.context import set_module_options as set_module_options
220
- from warp.context import get_module_options as get_module_options
221
- from warp.context import get_module as get_module
222
-
223
- from warp.context import capture_begin as capture_begin
224
- from warp.context import capture_end as capture_end
225
- from warp.context import capture_launch as capture_launch
226
- from warp.context import capture_if as capture_if
227
- from warp.context import capture_while as capture_while
228
- from warp.context import capture_debug_dot_print as capture_debug_dot_print
229
-
230
- from warp.context import Kernel as Kernel
231
- from warp.context import Function as Function
232
- from warp.context import Launch as Launch
233
-
234
- from warp.context import Stream as Stream
235
- from warp.context import get_stream as get_stream
236
- from warp.context import set_stream as set_stream
237
- from warp.context import wait_stream as wait_stream
238
- from warp.context import synchronize_stream as synchronize_stream
239
-
240
- from warp.context import Event as Event
241
- from warp.context import record_event as record_event
242
- from warp.context import wait_event as wait_event
243
- from warp.context import synchronize_event as synchronize_event
244
- from warp.context import get_event_elapsed_time as get_event_elapsed_time
245
-
246
- from warp.context import RegisteredGLBuffer as RegisteredGLBuffer
247
-
248
- from warp.context import is_mempool_supported as is_mempool_supported
249
- from warp.context import is_mempool_enabled as is_mempool_enabled
250
- from warp.context import set_mempool_enabled as set_mempool_enabled
251
-
252
- from warp.context import set_mempool_release_threshold as set_mempool_release_threshold
253
- from warp.context import get_mempool_release_threshold as get_mempool_release_threshold
254
- from warp.context import get_mempool_used_mem_current as get_mempool_used_mem_current
255
- from warp.context import get_mempool_used_mem_high as get_mempool_used_mem_high
256
-
257
- from warp.context import is_mempool_access_supported as is_mempool_access_supported
258
- from warp.context import is_mempool_access_enabled as is_mempool_access_enabled
259
- from warp.context import set_mempool_access_enabled as set_mempool_access_enabled
260
-
261
- from warp.context import is_peer_access_supported as is_peer_access_supported
262
- from warp.context import is_peer_access_enabled as is_peer_access_enabled
263
- from warp.context import set_peer_access_enabled as set_peer_access_enabled
264
-
265
- from warp.tape import Tape as Tape
266
-
267
- from warp.utils import ScopedTimer as ScopedTimer
268
- from warp.utils import ScopedDevice as ScopedDevice
269
- from warp.utils import ScopedStream as ScopedStream
270
- from warp.utils import ScopedMempool as ScopedMempool
271
- from warp.utils import ScopedMempoolAccess as ScopedMempoolAccess
272
- from warp.utils import ScopedPeerAccess as ScopedPeerAccess
273
- from warp.utils import ScopedCapture as ScopedCapture
274
-
275
- from warp.utils import transform_expand as transform_expand
276
- from warp.utils import quat_between_vectors as quat_between_vectors
277
-
278
- from warp.utils import TimingResult as TimingResult
279
- from warp.utils import timing_begin as timing_begin
280
- from warp.utils import timing_end as timing_end
281
- from warp.utils import timing_print as timing_print
282
-
283
- from warp.utils import TIMING_KERNEL as TIMING_KERNEL
284
- from warp.utils import TIMING_KERNEL_BUILTIN as TIMING_KERNEL_BUILTIN
285
- from warp.utils import TIMING_MEMCPY as TIMING_MEMCPY
286
- from warp.utils import TIMING_MEMSET as TIMING_MEMSET
287
- from warp.utils import TIMING_GRAPH as TIMING_GRAPH
288
- from warp.utils import TIMING_ALL as TIMING_ALL
289
-
290
- from warp.utils import map as map
291
-
292
- from warp.marching_cubes import MarchingCubes as MarchingCubes
293
-
294
- from warp.torch import from_torch as from_torch
295
- from warp.torch import to_torch as to_torch
296
- from warp.torch import dtype_from_torch as dtype_from_torch
297
- from warp.torch import dtype_to_torch as dtype_to_torch
298
- from warp.torch import device_from_torch as device_from_torch
299
- from warp.torch import device_to_torch as device_to_torch
300
- from warp.torch import stream_from_torch as stream_from_torch
301
- from warp.torch import stream_to_torch as stream_to_torch
302
-
303
- from warp.jax import from_jax as from_jax
304
- from warp.jax import to_jax as to_jax
305
- from warp.jax import dtype_from_jax as dtype_from_jax
306
- from warp.jax import dtype_to_jax as dtype_to_jax
307
- from warp.jax import device_from_jax as device_from_jax
308
- from warp.jax import device_to_jax as device_to_jax
309
-
310
- from warp.dlpack import from_dlpack as from_dlpack
311
- from warp.dlpack import to_dlpack as to_dlpack
312
-
313
- from warp.paddle import from_paddle as from_paddle
314
- from warp.paddle import to_paddle as to_paddle
315
- from warp.paddle import dtype_from_paddle as dtype_from_paddle
316
- from warp.paddle import dtype_to_paddle as dtype_to_paddle
317
- from warp.paddle import device_from_paddle as device_from_paddle
318
- from warp.paddle import device_to_paddle as device_to_paddle
319
- from warp.paddle import stream_from_paddle as stream_from_paddle
320
-
321
- from warp.build import clear_kernel_cache as clear_kernel_cache
322
- from warp.build import clear_lto_cache as clear_lto_cache
323
-
324
- from warp.constants import *
325
-
326
- from . import builtins
327
- from warp.builtins import static as static
328
-
329
- from warp.math import *
330
-
331
- from . import config as config
40
+ from warp._src.types import array as array
41
+ from warp._src.types import array1d as array1d
42
+ from warp._src.types import array2d as array2d
43
+ from warp._src.types import array3d as array3d
44
+ from warp._src.types import array4d as array4d
45
+ from warp._src.types import constant as constant
46
+ from warp._src.types import from_ptr as from_ptr
47
+ from warp._src.types import fixedarray as fixedarray
48
+ from warp._src.types import indexedarray as indexedarray
49
+ from warp._src.types import indexedarray1d as indexedarray1d
50
+ from warp._src.types import indexedarray2d as indexedarray2d
51
+ from warp._src.types import indexedarray3d as indexedarray3d
52
+ from warp._src.types import indexedarray4d as indexedarray4d
53
+ from warp._src.fabric import fabricarray as fabricarray
54
+ from warp._src.fabric import fabricarrayarray as fabricarrayarray
55
+ from warp._src.fabric import indexedfabricarray as indexedfabricarray
56
+ from warp._src.fabric import indexedfabricarrayarray as indexedfabricarrayarray
57
+ from warp._src.types import tile as tile
58
+
59
+ from warp._src.types import bool as bool
60
+ from warp._src.types import int8 as int8
61
+ from warp._src.types import uint8 as uint8
62
+ from warp._src.types import int16 as int16
63
+ from warp._src.types import uint16 as uint16
64
+ from warp._src.types import int32 as int32
65
+ from warp._src.types import uint32 as uint32
66
+ from warp._src.types import int64 as int64
67
+ from warp._src.types import uint64 as uint64
68
+ from warp._src.types import float16 as float16
69
+ from warp._src.types import float32 as float32
70
+ from warp._src.types import float64 as float64
71
+
72
+ from warp._src.types import vec2 as vec2
73
+ from warp._src.types import vec2b as vec2b
74
+ from warp._src.types import vec2ub as vec2ub
75
+ from warp._src.types import vec2s as vec2s
76
+ from warp._src.types import vec2us as vec2us
77
+ from warp._src.types import vec2i as vec2i
78
+ from warp._src.types import vec2ui as vec2ui
79
+ from warp._src.types import vec2l as vec2l
80
+ from warp._src.types import vec2ul as vec2ul
81
+ from warp._src.types import vec2h as vec2h
82
+ from warp._src.types import vec2f as vec2f
83
+ from warp._src.types import vec2d as vec2d
84
+
85
+ from warp._src.types import vec3 as vec3
86
+ from warp._src.types import vec3b as vec3b
87
+ from warp._src.types import vec3ub as vec3ub
88
+ from warp._src.types import vec3s as vec3s
89
+ from warp._src.types import vec3us as vec3us
90
+ from warp._src.types import vec3i as vec3i
91
+ from warp._src.types import vec3ui as vec3ui
92
+ from warp._src.types import vec3l as vec3l
93
+ from warp._src.types import vec3ul as vec3ul
94
+ from warp._src.types import vec3h as vec3h
95
+ from warp._src.types import vec3f as vec3f
96
+ from warp._src.types import vec3d as vec3d
97
+
98
+ from warp._src.types import vec4 as vec4
99
+ from warp._src.types import vec4b as vec4b
100
+ from warp._src.types import vec4ub as vec4ub
101
+ from warp._src.types import vec4s as vec4s
102
+ from warp._src.types import vec4us as vec4us
103
+ from warp._src.types import vec4i as vec4i
104
+ from warp._src.types import vec4ui as vec4ui
105
+ from warp._src.types import vec4l as vec4l
106
+ from warp._src.types import vec4ul as vec4ul
107
+ from warp._src.types import vec4h as vec4h
108
+ from warp._src.types import vec4f as vec4f
109
+ from warp._src.types import vec4d as vec4d
110
+
111
+ from warp._src.types import mat22 as mat22
112
+ from warp._src.types import mat22h as mat22h
113
+ from warp._src.types import mat22f as mat22f
114
+ from warp._src.types import mat22d as mat22d
115
+
116
+ from warp._src.types import mat33 as mat33
117
+ from warp._src.types import mat33h as mat33h
118
+ from warp._src.types import mat33f as mat33f
119
+ from warp._src.types import mat33d as mat33d
120
+
121
+ from warp._src.types import mat44 as mat44
122
+ from warp._src.types import mat44h as mat44h
123
+ from warp._src.types import mat44f as mat44f
124
+ from warp._src.types import mat44d as mat44d
125
+
126
+ from warp._src.types import quat as quat
127
+ from warp._src.types import quath as quath
128
+ from warp._src.types import quatf as quatf
129
+ from warp._src.types import quatd as quatd
130
+
131
+ from warp._src.types import transform as transform
132
+ from warp._src.types import transformh as transformh
133
+ from warp._src.types import transformf as transformf
134
+ from warp._src.types import transformd as transformd
135
+
136
+ from warp._src.types import spatial_vector as spatial_vector
137
+ from warp._src.types import spatial_vectorh as spatial_vectorh
138
+ from warp._src.types import spatial_vectorf as spatial_vectorf
139
+ from warp._src.types import spatial_vectord as spatial_vectord
140
+
141
+ from warp._src.types import spatial_matrix as spatial_matrix
142
+ from warp._src.types import spatial_matrixh as spatial_matrixh
143
+ from warp._src.types import spatial_matrixf as spatial_matrixf
144
+ from warp._src.types import spatial_matrixd as spatial_matrixd
145
+
146
+ from warp._src.types import Int as Int
147
+ from warp._src.types import Float as Float
148
+ from warp._src.types import Scalar as Scalar
149
+
150
+ from warp._src.types import Bvh as Bvh
151
+ from warp._src.types import Mesh as Mesh
152
+ from warp._src.types import HashGrid as HashGrid
153
+ from warp._src.types import Volume as Volume
154
+ from warp._src.types import BvhQuery as BvhQuery
155
+ from warp._src.types import HashGridQuery as HashGridQuery
156
+ from warp._src.types import MeshQueryAABB as MeshQueryAABB
157
+ from warp._src.types import MeshQueryPoint as MeshQueryPoint
158
+ from warp._src.types import MeshQueryRay as MeshQueryRay
159
+
160
+ from warp._src.types import vector as vec
161
+ from warp._src.types import matrix as mat
162
+
163
+ from warp._src.types import matrix_from_cols as matrix_from_cols
164
+ from warp._src.types import matrix_from_rows as matrix_from_rows
165
+
166
+ from warp._src.types import dtype_from_numpy as dtype_from_numpy
167
+ from warp._src.types import dtype_to_numpy as dtype_to_numpy
168
+
169
+ from warp._src.types import from_ipc_handle as from_ipc_handle
170
+
171
+ from warp._src.context import init as init
172
+ from warp._src.context import func as func
173
+ from warp._src.context import func_grad as func_grad
174
+ from warp._src.context import func_replay as func_replay
175
+ from warp._src.context import func_native as func_native
176
+ from warp._src.context import kernel as kernel
177
+ from warp._src.context import struct as struct
178
+ from warp._src.context import overload as overload
179
+
180
+ from warp._src.context import is_cpu_available as is_cpu_available
181
+ from warp._src.context import is_cuda_available as is_cuda_available
182
+ from warp._src.context import is_device_available as is_device_available
183
+ from warp._src.context import get_cuda_supported_archs as get_cuda_supported_archs
184
+ from warp._src.context import get_devices as get_devices
185
+ from warp._src.context import get_preferred_device as get_preferred_device
186
+ from warp._src.context import get_cuda_devices as get_cuda_devices
187
+ from warp._src.context import get_cuda_device_count as get_cuda_device_count
188
+ from warp._src.context import get_cuda_device as get_cuda_device
189
+ from warp._src.context import map_cuda_device as map_cuda_device
190
+ from warp._src.context import unmap_cuda_device as unmap_cuda_device
191
+ from warp._src.context import get_device as get_device
192
+ from warp._src.context import set_device as set_device
193
+ from warp._src.context import synchronize_device as synchronize_device
194
+
195
+ from warp._src.context import zeros as zeros
196
+ from warp._src.context import zeros_like as zeros_like
197
+ from warp._src.context import ones as ones
198
+ from warp._src.context import ones_like as ones_like
199
+ from warp._src.context import full as full
200
+ from warp._src.context import full_like as full_like
201
+ from warp._src.context import clone as clone
202
+ from warp._src.context import empty as empty
203
+ from warp._src.context import empty_like as empty_like
204
+ from warp._src.context import copy as copy
205
+ from warp._src.context import from_numpy as from_numpy
206
+
207
+ from warp._src.context import launch as launch
208
+ from warp._src.context import launch_tiled as launch_tiled
209
+ from warp._src.context import synchronize as synchronize
210
+ from warp._src.context import compile_aot_module as compile_aot_module
211
+ from warp._src.context import force_load as force_load
212
+ from warp._src.context import load_module as load_module
213
+ from warp._src.context import load_aot_module as load_aot_module
214
+ from warp._src.context import event_from_ipc_handle as event_from_ipc_handle
215
+
216
+ from warp._src.context import set_module_options as set_module_options
217
+ from warp._src.context import get_module_options as get_module_options
218
+ from warp._src.context import get_module as get_module
219
+
220
+ from warp._src.context import capture_begin as capture_begin
221
+ from warp._src.context import capture_end as capture_end
222
+ from warp._src.context import capture_launch as capture_launch
223
+ from warp._src.context import capture_if as capture_if
224
+ from warp._src.context import capture_while as capture_while
225
+ from warp._src.context import capture_debug_dot_print as capture_debug_dot_print
226
+
227
+ from warp._src.context import Kernel as Kernel
228
+ from warp._src.context import Function as Function
229
+ from warp._src.context import Launch as Launch
230
+
231
+ from warp._src.context import Stream as Stream
232
+ from warp._src.context import get_stream as get_stream
233
+ from warp._src.context import set_stream as set_stream
234
+ from warp._src.context import wait_stream as wait_stream
235
+ from warp._src.context import synchronize_stream as synchronize_stream
236
+
237
+ from warp._src.context import Event as Event
238
+ from warp._src.context import record_event as record_event
239
+ from warp._src.context import wait_event as wait_event
240
+ from warp._src.context import synchronize_event as synchronize_event
241
+ from warp._src.context import get_event_elapsed_time as get_event_elapsed_time
242
+
243
+ from warp._src.context import RegisteredGLBuffer as RegisteredGLBuffer
244
+
245
+ from warp._src.context import is_mempool_supported as is_mempool_supported
246
+ from warp._src.context import is_mempool_enabled as is_mempool_enabled
247
+ from warp._src.context import set_mempool_enabled as set_mempool_enabled
248
+
249
+ from warp._src.context import set_mempool_release_threshold as set_mempool_release_threshold
250
+ from warp._src.context import get_mempool_release_threshold as get_mempool_release_threshold
251
+ from warp._src.context import get_mempool_used_mem_current as get_mempool_used_mem_current
252
+ from warp._src.context import get_mempool_used_mem_high as get_mempool_used_mem_high
253
+
254
+ from warp._src.context import is_mempool_access_supported as is_mempool_access_supported
255
+ from warp._src.context import is_mempool_access_enabled as is_mempool_access_enabled
256
+ from warp._src.context import set_mempool_access_enabled as set_mempool_access_enabled
257
+
258
+ from warp._src.context import is_peer_access_supported as is_peer_access_supported
259
+ from warp._src.context import is_peer_access_enabled as is_peer_access_enabled
260
+ from warp._src.context import set_peer_access_enabled as set_peer_access_enabled
261
+
262
+ from warp._src.tape import Tape as Tape
263
+
264
+ from warp._src.utils import ScopedTimer as ScopedTimer
265
+ from warp._src.utils import ScopedDevice as ScopedDevice
266
+ from warp._src.utils import ScopedStream as ScopedStream
267
+ from warp._src.utils import ScopedMempool as ScopedMempool
268
+ from warp._src.utils import ScopedMempoolAccess as ScopedMempoolAccess
269
+ from warp._src.utils import ScopedPeerAccess as ScopedPeerAccess
270
+ from warp._src.utils import ScopedCapture as ScopedCapture
271
+
272
+ from warp._src.utils import transform_expand as transform_expand
273
+ from warp._src.utils import quat_between_vectors as quat_between_vectors
274
+
275
+ from warp._src.utils import TimingResult as TimingResult
276
+ from warp._src.utils import timing_begin as timing_begin
277
+ from warp._src.utils import timing_end as timing_end
278
+ from warp._src.utils import timing_print as timing_print
279
+
280
+ from warp._src.utils import TIMING_KERNEL as TIMING_KERNEL
281
+ from warp._src.utils import TIMING_KERNEL_BUILTIN as TIMING_KERNEL_BUILTIN
282
+ from warp._src.utils import TIMING_MEMCPY as TIMING_MEMCPY
283
+ from warp._src.utils import TIMING_MEMSET as TIMING_MEMSET
284
+ from warp._src.utils import TIMING_GRAPH as TIMING_GRAPH
285
+ from warp._src.utils import TIMING_ALL as TIMING_ALL
286
+
287
+ from warp._src.utils import map as map
288
+
289
+ from warp._src.marching_cubes import MarchingCubes as MarchingCubes
290
+
291
+ from warp._src.torch import from_torch as from_torch
292
+ from warp._src.torch import to_torch as to_torch
293
+ from warp._src.torch import dtype_from_torch as dtype_from_torch
294
+ from warp._src.torch import dtype_to_torch as dtype_to_torch
295
+ from warp._src.torch import device_from_torch as device_from_torch
296
+ from warp._src.torch import device_to_torch as device_to_torch
297
+ from warp._src.torch import stream_from_torch as stream_from_torch
298
+ from warp._src.torch import stream_to_torch as stream_to_torch
299
+
300
+ from warp._src.jax import from_jax as from_jax
301
+ from warp._src.jax import to_jax as to_jax
302
+ from warp._src.jax import dtype_from_jax as dtype_from_jax
303
+ from warp._src.jax import dtype_to_jax as dtype_to_jax
304
+ from warp._src.jax import device_from_jax as device_from_jax
305
+ from warp._src.jax import device_to_jax as device_to_jax
306
+
307
+ from warp._src.dlpack import from_dlpack as from_dlpack
308
+ from warp._src.dlpack import to_dlpack as to_dlpack
309
+
310
+ from warp._src.paddle import from_paddle as from_paddle
311
+ from warp._src.paddle import to_paddle as to_paddle
312
+ from warp._src.paddle import dtype_from_paddle as dtype_from_paddle
313
+ from warp._src.paddle import dtype_to_paddle as dtype_to_paddle
314
+ from warp._src.paddle import device_from_paddle as device_from_paddle
315
+ from warp._src.paddle import device_to_paddle as device_to_paddle
316
+ from warp._src.paddle import stream_from_paddle as stream_from_paddle
317
+
318
+ from warp._src.build import clear_kernel_cache as clear_kernel_cache
319
+ from warp._src.build import clear_lto_cache as clear_lto_cache
320
+
321
+ from warp._src.builtins import static as static
322
+
323
+ from warp._src.constants import *
324
+
325
+ from warp._src.math import *
326
+
327
+ from warp._src import builtins as builtins
328
+ from warp._src import config as config
332
329
 
333
330
  __version__ = config.version
334
331
 
332
+ from . import build as build
333
+ from . import codegen as codegen
334
+ from . import constants as constants
335
+ from . import context as context
336
+ from . import dlpack as dlpack
337
+ from . import fabric as fabric
338
+ from . import jax as jax
339
+ from . import marching_cubes as marching_cubes
340
+ from . import math as math
341
+ from . import paddle as paddle
342
+ from . import sparse as sparse
343
+ from . import tape as tape
344
+ from . import torch as torch
345
+ from . import types as types
346
+ from . import utils as utils
347
+
348
+ class vec2h:
349
+ @over
350
+ def __init__(self) -> None:
351
+ """Construct a zero-initialized vector."""
352
+ ...
353
+
354
+ @over
355
+ def __init__(self, other: vec2h) -> None:
356
+ """Construct a vector by copy."""
357
+ ...
358
+
359
+ @over
360
+ def __init__(self, x: float16, y: float16) -> None:
361
+ """Construct a vector from its component values."""
362
+ ...
363
+
364
+ @over
365
+ def __init__(self, args: Sequence[float16]) -> None:
366
+ """Construct a vector from a sequence of values."""
367
+ ...
368
+
369
+ @over
370
+ def __init__(self, value: float16) -> None:
371
+ """Construct a vector filled with a value."""
372
+ ...
373
+
374
+ class vec2f:
375
+ @over
376
+ def __init__(self) -> None:
377
+ """Construct a zero-initialized vector."""
378
+ ...
379
+
380
+ @over
381
+ def __init__(self, other: vec2f) -> None:
382
+ """Construct a vector by copy."""
383
+ ...
384
+
385
+ @over
386
+ def __init__(self, x: float32, y: float32) -> None:
387
+ """Construct a vector from its component values."""
388
+ ...
389
+
390
+ @over
391
+ def __init__(self, args: Sequence[float32]) -> None:
392
+ """Construct a vector from a sequence of values."""
393
+ ...
394
+
395
+ @over
396
+ def __init__(self, value: float32) -> None:
397
+ """Construct a vector filled with a value."""
398
+ ...
399
+
400
+ class vec2d:
401
+ @over
402
+ def __init__(self) -> None:
403
+ """Construct a zero-initialized vector."""
404
+ ...
405
+
406
+ @over
407
+ def __init__(self, other: vec2d) -> None:
408
+ """Construct a vector by copy."""
409
+ ...
410
+
411
+ @over
412
+ def __init__(self, x: float64, y: float64) -> None:
413
+ """Construct a vector from its component values."""
414
+ ...
415
+
416
+ @over
417
+ def __init__(self, args: Sequence[float64]) -> None:
418
+ """Construct a vector from a sequence of values."""
419
+ ...
420
+
421
+ @over
422
+ def __init__(self, value: float64) -> None:
423
+ """Construct a vector filled with a value."""
424
+ ...
425
+
426
+ class vec2b:
427
+ @over
428
+ def __init__(self) -> None:
429
+ """Construct a zero-initialized vector."""
430
+ ...
431
+
432
+ @over
433
+ def __init__(self, other: vec2b) -> None:
434
+ """Construct a vector by copy."""
435
+ ...
436
+
437
+ @over
438
+ def __init__(self, x: int8, y: int8) -> None:
439
+ """Construct a vector from its component values."""
440
+ ...
441
+
442
+ @over
443
+ def __init__(self, args: Sequence[int8]) -> None:
444
+ """Construct a vector from a sequence of values."""
445
+ ...
446
+
447
+ @over
448
+ def __init__(self, value: int8) -> None:
449
+ """Construct a vector filled with a value."""
450
+ ...
451
+
452
+ class vec2ub:
453
+ @over
454
+ def __init__(self) -> None:
455
+ """Construct a zero-initialized vector."""
456
+ ...
457
+
458
+ @over
459
+ def __init__(self, other: vec2ub) -> None:
460
+ """Construct a vector by copy."""
461
+ ...
462
+
463
+ @over
464
+ def __init__(self, x: uint8, y: uint8) -> None:
465
+ """Construct a vector from its component values."""
466
+ ...
467
+
468
+ @over
469
+ def __init__(self, args: Sequence[uint8]) -> None:
470
+ """Construct a vector from a sequence of values."""
471
+ ...
472
+
473
+ @over
474
+ def __init__(self, value: uint8) -> None:
475
+ """Construct a vector filled with a value."""
476
+ ...
477
+
478
+ class vec2s:
479
+ @over
480
+ def __init__(self) -> None:
481
+ """Construct a zero-initialized vector."""
482
+ ...
483
+
484
+ @over
485
+ def __init__(self, other: vec2s) -> None:
486
+ """Construct a vector by copy."""
487
+ ...
488
+
489
+ @over
490
+ def __init__(self, x: int16, y: int16) -> None:
491
+ """Construct a vector from its component values."""
492
+ ...
493
+
494
+ @over
495
+ def __init__(self, args: Sequence[int16]) -> None:
496
+ """Construct a vector from a sequence of values."""
497
+ ...
498
+
499
+ @over
500
+ def __init__(self, value: int16) -> None:
501
+ """Construct a vector filled with a value."""
502
+ ...
503
+
504
+ class vec2us:
505
+ @over
506
+ def __init__(self) -> None:
507
+ """Construct a zero-initialized vector."""
508
+ ...
509
+
510
+ @over
511
+ def __init__(self, other: vec2us) -> None:
512
+ """Construct a vector by copy."""
513
+ ...
514
+
515
+ @over
516
+ def __init__(self, x: uint16, y: uint16) -> None:
517
+ """Construct a vector from its component values."""
518
+ ...
519
+
520
+ @over
521
+ def __init__(self, args: Sequence[uint16]) -> None:
522
+ """Construct a vector from a sequence of values."""
523
+ ...
524
+
525
+ @over
526
+ def __init__(self, value: uint16) -> None:
527
+ """Construct a vector filled with a value."""
528
+ ...
529
+
530
+ class vec2i:
531
+ @over
532
+ def __init__(self) -> None:
533
+ """Construct a zero-initialized vector."""
534
+ ...
535
+
536
+ @over
537
+ def __init__(self, other: vec2i) -> None:
538
+ """Construct a vector by copy."""
539
+ ...
540
+
541
+ @over
542
+ def __init__(self, x: int32, y: int32) -> None:
543
+ """Construct a vector from its component values."""
544
+ ...
545
+
546
+ @over
547
+ def __init__(self, args: Sequence[int32]) -> None:
548
+ """Construct a vector from a sequence of values."""
549
+ ...
550
+
551
+ @over
552
+ def __init__(self, value: int32) -> None:
553
+ """Construct a vector filled with a value."""
554
+ ...
555
+
556
+ class vec2ui:
557
+ @over
558
+ def __init__(self) -> None:
559
+ """Construct a zero-initialized vector."""
560
+ ...
561
+
562
+ @over
563
+ def __init__(self, other: vec2ui) -> None:
564
+ """Construct a vector by copy."""
565
+ ...
566
+
567
+ @over
568
+ def __init__(self, x: uint32, y: uint32) -> None:
569
+ """Construct a vector from its component values."""
570
+ ...
571
+
572
+ @over
573
+ def __init__(self, args: Sequence[uint32]) -> None:
574
+ """Construct a vector from a sequence of values."""
575
+ ...
576
+
577
+ @over
578
+ def __init__(self, value: uint32) -> None:
579
+ """Construct a vector filled with a value."""
580
+ ...
581
+
582
+ class vec2l:
583
+ @over
584
+ def __init__(self) -> None:
585
+ """Construct a zero-initialized vector."""
586
+ ...
587
+
588
+ @over
589
+ def __init__(self, other: vec2l) -> None:
590
+ """Construct a vector by copy."""
591
+ ...
592
+
593
+ @over
594
+ def __init__(self, x: int64, y: int64) -> None:
595
+ """Construct a vector from its component values."""
596
+ ...
597
+
598
+ @over
599
+ def __init__(self, args: Sequence[int64]) -> None:
600
+ """Construct a vector from a sequence of values."""
601
+ ...
602
+
603
+ @over
604
+ def __init__(self, value: int64) -> None:
605
+ """Construct a vector filled with a value."""
606
+ ...
607
+
608
+ class vec2ul:
609
+ @over
610
+ def __init__(self) -> None:
611
+ """Construct a zero-initialized vector."""
612
+ ...
613
+
614
+ @over
615
+ def __init__(self, other: vec2ul) -> None:
616
+ """Construct a vector by copy."""
617
+ ...
618
+
619
+ @over
620
+ def __init__(self, x: uint64, y: uint64) -> None:
621
+ """Construct a vector from its component values."""
622
+ ...
623
+
624
+ @over
625
+ def __init__(self, args: Sequence[uint64]) -> None:
626
+ """Construct a vector from a sequence of values."""
627
+ ...
628
+
629
+ @over
630
+ def __init__(self, value: uint64) -> None:
631
+ """Construct a vector filled with a value."""
632
+ ...
633
+
634
+ vec2 = vec2f
635
+
636
+ class vec3h:
637
+ @over
638
+ def __init__(self) -> None:
639
+ """Construct a zero-initialized vector."""
640
+ ...
641
+
642
+ @over
643
+ def __init__(self, other: vec3h) -> None:
644
+ """Construct a vector by copy."""
645
+ ...
646
+
647
+ @over
648
+ def __init__(self, x: float16, y: float16, z: float16) -> None:
649
+ """Construct a vector from its component values."""
650
+ ...
651
+
652
+ @over
653
+ def __init__(self, args: Sequence[float16]) -> None:
654
+ """Construct a vector from a sequence of values."""
655
+ ...
656
+
657
+ @over
658
+ def __init__(self, value: float16) -> None:
659
+ """Construct a vector filled with a value."""
660
+ ...
661
+
662
+ class vec3f:
663
+ @over
664
+ def __init__(self) -> None:
665
+ """Construct a zero-initialized vector."""
666
+ ...
667
+
668
+ @over
669
+ def __init__(self, other: vec3f) -> None:
670
+ """Construct a vector by copy."""
671
+ ...
672
+
673
+ @over
674
+ def __init__(self, x: float32, y: float32, z: float32) -> None:
675
+ """Construct a vector from its component values."""
676
+ ...
677
+
678
+ @over
679
+ def __init__(self, args: Sequence[float32]) -> None:
680
+ """Construct a vector from a sequence of values."""
681
+ ...
682
+
683
+ @over
684
+ def __init__(self, value: float32) -> None:
685
+ """Construct a vector filled with a value."""
686
+ ...
687
+
688
+ class vec3d:
689
+ @over
690
+ def __init__(self) -> None:
691
+ """Construct a zero-initialized vector."""
692
+ ...
693
+
694
+ @over
695
+ def __init__(self, other: vec3d) -> None:
696
+ """Construct a vector by copy."""
697
+ ...
698
+
699
+ @over
700
+ def __init__(self, x: float64, y: float64, z: float64) -> None:
701
+ """Construct a vector from its component values."""
702
+ ...
703
+
704
+ @over
705
+ def __init__(self, args: Sequence[float64]) -> None:
706
+ """Construct a vector from a sequence of values."""
707
+ ...
708
+
709
+ @over
710
+ def __init__(self, value: float64) -> None:
711
+ """Construct a vector filled with a value."""
712
+ ...
713
+
714
+ class vec3b:
715
+ @over
716
+ def __init__(self) -> None:
717
+ """Construct a zero-initialized vector."""
718
+ ...
719
+
720
+ @over
721
+ def __init__(self, other: vec3b) -> None:
722
+ """Construct a vector by copy."""
723
+ ...
724
+
725
+ @over
726
+ def __init__(self, x: int8, y: int8, z: int8) -> None:
727
+ """Construct a vector from its component values."""
728
+ ...
729
+
730
+ @over
731
+ def __init__(self, args: Sequence[int8]) -> None:
732
+ """Construct a vector from a sequence of values."""
733
+ ...
734
+
735
+ @over
736
+ def __init__(self, value: int8) -> None:
737
+ """Construct a vector filled with a value."""
738
+ ...
739
+
740
+ class vec3ub:
741
+ @over
742
+ def __init__(self) -> None:
743
+ """Construct a zero-initialized vector."""
744
+ ...
745
+
746
+ @over
747
+ def __init__(self, other: vec3ub) -> None:
748
+ """Construct a vector by copy."""
749
+ ...
750
+
751
+ @over
752
+ def __init__(self, x: uint8, y: uint8, z: uint8) -> None:
753
+ """Construct a vector from its component values."""
754
+ ...
755
+
756
+ @over
757
+ def __init__(self, args: Sequence[uint8]) -> None:
758
+ """Construct a vector from a sequence of values."""
759
+ ...
760
+
761
+ @over
762
+ def __init__(self, value: uint8) -> None:
763
+ """Construct a vector filled with a value."""
764
+ ...
765
+
766
+ class vec3s:
767
+ @over
768
+ def __init__(self) -> None:
769
+ """Construct a zero-initialized vector."""
770
+ ...
771
+
772
+ @over
773
+ def __init__(self, other: vec3s) -> None:
774
+ """Construct a vector by copy."""
775
+ ...
776
+
777
+ @over
778
+ def __init__(self, x: int16, y: int16, z: int16) -> None:
779
+ """Construct a vector from its component values."""
780
+ ...
781
+
782
+ @over
783
+ def __init__(self, args: Sequence[int16]) -> None:
784
+ """Construct a vector from a sequence of values."""
785
+ ...
786
+
787
+ @over
788
+ def __init__(self, value: int16) -> None:
789
+ """Construct a vector filled with a value."""
790
+ ...
791
+
792
+ class vec3us:
793
+ @over
794
+ def __init__(self) -> None:
795
+ """Construct a zero-initialized vector."""
796
+ ...
797
+
798
+ @over
799
+ def __init__(self, other: vec3us) -> None:
800
+ """Construct a vector by copy."""
801
+ ...
802
+
803
+ @over
804
+ def __init__(self, x: uint16, y: uint16, z: uint16) -> None:
805
+ """Construct a vector from its component values."""
806
+ ...
807
+
808
+ @over
809
+ def __init__(self, args: Sequence[uint16]) -> None:
810
+ """Construct a vector from a sequence of values."""
811
+ ...
812
+
813
+ @over
814
+ def __init__(self, value: uint16) -> None:
815
+ """Construct a vector filled with a value."""
816
+ ...
817
+
818
+ class vec3i:
819
+ @over
820
+ def __init__(self) -> None:
821
+ """Construct a zero-initialized vector."""
822
+ ...
823
+
824
+ @over
825
+ def __init__(self, other: vec3i) -> None:
826
+ """Construct a vector by copy."""
827
+ ...
828
+
829
+ @over
830
+ def __init__(self, x: int32, y: int32, z: int32) -> None:
831
+ """Construct a vector from its component values."""
832
+ ...
833
+
834
+ @over
835
+ def __init__(self, args: Sequence[int32]) -> None:
836
+ """Construct a vector from a sequence of values."""
837
+ ...
838
+
839
+ @over
840
+ def __init__(self, value: int32) -> None:
841
+ """Construct a vector filled with a value."""
842
+ ...
843
+
844
+ class vec3ui:
845
+ @over
846
+ def __init__(self) -> None:
847
+ """Construct a zero-initialized vector."""
848
+ ...
849
+
850
+ @over
851
+ def __init__(self, other: vec3ui) -> None:
852
+ """Construct a vector by copy."""
853
+ ...
854
+
855
+ @over
856
+ def __init__(self, x: uint32, y: uint32, z: uint32) -> None:
857
+ """Construct a vector from its component values."""
858
+ ...
859
+
860
+ @over
861
+ def __init__(self, args: Sequence[uint32]) -> None:
862
+ """Construct a vector from a sequence of values."""
863
+ ...
864
+
865
+ @over
866
+ def __init__(self, value: uint32) -> None:
867
+ """Construct a vector filled with a value."""
868
+ ...
869
+
870
+ class vec3l:
871
+ @over
872
+ def __init__(self) -> None:
873
+ """Construct a zero-initialized vector."""
874
+ ...
875
+
876
+ @over
877
+ def __init__(self, other: vec3l) -> None:
878
+ """Construct a vector by copy."""
879
+ ...
880
+
881
+ @over
882
+ def __init__(self, x: int64, y: int64, z: int64) -> None:
883
+ """Construct a vector from its component values."""
884
+ ...
885
+
886
+ @over
887
+ def __init__(self, args: Sequence[int64]) -> None:
888
+ """Construct a vector from a sequence of values."""
889
+ ...
890
+
891
+ @over
892
+ def __init__(self, value: int64) -> None:
893
+ """Construct a vector filled with a value."""
894
+ ...
895
+
896
+ class vec3ul:
897
+ @over
898
+ def __init__(self) -> None:
899
+ """Construct a zero-initialized vector."""
900
+ ...
901
+
902
+ @over
903
+ def __init__(self, other: vec3ul) -> None:
904
+ """Construct a vector by copy."""
905
+ ...
906
+
907
+ @over
908
+ def __init__(self, x: uint64, y: uint64, z: uint64) -> None:
909
+ """Construct a vector from its component values."""
910
+ ...
911
+
912
+ @over
913
+ def __init__(self, args: Sequence[uint64]) -> None:
914
+ """Construct a vector from a sequence of values."""
915
+ ...
916
+
917
+ @over
918
+ def __init__(self, value: uint64) -> None:
919
+ """Construct a vector filled with a value."""
920
+ ...
921
+
922
+ vec3 = vec3f
923
+
924
+ class vec4h:
925
+ @over
926
+ def __init__(self) -> None:
927
+ """Construct a zero-initialized vector."""
928
+ ...
929
+
930
+ @over
931
+ def __init__(self, other: vec4h) -> None:
932
+ """Construct a vector by copy."""
933
+ ...
934
+
935
+ @over
936
+ def __init__(self, x: float16, y: float16, z: float16, w: float16) -> None:
937
+ """Construct a vector from its component values."""
938
+ ...
939
+
940
+ @over
941
+ def __init__(self, args: Sequence[float16]) -> None:
942
+ """Construct a vector from a sequence of values."""
943
+ ...
944
+
945
+ @over
946
+ def __init__(self, value: float16) -> None:
947
+ """Construct a vector filled with a value."""
948
+ ...
949
+
950
+ class vec4f:
951
+ @over
952
+ def __init__(self) -> None:
953
+ """Construct a zero-initialized vector."""
954
+ ...
955
+
956
+ @over
957
+ def __init__(self, other: vec4f) -> None:
958
+ """Construct a vector by copy."""
959
+ ...
960
+
961
+ @over
962
+ def __init__(self, x: float32, y: float32, z: float32, w: float32) -> None:
963
+ """Construct a vector from its component values."""
964
+ ...
965
+
966
+ @over
967
+ def __init__(self, args: Sequence[float32]) -> None:
968
+ """Construct a vector from a sequence of values."""
969
+ ...
970
+
971
+ @over
972
+ def __init__(self, value: float32) -> None:
973
+ """Construct a vector filled with a value."""
974
+ ...
975
+
976
+ class vec4d:
977
+ @over
978
+ def __init__(self) -> None:
979
+ """Construct a zero-initialized vector."""
980
+ ...
981
+
982
+ @over
983
+ def __init__(self, other: vec4d) -> None:
984
+ """Construct a vector by copy."""
985
+ ...
986
+
987
+ @over
988
+ def __init__(self, x: float64, y: float64, z: float64, w: float64) -> None:
989
+ """Construct a vector from its component values."""
990
+ ...
991
+
992
+ @over
993
+ def __init__(self, args: Sequence[float64]) -> None:
994
+ """Construct a vector from a sequence of values."""
995
+ ...
996
+
997
+ @over
998
+ def __init__(self, value: float64) -> None:
999
+ """Construct a vector filled with a value."""
1000
+ ...
1001
+
1002
+ class vec4b:
1003
+ @over
1004
+ def __init__(self) -> None:
1005
+ """Construct a zero-initialized vector."""
1006
+ ...
1007
+
1008
+ @over
1009
+ def __init__(self, other: vec4b) -> None:
1010
+ """Construct a vector by copy."""
1011
+ ...
1012
+
1013
+ @over
1014
+ def __init__(self, x: int8, y: int8, z: int8, w: int8) -> None:
1015
+ """Construct a vector from its component values."""
1016
+ ...
1017
+
1018
+ @over
1019
+ def __init__(self, args: Sequence[int8]) -> None:
1020
+ """Construct a vector from a sequence of values."""
1021
+ ...
1022
+
1023
+ @over
1024
+ def __init__(self, value: int8) -> None:
1025
+ """Construct a vector filled with a value."""
1026
+ ...
1027
+
1028
+ class vec4ub:
1029
+ @over
1030
+ def __init__(self) -> None:
1031
+ """Construct a zero-initialized vector."""
1032
+ ...
1033
+
1034
+ @over
1035
+ def __init__(self, other: vec4ub) -> None:
1036
+ """Construct a vector by copy."""
1037
+ ...
1038
+
1039
+ @over
1040
+ def __init__(self, x: uint8, y: uint8, z: uint8, w: uint8) -> None:
1041
+ """Construct a vector from its component values."""
1042
+ ...
1043
+
1044
+ @over
1045
+ def __init__(self, args: Sequence[uint8]) -> None:
1046
+ """Construct a vector from a sequence of values."""
1047
+ ...
1048
+
1049
+ @over
1050
+ def __init__(self, value: uint8) -> None:
1051
+ """Construct a vector filled with a value."""
1052
+ ...
1053
+
1054
+ class vec4s:
1055
+ @over
1056
+ def __init__(self) -> None:
1057
+ """Construct a zero-initialized vector."""
1058
+ ...
1059
+
1060
+ @over
1061
+ def __init__(self, other: vec4s) -> None:
1062
+ """Construct a vector by copy."""
1063
+ ...
1064
+
1065
+ @over
1066
+ def __init__(self, x: int16, y: int16, z: int16, w: int16) -> None:
1067
+ """Construct a vector from its component values."""
1068
+ ...
1069
+
1070
+ @over
1071
+ def __init__(self, args: Sequence[int16]) -> None:
1072
+ """Construct a vector from a sequence of values."""
1073
+ ...
1074
+
1075
+ @over
1076
+ def __init__(self, value: int16) -> None:
1077
+ """Construct a vector filled with a value."""
1078
+ ...
1079
+
1080
+ class vec4us:
1081
+ @over
1082
+ def __init__(self) -> None:
1083
+ """Construct a zero-initialized vector."""
1084
+ ...
1085
+
1086
+ @over
1087
+ def __init__(self, other: vec4us) -> None:
1088
+ """Construct a vector by copy."""
1089
+ ...
1090
+
1091
+ @over
1092
+ def __init__(self, x: uint16, y: uint16, z: uint16, w: uint16) -> None:
1093
+ """Construct a vector from its component values."""
1094
+ ...
1095
+
1096
+ @over
1097
+ def __init__(self, args: Sequence[uint16]) -> None:
1098
+ """Construct a vector from a sequence of values."""
1099
+ ...
1100
+
1101
+ @over
1102
+ def __init__(self, value: uint16) -> None:
1103
+ """Construct a vector filled with a value."""
1104
+ ...
1105
+
1106
+ class vec4i:
1107
+ @over
1108
+ def __init__(self) -> None:
1109
+ """Construct a zero-initialized vector."""
1110
+ ...
1111
+
1112
+ @over
1113
+ def __init__(self, other: vec4i) -> None:
1114
+ """Construct a vector by copy."""
1115
+ ...
1116
+
1117
+ @over
1118
+ def __init__(self, x: int32, y: int32, z: int32, w: int32) -> None:
1119
+ """Construct a vector from its component values."""
1120
+ ...
1121
+
1122
+ @over
1123
+ def __init__(self, args: Sequence[int32]) -> None:
1124
+ """Construct a vector from a sequence of values."""
1125
+ ...
1126
+
1127
+ @over
1128
+ def __init__(self, value: int32) -> None:
1129
+ """Construct a vector filled with a value."""
1130
+ ...
1131
+
1132
+ class vec4ui:
1133
+ @over
1134
+ def __init__(self) -> None:
1135
+ """Construct a zero-initialized vector."""
1136
+ ...
1137
+
1138
+ @over
1139
+ def __init__(self, other: vec4ui) -> None:
1140
+ """Construct a vector by copy."""
1141
+ ...
1142
+
1143
+ @over
1144
+ def __init__(self, x: uint32, y: uint32, z: uint32, w: uint32) -> None:
1145
+ """Construct a vector from its component values."""
1146
+ ...
1147
+
1148
+ @over
1149
+ def __init__(self, args: Sequence[uint32]) -> None:
1150
+ """Construct a vector from a sequence of values."""
1151
+ ...
1152
+
1153
+ @over
1154
+ def __init__(self, value: uint32) -> None:
1155
+ """Construct a vector filled with a value."""
1156
+ ...
1157
+
1158
+ class vec4l:
1159
+ @over
1160
+ def __init__(self) -> None:
1161
+ """Construct a zero-initialized vector."""
1162
+ ...
1163
+
1164
+ @over
1165
+ def __init__(self, other: vec4l) -> None:
1166
+ """Construct a vector by copy."""
1167
+ ...
1168
+
1169
+ @over
1170
+ def __init__(self, x: int64, y: int64, z: int64, w: int64) -> None:
1171
+ """Construct a vector from its component values."""
1172
+ ...
1173
+
1174
+ @over
1175
+ def __init__(self, args: Sequence[int64]) -> None:
1176
+ """Construct a vector from a sequence of values."""
1177
+ ...
1178
+
1179
+ @over
1180
+ def __init__(self, value: int64) -> None:
1181
+ """Construct a vector filled with a value."""
1182
+ ...
1183
+
1184
+ class vec4ul:
1185
+ @over
1186
+ def __init__(self) -> None:
1187
+ """Construct a zero-initialized vector."""
1188
+ ...
1189
+
1190
+ @over
1191
+ def __init__(self, other: vec4ul) -> None:
1192
+ """Construct a vector by copy."""
1193
+ ...
1194
+
1195
+ @over
1196
+ def __init__(self, x: uint64, y: uint64, z: uint64, w: uint64) -> None:
1197
+ """Construct a vector from its component values."""
1198
+ ...
1199
+
1200
+ @over
1201
+ def __init__(self, args: Sequence[uint64]) -> None:
1202
+ """Construct a vector from a sequence of values."""
1203
+ ...
1204
+
1205
+ @over
1206
+ def __init__(self, value: uint64) -> None:
1207
+ """Construct a vector filled with a value."""
1208
+ ...
1209
+
1210
+ vec4 = vec4f
1211
+
1212
+ class mat22h:
1213
+ @over
1214
+ def __init__(self) -> None:
1215
+ """Construct a zero-initialized matrix."""
1216
+ ...
1217
+
1218
+ @over
1219
+ def __init__(self, other: mat22h) -> None:
1220
+ """Construct a matrix by copy."""
1221
+ ...
1222
+
1223
+ @over
1224
+ def __init__(self, m00: float16, m01: float16, m10: float16, m11: float16) -> None:
1225
+ """Construct a matrix from its component values."""
1226
+ ...
1227
+
1228
+ @over
1229
+ def __init__(self, v0: vec2h, v1: vec2h) -> None:
1230
+ """Construct a matrix from its row vectors."""
1231
+ ...
1232
+
1233
+ @over
1234
+ def __init__(self, args: Sequence[float16]) -> None:
1235
+ """Construct a matrix from a sequence of values."""
1236
+ ...
1237
+
1238
+ @over
1239
+ def __init__(self, value: float16) -> None:
1240
+ """Construct a matrix filled with a value."""
1241
+ ...
1242
+
1243
+ class mat22f:
1244
+ @over
1245
+ def __init__(self) -> None:
1246
+ """Construct a zero-initialized matrix."""
1247
+ ...
1248
+
1249
+ @over
1250
+ def __init__(self, other: mat22f) -> None:
1251
+ """Construct a matrix by copy."""
1252
+ ...
1253
+
1254
+ @over
1255
+ def __init__(self, m00: float32, m01: float32, m10: float32, m11: float32) -> None:
1256
+ """Construct a matrix from its component values."""
1257
+ ...
1258
+
1259
+ @over
1260
+ def __init__(self, v0: vec2f, v1: vec2f) -> None:
1261
+ """Construct a matrix from its row vectors."""
1262
+ ...
1263
+
1264
+ @over
1265
+ def __init__(self, args: Sequence[float32]) -> None:
1266
+ """Construct a matrix from a sequence of values."""
1267
+ ...
1268
+
1269
+ @over
1270
+ def __init__(self, value: float32) -> None:
1271
+ """Construct a matrix filled with a value."""
1272
+ ...
1273
+
1274
+ class mat22d:
1275
+ @over
1276
+ def __init__(self) -> None:
1277
+ """Construct a zero-initialized matrix."""
1278
+ ...
1279
+
1280
+ @over
1281
+ def __init__(self, other: mat22d) -> None:
1282
+ """Construct a matrix by copy."""
1283
+ ...
1284
+
1285
+ @over
1286
+ def __init__(self, m00: float64, m01: float64, m10: float64, m11: float64) -> None:
1287
+ """Construct a matrix from its component values."""
1288
+ ...
1289
+
1290
+ @over
1291
+ def __init__(self, v0: vec2d, v1: vec2d) -> None:
1292
+ """Construct a matrix from its row vectors."""
1293
+ ...
1294
+
1295
+ @over
1296
+ def __init__(self, args: Sequence[float64]) -> None:
1297
+ """Construct a matrix from a sequence of values."""
1298
+ ...
1299
+
1300
+ @over
1301
+ def __init__(self, value: float64) -> None:
1302
+ """Construct a matrix filled with a value."""
1303
+ ...
1304
+
1305
+ mat22 = mat22f
1306
+
1307
+ class mat33h:
1308
+ @over
1309
+ def __init__(self) -> None:
1310
+ """Construct a zero-initialized matrix."""
1311
+ ...
1312
+
1313
+ @over
1314
+ def __init__(self, other: mat33h) -> None:
1315
+ """Construct a matrix by copy."""
1316
+ ...
1317
+
1318
+ @over
1319
+ def __init__(
1320
+ self,
1321
+ m00: float16,
1322
+ m01: float16,
1323
+ m02: float16,
1324
+ m10: float16,
1325
+ m11: float16,
1326
+ m12: float16,
1327
+ m20: float16,
1328
+ m21: float16,
1329
+ m22: float16,
1330
+ ) -> None:
1331
+ """Construct a matrix from its component values."""
1332
+ ...
1333
+
1334
+ @over
1335
+ def __init__(self, v0: vec3h, v1: vec3h, v2: vec3h) -> None:
1336
+ """Construct a matrix from its row vectors."""
1337
+ ...
1338
+
1339
+ @over
1340
+ def __init__(self, args: Sequence[float16]) -> None:
1341
+ """Construct a matrix from a sequence of values."""
1342
+ ...
1343
+
1344
+ @over
1345
+ def __init__(self, value: float16) -> None:
1346
+ """Construct a matrix filled with a value."""
1347
+ ...
1348
+
1349
+ class mat33f:
1350
+ @over
1351
+ def __init__(self) -> None:
1352
+ """Construct a zero-initialized matrix."""
1353
+ ...
1354
+
1355
+ @over
1356
+ def __init__(self, other: mat33f) -> None:
1357
+ """Construct a matrix by copy."""
1358
+ ...
1359
+
1360
+ @over
1361
+ def __init__(
1362
+ self,
1363
+ m00: float32,
1364
+ m01: float32,
1365
+ m02: float32,
1366
+ m10: float32,
1367
+ m11: float32,
1368
+ m12: float32,
1369
+ m20: float32,
1370
+ m21: float32,
1371
+ m22: float32,
1372
+ ) -> None:
1373
+ """Construct a matrix from its component values."""
1374
+ ...
1375
+
1376
+ @over
1377
+ def __init__(self, v0: vec3f, v1: vec3f, v2: vec3f) -> None:
1378
+ """Construct a matrix from its row vectors."""
1379
+ ...
1380
+
1381
+ @over
1382
+ def __init__(self, args: Sequence[float32]) -> None:
1383
+ """Construct a matrix from a sequence of values."""
1384
+ ...
1385
+
1386
+ @over
1387
+ def __init__(self, value: float32) -> None:
1388
+ """Construct a matrix filled with a value."""
1389
+ ...
1390
+
1391
+ class mat33d:
1392
+ @over
1393
+ def __init__(self) -> None:
1394
+ """Construct a zero-initialized matrix."""
1395
+ ...
1396
+
1397
+ @over
1398
+ def __init__(self, other: mat33d) -> None:
1399
+ """Construct a matrix by copy."""
1400
+ ...
1401
+
1402
+ @over
1403
+ def __init__(
1404
+ self,
1405
+ m00: float64,
1406
+ m01: float64,
1407
+ m02: float64,
1408
+ m10: float64,
1409
+ m11: float64,
1410
+ m12: float64,
1411
+ m20: float64,
1412
+ m21: float64,
1413
+ m22: float64,
1414
+ ) -> None:
1415
+ """Construct a matrix from its component values."""
1416
+ ...
1417
+
1418
+ @over
1419
+ def __init__(self, v0: vec3d, v1: vec3d, v2: vec3d) -> None:
1420
+ """Construct a matrix from its row vectors."""
1421
+ ...
1422
+
1423
+ @over
1424
+ def __init__(self, args: Sequence[float64]) -> None:
1425
+ """Construct a matrix from a sequence of values."""
1426
+ ...
1427
+
1428
+ @over
1429
+ def __init__(self, value: float64) -> None:
1430
+ """Construct a matrix filled with a value."""
1431
+ ...
1432
+
1433
+ mat33 = mat33f
1434
+
1435
+ class mat44h:
1436
+ @over
1437
+ def __init__(self) -> None:
1438
+ """Construct a zero-initialized matrix."""
1439
+ ...
1440
+
1441
+ @over
1442
+ def __init__(self, other: mat44h) -> None:
1443
+ """Construct a matrix by copy."""
1444
+ ...
1445
+
1446
+ @over
1447
+ def __init__(
1448
+ self,
1449
+ m00: float16,
1450
+ m01: float16,
1451
+ m02: float16,
1452
+ m03: float16,
1453
+ m10: float16,
1454
+ m11: float16,
1455
+ m12: float16,
1456
+ m13: float16,
1457
+ m20: float16,
1458
+ m21: float16,
1459
+ m22: float16,
1460
+ m23: float16,
1461
+ m30: float16,
1462
+ m31: float16,
1463
+ m32: float16,
1464
+ m33: float16,
1465
+ ) -> None:
1466
+ """Construct a matrix from its component values."""
1467
+ ...
1468
+
1469
+ @over
1470
+ def __init__(self, v0: vec4h, v1: vec4h, v2: vec4h, v3: vec4h) -> None:
1471
+ """Construct a matrix from its row vectors."""
1472
+ ...
1473
+
1474
+ @over
1475
+ def __init__(self, args: Sequence[float16]) -> None:
1476
+ """Construct a matrix from a sequence of values."""
1477
+ ...
1478
+
1479
+ @over
1480
+ def __init__(self, value: float16) -> None:
1481
+ """Construct a matrix filled with a value."""
1482
+ ...
1483
+
1484
+ class mat44f:
1485
+ @over
1486
+ def __init__(self) -> None:
1487
+ """Construct a zero-initialized matrix."""
1488
+ ...
1489
+
1490
+ @over
1491
+ def __init__(self, other: mat44f) -> None:
1492
+ """Construct a matrix by copy."""
1493
+ ...
1494
+
1495
+ @over
1496
+ def __init__(
1497
+ self,
1498
+ m00: float32,
1499
+ m01: float32,
1500
+ m02: float32,
1501
+ m03: float32,
1502
+ m10: float32,
1503
+ m11: float32,
1504
+ m12: float32,
1505
+ m13: float32,
1506
+ m20: float32,
1507
+ m21: float32,
1508
+ m22: float32,
1509
+ m23: float32,
1510
+ m30: float32,
1511
+ m31: float32,
1512
+ m32: float32,
1513
+ m33: float32,
1514
+ ) -> None:
1515
+ """Construct a matrix from its component values."""
1516
+ ...
1517
+
1518
+ @over
1519
+ def __init__(self, v0: vec4f, v1: vec4f, v2: vec4f, v3: vec4f) -> None:
1520
+ """Construct a matrix from its row vectors."""
1521
+ ...
1522
+
1523
+ @over
1524
+ def __init__(self, args: Sequence[float32]) -> None:
1525
+ """Construct a matrix from a sequence of values."""
1526
+ ...
1527
+
1528
+ @over
1529
+ def __init__(self, value: float32) -> None:
1530
+ """Construct a matrix filled with a value."""
1531
+ ...
1532
+
1533
+ class mat44d:
1534
+ @over
1535
+ def __init__(self) -> None:
1536
+ """Construct a zero-initialized matrix."""
1537
+ ...
1538
+
1539
+ @over
1540
+ def __init__(self, other: mat44d) -> None:
1541
+ """Construct a matrix by copy."""
1542
+ ...
1543
+
1544
+ @over
1545
+ def __init__(
1546
+ self,
1547
+ m00: float64,
1548
+ m01: float64,
1549
+ m02: float64,
1550
+ m03: float64,
1551
+ m10: float64,
1552
+ m11: float64,
1553
+ m12: float64,
1554
+ m13: float64,
1555
+ m20: float64,
1556
+ m21: float64,
1557
+ m22: float64,
1558
+ m23: float64,
1559
+ m30: float64,
1560
+ m31: float64,
1561
+ m32: float64,
1562
+ m33: float64,
1563
+ ) -> None:
1564
+ """Construct a matrix from its component values."""
1565
+ ...
1566
+
1567
+ @over
1568
+ def __init__(self, v0: vec4d, v1: vec4d, v2: vec4d, v3: vec4d) -> None:
1569
+ """Construct a matrix from its row vectors."""
1570
+ ...
1571
+
1572
+ @over
1573
+ def __init__(self, args: Sequence[float64]) -> None:
1574
+ """Construct a matrix from a sequence of values."""
1575
+ ...
1576
+
1577
+ @over
1578
+ def __init__(self, value: float64) -> None:
1579
+ """Construct a matrix filled with a value."""
1580
+ ...
1581
+
1582
+ mat44 = mat44f
1583
+
1584
+ class quath:
1585
+ @over
1586
+ def __init__(self) -> None:
1587
+ """Construct a zero-initialized quaternion."""
1588
+ ...
1589
+
1590
+ @over
1591
+ def __init__(self, other: quath) -> None:
1592
+ """Construct a quaternion by copy."""
1593
+ ...
1594
+
1595
+ @over
1596
+ def __init__(self, x: float16, y: float16, z: float16, w: float16) -> None:
1597
+ """Construct a quaternion from its component values."""
1598
+ ...
1599
+
1600
+ @over
1601
+ def __init__(self, args: Sequence[float16]) -> None:
1602
+ """Construct a quaternion from a sequence of values."""
1603
+ ...
1604
+
1605
+ @over
1606
+ def __init__(self, value: float16) -> None:
1607
+ """Construct a quaternion filled with a value."""
1608
+ ...
1609
+
1610
+ class quatf:
1611
+ @over
1612
+ def __init__(self) -> None:
1613
+ """Construct a zero-initialized quaternion."""
1614
+ ...
1615
+
1616
+ @over
1617
+ def __init__(self, other: quatf) -> None:
1618
+ """Construct a quaternion by copy."""
1619
+ ...
1620
+
1621
+ @over
1622
+ def __init__(self, x: float32, y: float32, z: float32, w: float32) -> None:
1623
+ """Construct a quaternion from its component values."""
1624
+ ...
1625
+
1626
+ @over
1627
+ def __init__(self, args: Sequence[float32]) -> None:
1628
+ """Construct a quaternion from a sequence of values."""
1629
+ ...
1630
+
1631
+ @over
1632
+ def __init__(self, value: float32) -> None:
1633
+ """Construct a quaternion filled with a value."""
1634
+ ...
1635
+
1636
+ class quatd:
1637
+ @over
1638
+ def __init__(self) -> None:
1639
+ """Construct a zero-initialized quaternion."""
1640
+ ...
1641
+
1642
+ @over
1643
+ def __init__(self, other: quatd) -> None:
1644
+ """Construct a quaternion by copy."""
1645
+ ...
1646
+
1647
+ @over
1648
+ def __init__(self, x: float64, y: float64, z: float64, w: float64) -> None:
1649
+ """Construct a quaternion from its component values."""
1650
+ ...
1651
+
1652
+ @over
1653
+ def __init__(self, args: Sequence[float64]) -> None:
1654
+ """Construct a quaternion from a sequence of values."""
1655
+ ...
1656
+
1657
+ @over
1658
+ def __init__(self, value: float64) -> None:
1659
+ """Construct a quaternion filled with a value."""
1660
+ ...
1661
+
1662
+ quat = quatf
1663
+
1664
+ class transformh:
1665
+ @over
1666
+ def __init__(self) -> None:
1667
+ """Construct a zero-initialized transformation."""
1668
+ ...
1669
+
1670
+ @over
1671
+ def __init__(self, other: transformh) -> None:
1672
+ """Construct a transformation by copy."""
1673
+ ...
1674
+
1675
+ @over
1676
+ def __init__(self, p: vec3h, q: quath) -> None:
1677
+ """Construct a transformation from its p and q components."""
1678
+ ...
1679
+
1680
+ @over
1681
+ def __init__(
1682
+ self, px: float16, py: float16, pz: float16, qx: float16, qy: float16, qz: float16, qw: float16
1683
+ ) -> None:
1684
+ """Construct a transformation from its component values."""
1685
+ ...
1686
+
1687
+ @over
1688
+ def __init__(self, p: Sequence[float16], q: Sequence[float16]) -> None:
1689
+ """Construct a transformation from two sequences of values."""
1690
+ ...
1691
+
1692
+ @over
1693
+ def __init__(self, value: float16) -> None:
1694
+ """Construct a transformation filled with a value."""
1695
+ ...
1696
+
1697
+ class transformf:
1698
+ @over
1699
+ def __init__(self) -> None:
1700
+ """Construct a zero-initialized transformation."""
1701
+ ...
1702
+
1703
+ @over
1704
+ def __init__(self, other: transformf) -> None:
1705
+ """Construct a transformation by copy."""
1706
+ ...
1707
+
1708
+ @over
1709
+ def __init__(self, p: vec3f, q: quatf) -> None:
1710
+ """Construct a transformation from its p and q components."""
1711
+ ...
1712
+
1713
+ @over
1714
+ def __init__(
1715
+ self, px: float32, py: float32, pz: float32, qx: float32, qy: float32, qz: float32, qw: float32
1716
+ ) -> None:
1717
+ """Construct a transformation from its component values."""
1718
+ ...
1719
+
1720
+ @over
1721
+ def __init__(self, p: Sequence[float32], q: Sequence[float32]) -> None:
1722
+ """Construct a transformation from two sequences of values."""
1723
+ ...
1724
+
1725
+ @over
1726
+ def __init__(self, value: float32) -> None:
1727
+ """Construct a transformation filled with a value."""
1728
+ ...
1729
+
1730
+ class transformd:
1731
+ @over
1732
+ def __init__(self) -> None:
1733
+ """Construct a zero-initialized transformation."""
1734
+ ...
1735
+
1736
+ @over
1737
+ def __init__(self, other: transformd) -> None:
1738
+ """Construct a transformation by copy."""
1739
+ ...
1740
+
1741
+ @over
1742
+ def __init__(self, p: vec3d, q: quatd) -> None:
1743
+ """Construct a transformation from its p and q components."""
1744
+ ...
1745
+
1746
+ @over
1747
+ def __init__(
1748
+ self, px: float64, py: float64, pz: float64, qx: float64, qy: float64, qz: float64, qw: float64
1749
+ ) -> None:
1750
+ """Construct a transformation from its component values."""
1751
+ ...
1752
+
1753
+ @over
1754
+ def __init__(self, p: Sequence[float64], q: Sequence[float64]) -> None:
1755
+ """Construct a transformation from two sequences of values."""
1756
+ ...
1757
+
1758
+ @over
1759
+ def __init__(self, value: float64) -> None:
1760
+ """Construct a transformation filled with a value."""
1761
+ ...
1762
+
1763
+ transform = transformf
1764
+
335
1765
  @over
336
1766
  def min(a: Scalar, b: Scalar) -> Scalar:
337
1767
  """Return the minimum of two scalars."""
@@ -492,6 +1922,26 @@ def pow(x: Float, y: Float) -> Float:
492
1922
  """Return the result of ``x`` raised to power of ``y``."""
493
1923
  ...
494
1924
 
1925
+ @over
1926
+ def erf(x: Float) -> Float:
1927
+ """Return the error function of ``x``."""
1928
+ ...
1929
+
1930
+ @over
1931
+ def erfc(x: Float) -> Float:
1932
+ """Return the complementary error function of ``x``."""
1933
+ ...
1934
+
1935
+ @over
1936
+ def erfinv(x: Float) -> Float:
1937
+ """Return the inverse error function of ``x``."""
1938
+ ...
1939
+
1940
+ @over
1941
+ def erfcinv(x: Float) -> Float:
1942
+ """Return the inverse complementary error function of ``x``."""
1943
+ ...
1944
+
495
1945
  @over
496
1946
  def round(x: Float) -> Float:
497
1947
  """Return the nearest integer value to ``x``, rounding halfway cases away from zero.
@@ -747,8 +2197,10 @@ def matrix(pos: Vector[3, Float], rot: Quaternion[Float], scale: Vector[3, Float
747
2197
  """Construct a 4x4 transformation matrix that applies the transformations as
748
2198
  Translation(pos)*Rotation(rot)*Scaling(scale) when applied to column vectors, i.e.: y = (TRS)*x
749
2199
 
750
- .. warning::
751
- This function has been deprecated in favor of :func:`warp.math.transform_compose()`.
2200
+ .. versionremoved:: 1.10
2201
+ This function has been removed in favor of :func:`warp.math.transform_compose()`.
2202
+
2203
+ .. deprecated:: 1.8
752
2204
  """
753
2205
  ...
754
2206
 
@@ -1084,6 +2536,19 @@ def tile_ones(shape: Tuple[int, ...], dtype: Any, storage: str) -> Tile[Any, Tup
1084
2536
  """
1085
2537
  ...
1086
2538
 
2539
+ @over
2540
+ def tile_full(shape: Tuple[int, ...], value: Any, dtype: Any, storage: str) -> Tile[Any, Tuple[int, ...]]:
2541
+ """Allocate a tile filled with the specified value.
2542
+
2543
+ :param shape: Shape of the output tile
2544
+ :param value: Value to fill the tile with
2545
+ :param dtype: Data type of output tile's elements
2546
+ :param storage: The storage location for the tile: ``"register"`` for registers
2547
+ (default) or ``"shared"`` for shared memory.
2548
+ :returns: A tile filled with the specified value
2549
+ """
2550
+ ...
2551
+
1087
2552
  @over
1088
2553
  def tile_arange(*args: Scalar, dtype: Scalar, storage: str) -> Tile[Scalar, Tuple[int]]:
1089
2554
  """Generate a tile of linearly spaced elements.
@@ -1458,6 +2923,37 @@ def tile_broadcast(a: Tile[Any, Tuple[int, ...]], shape: Tuple[int, ...]) -> Til
1458
2923
  """
1459
2924
  ...
1460
2925
 
2926
+ @over
2927
+ def tile_sum(a: Tile[Scalar, Tuple[int, ...]], axis: int32) -> Tile[Scalar, Tuple[int, ...]]:
2928
+ """Cooperatively compute the sum of the tile elements across an axis of the tile using all threads in the block.
2929
+
2930
+ :param a: The input tile. Must reside in shared memory.
2931
+ :param axis: The tile axis to compute the sum across. Must be a compile-time constant.
2932
+ :returns: A tile with the same shape as the input tile less the axis dimension and the same data type as the input tile.
2933
+
2934
+ Example:
2935
+
2936
+ .. code-block:: python
2937
+
2938
+ @wp.kernel
2939
+ def compute():
2940
+ t = wp.tile_ones(dtype=float, shape=(8, 8))
2941
+ s = wp.tile_sum(t, axis=0)
2942
+
2943
+ print(s)
2944
+
2945
+ wp.launch_tiled(compute, dim=[1], inputs=[], block_dim=64)
2946
+
2947
+ Prints:
2948
+
2949
+ .. code-block:: text
2950
+
2951
+ [8 8 8 8 8 8 8 8] = tile(shape=(8), storage=register)
2952
+
2953
+
2954
+ """
2955
+ ...
2956
+
1461
2957
  @over
1462
2958
  def tile_sum(a: Tile[Scalar, Tuple[int, ...]]) -> Tile[Scalar, Tuple[1]]:
1463
2959
  """Cooperatively compute the sum of the tile elements using all threads in the block.
@@ -1657,19 +3153,66 @@ def tile_reduce(op: Callable, a: Tile[Scalar, Tuple[int, ...]]) -> Tile[Scalar,
1657
3153
  .. code-block:: python
1658
3154
 
1659
3155
  @wp.kernel
1660
- def factorial():
1661
- t = wp.tile_arange(1, 10, dtype=int)
1662
- s = wp.tile_reduce(wp.mul, t)
3156
+ def factorial():
3157
+ t = wp.tile_arange(1, 10, dtype=int)
3158
+ s = wp.tile_reduce(wp.mul, t)
3159
+
3160
+ print(s)
3161
+
3162
+ wp.launch_tiled(factorial, dim=[1], inputs=[], block_dim=16)
3163
+
3164
+ Prints:
3165
+
3166
+ .. code-block:: text
3167
+
3168
+ [362880] = tile(shape=(1), storage=register)
3169
+
3170
+ """
3171
+ ...
3172
+
3173
+ @over
3174
+ def tile_reduce(op: Callable, a: Tile[Scalar, Tuple[int, ...]], axis: int32) -> Tile[Scalar, Tuple[int, ...]]:
3175
+ """Apply a custom reduction operator across a tile axis.
3176
+
3177
+ This function cooperatively performs a reduction using the provided operator across an axis of the tile.
3178
+
3179
+ :param op: A callable function that accepts two arguments and returns one argument, may be a user function or builtin
3180
+ :param a: The input tile, the operator (or one of its overloads) must be able to accept the tile's data type. Must reside in shared memory.
3181
+ :param axis: The tile axis to perform the reduction across. Must be a compile-time constant.
3182
+ :returns: A tile with the same shape as the input tile less the axis dimension and the same data type as the input tile.
3183
+
3184
+ Example:
3185
+
3186
+ .. code-block:: python
3187
+
3188
+ TILE_M = wp.constant(4)
3189
+ TILE_N = wp.constant(2)
3190
+
3191
+ @wp.kernel
3192
+ def compute(x: wp.array2d(dtype=float), y: wp.array(dtype=float)):
3193
+ a = wp.tile_load(x, shape=(TILE_M, TILE_N))
3194
+ b = wp.tile_reduce(wp.add, a, axis=1)
3195
+ wp.tile_store(y, b)
1663
3196
 
1664
- print(s)
3197
+ arr = np.arange(TILE_M * TILE_N).reshape(TILE_M, TILE_N)
1665
3198
 
1666
- wp.launch_tiled(factorial, dim=[1], inputs=[], block_dim=16)
3199
+ x = wp.array(arr, dtype=float)
3200
+ y = wp.zeros(TILE_M, dtype=float)
3201
+
3202
+ wp.launch_tiled(compute, dim=[1], inputs=[x], outputs=[y], block_dim=32)
3203
+
3204
+ print(x.numpy())
3205
+ print(y.numpy())
1667
3206
 
1668
3207
  Prints:
1669
3208
 
1670
3209
  .. code-block:: text
1671
3210
 
1672
- [362880] = tile(shape=(1), storage=register)
3211
+ [[0. 1.]
3212
+ [2. 3.]
3213
+ [4. 5.]
3214
+ [6. 7.]]
3215
+ [ 1. 5. 9. 13.]
1673
3216
 
1674
3217
  """
1675
3218
  ...
@@ -1923,7 +3466,7 @@ def mesh_query_ray(id: uint64, start: vec3f, dir: vec3f, max_t: float32) -> Mesh
1923
3466
  def mesh_query_aabb(id: uint64, low: vec3f, high: vec3f) -> MeshQueryAABB:
1924
3467
  """Construct an axis-aligned bounding box query against a :class:`Mesh`.
1925
3468
 
1926
- This query can be used to iterate over all triangles inside a volume.
3469
+ This query can be used to iterate over all bounding boxes of the triangles inside a volume.
1927
3470
 
1928
3471
  :param id: The mesh identifier
1929
3472
  :param low: The lower bound of the bounding box in mesh space
@@ -1933,7 +3476,7 @@ def mesh_query_aabb(id: uint64, low: vec3f, high: vec3f) -> MeshQueryAABB:
1933
3476
 
1934
3477
  @over
1935
3478
  def mesh_query_aabb_next(query: MeshQueryAABB, index: int32) -> bool:
1936
- """Move to the next triangle overlapping the query bounding box.
3479
+ """Move to the next triangle whose bounding box overlaps the query bounding box.
1937
3480
 
1938
3481
  The index of the current face is stored in ``index``, returns ``False`` if there are no more overlapping triangles.
1939
3482
  """
@@ -1979,6 +3522,18 @@ def hash_grid_point_id(id: uint64, index: int32) -> int:
1979
3522
  def intersect_tri_tri(v0: vec3f, v1: vec3f, v2: vec3f, u0: vec3f, u1: vec3f, u2: vec3f) -> int:
1980
3523
  """Tests for intersection between two triangles (v0, v1, v2) and (u0, u1, u2) using Moller's method.
1981
3524
 
3525
+ This function works with single precision, may return incorrect results in some case.
3526
+
3527
+ Returns > 0 if triangles intersect.
3528
+ """
3529
+ ...
3530
+
3531
+ @over
3532
+ def intersect_tri_tri(v0: vec3d, v1: vec3d, v2: vec3d, u0: vec3d, u1: vec3d, u2: vec3d) -> int:
3533
+ """Tests for intersection between two triangles (v0, v1, v2) and (u0, u1, u2) using Moller's method.
3534
+
3535
+ This function works with double precision, results are more accurate than the single precision version.
3536
+
1982
3537
  Returns > 0 if triangles intersect.
1983
3538
  """
1984
3539
  ...
@@ -2407,9 +3962,11 @@ def block_dim() -> int:
2407
3962
  def select(cond: bool, value_if_false: Any, value_if_true: Any) -> Any:
2408
3963
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2409
3964
 
2410
- .. deprecated:: 1.7
3965
+ .. versionremoved:: 1.10
2411
3966
  Use :func:`where` instead, which has the more intuitive argument order:
2412
3967
  ``where(cond, value_if_true, value_if_false)``.
3968
+
3969
+ .. deprecated:: 1.7
2413
3970
  """
2414
3971
  ...
2415
3972
 
@@ -2417,9 +3974,11 @@ def select(cond: bool, value_if_false: Any, value_if_true: Any) -> Any:
2417
3974
  def select(cond: int8, value_if_false: Any, value_if_true: Any) -> Any:
2418
3975
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2419
3976
 
2420
- .. deprecated:: 1.7
3977
+ .. versionremoved:: 1.10
2421
3978
  Use :func:`where` instead, which has the more intuitive argument order:
2422
3979
  ``where(cond, value_if_true, value_if_false)``.
3980
+
3981
+ .. deprecated:: 1.7
2423
3982
  """
2424
3983
  ...
2425
3984
 
@@ -2427,9 +3986,11 @@ def select(cond: int8, value_if_false: Any, value_if_true: Any) -> Any:
2427
3986
  def select(cond: uint8, value_if_false: Any, value_if_true: Any) -> Any:
2428
3987
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2429
3988
 
2430
- .. deprecated:: 1.7
3989
+ .. versionremoved:: 1.10
2431
3990
  Use :func:`where` instead, which has the more intuitive argument order:
2432
3991
  ``where(cond, value_if_true, value_if_false)``.
3992
+
3993
+ .. deprecated:: 1.7
2433
3994
  """
2434
3995
  ...
2435
3996
 
@@ -2437,9 +3998,11 @@ def select(cond: uint8, value_if_false: Any, value_if_true: Any) -> Any:
2437
3998
  def select(cond: int16, value_if_false: Any, value_if_true: Any) -> Any:
2438
3999
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2439
4000
 
2440
- .. deprecated:: 1.7
4001
+ .. versionremoved:: 1.10
2441
4002
  Use :func:`where` instead, which has the more intuitive argument order:
2442
4003
  ``where(cond, value_if_true, value_if_false)``.
4004
+
4005
+ .. deprecated:: 1.7
2443
4006
  """
2444
4007
  ...
2445
4008
 
@@ -2447,9 +4010,11 @@ def select(cond: int16, value_if_false: Any, value_if_true: Any) -> Any:
2447
4010
  def select(cond: uint16, value_if_false: Any, value_if_true: Any) -> Any:
2448
4011
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2449
4012
 
2450
- .. deprecated:: 1.7
4013
+ .. versionremoved:: 1.10
2451
4014
  Use :func:`where` instead, which has the more intuitive argument order:
2452
4015
  ``where(cond, value_if_true, value_if_false)``.
4016
+
4017
+ .. deprecated:: 1.7
2453
4018
  """
2454
4019
  ...
2455
4020
 
@@ -2457,9 +4022,11 @@ def select(cond: uint16, value_if_false: Any, value_if_true: Any) -> Any:
2457
4022
  def select(cond: int32, value_if_false: Any, value_if_true: Any) -> Any:
2458
4023
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2459
4024
 
2460
- .. deprecated:: 1.7
4025
+ .. versionremoved:: 1.10
2461
4026
  Use :func:`where` instead, which has the more intuitive argument order:
2462
4027
  ``where(cond, value_if_true, value_if_false)``.
4028
+
4029
+ .. deprecated:: 1.7
2463
4030
  """
2464
4031
  ...
2465
4032
 
@@ -2467,9 +4034,11 @@ def select(cond: int32, value_if_false: Any, value_if_true: Any) -> Any:
2467
4034
  def select(cond: uint32, value_if_false: Any, value_if_true: Any) -> Any:
2468
4035
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2469
4036
 
2470
- .. deprecated:: 1.7
4037
+ .. versionremoved:: 1.10
2471
4038
  Use :func:`where` instead, which has the more intuitive argument order:
2472
4039
  ``where(cond, value_if_true, value_if_false)``.
4040
+
4041
+ .. deprecated:: 1.7
2473
4042
  """
2474
4043
  ...
2475
4044
 
@@ -2477,9 +4046,11 @@ def select(cond: uint32, value_if_false: Any, value_if_true: Any) -> Any:
2477
4046
  def select(cond: int64, value_if_false: Any, value_if_true: Any) -> Any:
2478
4047
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2479
4048
 
2480
- .. deprecated:: 1.7
4049
+ .. versionremoved:: 1.10
2481
4050
  Use :func:`where` instead, which has the more intuitive argument order:
2482
4051
  ``where(cond, value_if_true, value_if_false)``.
4052
+
4053
+ .. deprecated:: 1.7
2483
4054
  """
2484
4055
  ...
2485
4056
 
@@ -2487,9 +4058,11 @@ def select(cond: int64, value_if_false: Any, value_if_true: Any) -> Any:
2487
4058
  def select(cond: uint64, value_if_false: Any, value_if_true: Any) -> Any:
2488
4059
  """Select between two arguments, if ``cond`` is ``False`` then return ``value_if_false``, otherwise return ``value_if_true``.
2489
4060
 
2490
- .. deprecated:: 1.7
4061
+ .. versionremoved:: 1.10
2491
4062
  Use :func:`where` instead, which has the more intuitive argument order:
2492
4063
  ``where(cond, value_if_true, value_if_false)``.
4064
+
4065
+ .. deprecated:: 1.7
2493
4066
  """
2494
4067
  ...
2495
4068
 
@@ -2497,9 +4070,11 @@ def select(cond: uint64, value_if_false: Any, value_if_true: Any) -> Any:
2497
4070
  def select(arr: Array[Any], value_if_false: Any, value_if_true: Any) -> Any:
2498
4071
  """Select between two arguments, if ``arr`` is null then return ``value_if_false``, otherwise return ``value_if_true``.
2499
4072
 
2500
- .. deprecated:: 1.7
4073
+ .. versionremoved:: 1.10
2501
4074
  Use :func:`where` instead, which has the more intuitive argument order:
2502
4075
  ``where(arr, value_if_true, value_if_false)``.
4076
+
4077
+ .. deprecated:: 1.7
2503
4078
  """
2504
4079
  ...
2505
4080
 
@@ -3105,6 +4680,258 @@ def atomic_exch(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, va
3105
4680
  """
3106
4681
  ...
3107
4682
 
4683
+ @over
4684
+ def atomic_and(arr: Array[Any], i: Int, value: Any) -> Any:
4685
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4686
+ This function is automatically invoked when using the syntax ``arr[i] &= value``.
4687
+ """
4688
+ ...
4689
+
4690
+ @over
4691
+ def atomic_and(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
4692
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4693
+ This function is automatically invoked when using the syntax ``arr[i,j] &= value``.
4694
+ """
4695
+ ...
4696
+
4697
+ @over
4698
+ def atomic_and(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4699
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4700
+ This function is automatically invoked when using the syntax ``arr[i,j,k] &= value``.
4701
+ """
4702
+ ...
4703
+
4704
+ @over
4705
+ def atomic_and(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4706
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4707
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] &= value``.
4708
+ """
4709
+ ...
4710
+
4711
+ @over
4712
+ def atomic_and(arr: FabricArray[Any], i: Int, value: Any) -> Any:
4713
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4714
+ This function is automatically invoked when using the syntax ``arr[i] &= value``.
4715
+ """
4716
+ ...
4717
+
4718
+ @over
4719
+ def atomic_and(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
4720
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4721
+ This function is automatically invoked when using the syntax ``arr[i,j] &= value``.
4722
+ """
4723
+ ...
4724
+
4725
+ @over
4726
+ def atomic_and(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4727
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4728
+ This function is automatically invoked when using the syntax ``arr[i,j,k] &= value``.
4729
+ """
4730
+ ...
4731
+
4732
+ @over
4733
+ def atomic_and(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4734
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4735
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] &= value``.
4736
+ """
4737
+ ...
4738
+
4739
+ @over
4740
+ def atomic_and(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
4741
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4742
+ This function is automatically invoked when using the syntax ``arr[i] &= value``.
4743
+ """
4744
+ ...
4745
+
4746
+ @over
4747
+ def atomic_and(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
4748
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4749
+ This function is automatically invoked when using the syntax ``arr[i,j] &= value``.
4750
+ """
4751
+ ...
4752
+
4753
+ @over
4754
+ def atomic_and(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4755
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4756
+ This function is automatically invoked when using the syntax ``arr[i,j,k] &= value``.
4757
+ """
4758
+ ...
4759
+
4760
+ @over
4761
+ def atomic_and(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4762
+ """Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4763
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] &= value``.
4764
+ """
4765
+ ...
4766
+
4767
+ @over
4768
+ def atomic_or(arr: Array[Any], i: Int, value: Any) -> Any:
4769
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4770
+ This function is automatically invoked when using the syntax ``arr[i] |= value``.
4771
+ """
4772
+ ...
4773
+
4774
+ @over
4775
+ def atomic_or(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
4776
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4777
+ This function is automatically invoked when using the syntax ``arr[i,j] |= value``.
4778
+ """
4779
+ ...
4780
+
4781
+ @over
4782
+ def atomic_or(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4783
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4784
+ This function is automatically invoked when using the syntax ``arr[i,j,k] |= value``.
4785
+ """
4786
+ ...
4787
+
4788
+ @over
4789
+ def atomic_or(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4790
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4791
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] |= value``.
4792
+ """
4793
+ ...
4794
+
4795
+ @over
4796
+ def atomic_or(arr: FabricArray[Any], i: Int, value: Any) -> Any:
4797
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4798
+ This function is automatically invoked when using the syntax ``arr[i] |= value``.
4799
+ """
4800
+ ...
4801
+
4802
+ @over
4803
+ def atomic_or(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
4804
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4805
+ This function is automatically invoked when using the syntax ``arr[i,j] |= value``.
4806
+ """
4807
+ ...
4808
+
4809
+ @over
4810
+ def atomic_or(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4811
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4812
+ This function is automatically invoked when using the syntax ``arr[i,j,k] |= value``.
4813
+ """
4814
+ ...
4815
+
4816
+ @over
4817
+ def atomic_or(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4818
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4819
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] |= value``.
4820
+ """
4821
+ ...
4822
+
4823
+ @over
4824
+ def atomic_or(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
4825
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4826
+ This function is automatically invoked when using the syntax ``arr[i] |= value``.
4827
+ """
4828
+ ...
4829
+
4830
+ @over
4831
+ def atomic_or(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
4832
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4833
+ This function is automatically invoked when using the syntax ``arr[i,j] |= value``.
4834
+ """
4835
+ ...
4836
+
4837
+ @over
4838
+ def atomic_or(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4839
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4840
+ This function is automatically invoked when using the syntax ``arr[i,j,k] |= value``.
4841
+ """
4842
+ ...
4843
+
4844
+ @over
4845
+ def atomic_or(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4846
+ """Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4847
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] |= value``.
4848
+ """
4849
+ ...
4850
+
4851
+ @over
4852
+ def atomic_xor(arr: Array[Any], i: Int, value: Any) -> Any:
4853
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4854
+ This function is automatically invoked when using the syntax ``arr[i] ^= value``.
4855
+ """
4856
+ ...
4857
+
4858
+ @over
4859
+ def atomic_xor(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
4860
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4861
+ This function is automatically invoked when using the syntax ``arr[i,j] ^= value``.
4862
+ """
4863
+ ...
4864
+
4865
+ @over
4866
+ def atomic_xor(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4867
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4868
+ This function is automatically invoked when using the syntax ``arr[i,j,k] ^= value``.
4869
+ """
4870
+ ...
4871
+
4872
+ @over
4873
+ def atomic_xor(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4874
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4875
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] ^= value``.
4876
+ """
4877
+ ...
4878
+
4879
+ @over
4880
+ def atomic_xor(arr: FabricArray[Any], i: Int, value: Any) -> Any:
4881
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4882
+ This function is automatically invoked when using the syntax ``arr[i] ^= value``.
4883
+ """
4884
+ ...
4885
+
4886
+ @over
4887
+ def atomic_xor(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
4888
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4889
+ This function is automatically invoked when using the syntax ``arr[i,j] ^= value``.
4890
+ """
4891
+ ...
4892
+
4893
+ @over
4894
+ def atomic_xor(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4895
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4896
+ This function is automatically invoked when using the syntax ``arr[i,j,k] ^= value``.
4897
+ """
4898
+ ...
4899
+
4900
+ @over
4901
+ def atomic_xor(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4902
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4903
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] ^= value``.
4904
+ """
4905
+ ...
4906
+
4907
+ @over
4908
+ def atomic_xor(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
4909
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
4910
+ This function is automatically invoked when using the syntax ``arr[i] ^= value``.
4911
+ """
4912
+ ...
4913
+
4914
+ @over
4915
+ def atomic_xor(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
4916
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
4917
+ This function is automatically invoked when using the syntax ``arr[i,j] ^= value``.
4918
+ """
4919
+ ...
4920
+
4921
+ @over
4922
+ def atomic_xor(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
4923
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
4924
+ This function is automatically invoked when using the syntax ``arr[i,j,k] ^= value``.
4925
+ """
4926
+ ...
4927
+
4928
+ @over
4929
+ def atomic_xor(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
4930
+ """Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
4931
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] ^= value``.
4932
+ """
4933
+ ...
4934
+
3108
4935
  @over
3109
4936
  def lerp(a: Float, b: Float, t: Float) -> Float:
3110
4937
  """Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
@@ -3232,31 +5059,106 @@ def bit_and(a: Int, b: Int) -> Int:
3232
5059
  """ """
3233
5060
  ...
3234
5061
 
5062
+ @over
5063
+ def bit_and(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
5064
+ """ """
5065
+ ...
5066
+
5067
+ @over
5068
+ def bit_and(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
5069
+ """ """
5070
+ ...
5071
+
5072
+ @over
5073
+ def bit_and(a: Tile[Any, Tuple[int, ...]], b: Tile[Any, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
5074
+ """Bitwise AND each element of two tiles together"""
5075
+ ...
5076
+
3235
5077
  @over
3236
5078
  def bit_or(a: Int, b: Int) -> Int:
3237
5079
  """ """
3238
5080
  ...
3239
5081
 
5082
+ @over
5083
+ def bit_or(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
5084
+ """ """
5085
+ ...
5086
+
5087
+ @over
5088
+ def bit_or(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
5089
+ """ """
5090
+ ...
5091
+
5092
+ @over
5093
+ def bit_or(a: Tile[Any, Tuple[int, ...]], b: Tile[Any, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
5094
+ """Bitwise OR each element of two tiles together"""
5095
+ ...
5096
+
3240
5097
  @over
3241
5098
  def bit_xor(a: Int, b: Int) -> Int:
3242
5099
  """ """
3243
5100
  ...
3244
5101
 
5102
+ @over
5103
+ def bit_xor(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
5104
+ """ """
5105
+ ...
5106
+
5107
+ @over
5108
+ def bit_xor(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
5109
+ """ """
5110
+ ...
5111
+
5112
+ @over
5113
+ def bit_xor(a: Tile[Any, Tuple[int, ...]], b: Tile[Any, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
5114
+ """Bitwise XOR each element of two tiles together"""
5115
+ ...
5116
+
3245
5117
  @over
3246
5118
  def lshift(a: Int, b: Int) -> Int:
3247
5119
  """ """
3248
5120
  ...
3249
5121
 
5122
+ @over
5123
+ def lshift(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
5124
+ """ """
5125
+ ...
5126
+
5127
+ @over
5128
+ def lshift(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
5129
+ """ """
5130
+ ...
5131
+
3250
5132
  @over
3251
5133
  def rshift(a: Int, b: Int) -> Int:
3252
5134
  """ """
3253
5135
  ...
3254
5136
 
5137
+ @over
5138
+ def rshift(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
5139
+ """ """
5140
+ ...
5141
+
5142
+ @over
5143
+ def rshift(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
5144
+ """ """
5145
+ ...
5146
+
3255
5147
  @over
3256
5148
  def invert(a: Int) -> Int:
3257
5149
  """ """
3258
5150
  ...
3259
5151
 
5152
+ @over
5153
+ def invert(a: Vector[Any, Int]) -> Vector[Any, Int]:
5154
+ """ """
5155
+ ...
5156
+
5157
+ @over
5158
+ def invert(a: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
5159
+ """ """
5160
+ ...
5161
+
3260
5162
  @over
3261
5163
  def mul(a: Scalar, b: Scalar) -> Scalar:
3262
5164
  """ """
@@ -3672,6 +5574,11 @@ def len(a: Tuple) -> int:
3672
5574
  """Return the number of elements in a tuple."""
3673
5575
  ...
3674
5576
 
5577
+ @over
5578
+ def cast(a: Any, dtype: Any) -> Any:
5579
+ """Reinterpret a value as a different type while preserving its bit pattern."""
5580
+ ...
5581
+
3675
5582
  @over
3676
5583
  def norm_l1(v: Any):
3677
5584
  """Computes the L1 norm of a vector v.