warp-lang 1.9.0__py3-none-manylinux_2_34_aarch64.whl → 1.10.0__py3-none-manylinux_2_34_aarch64.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.
- warp/__init__.py +301 -287
- warp/__init__.pyi +2302 -307
- warp/_src/__init__.py +14 -0
- warp/_src/autograd.py +1077 -0
- warp/_src/build.py +620 -0
- warp/_src/build_dll.py +642 -0
- warp/{builtins.py → _src/builtins.py} +1546 -224
- warp/_src/codegen.py +4361 -0
- warp/{config.py → _src/config.py} +178 -169
- warp/_src/constants.py +59 -0
- warp/_src/context.py +8352 -0
- warp/_src/dlpack.py +464 -0
- warp/_src/fabric.py +362 -0
- warp/_src/fem/__init__.py +14 -0
- warp/_src/fem/adaptivity.py +510 -0
- warp/_src/fem/cache.py +689 -0
- warp/_src/fem/dirichlet.py +190 -0
- warp/{fem → _src/fem}/domain.py +42 -30
- warp/_src/fem/field/__init__.py +131 -0
- warp/_src/fem/field/field.py +703 -0
- warp/{fem → _src/fem}/field/nodal_field.py +32 -15
- warp/{fem → _src/fem}/field/restriction.py +3 -1
- warp/{fem → _src/fem}/field/virtual.py +55 -27
- warp/_src/fem/geometry/__init__.py +32 -0
- warp/{fem → _src/fem}/geometry/adaptive_nanogrid.py +79 -163
- warp/_src/fem/geometry/closest_point.py +99 -0
- warp/{fem → _src/fem}/geometry/deformed_geometry.py +16 -22
- warp/{fem → _src/fem}/geometry/element.py +34 -10
- warp/{fem → _src/fem}/geometry/geometry.py +50 -20
- warp/{fem → _src/fem}/geometry/grid_2d.py +14 -23
- warp/{fem → _src/fem}/geometry/grid_3d.py +14 -23
- warp/{fem → _src/fem}/geometry/hexmesh.py +42 -63
- warp/{fem → _src/fem}/geometry/nanogrid.py +256 -247
- warp/{fem → _src/fem}/geometry/partition.py +123 -63
- warp/{fem → _src/fem}/geometry/quadmesh.py +28 -45
- warp/{fem → _src/fem}/geometry/tetmesh.py +42 -63
- warp/{fem → _src/fem}/geometry/trimesh.py +28 -45
- warp/{fem → _src/fem}/integrate.py +166 -158
- warp/_src/fem/linalg.py +385 -0
- warp/_src/fem/operator.py +398 -0
- warp/_src/fem/polynomial.py +231 -0
- warp/{fem → _src/fem}/quadrature/pic_quadrature.py +17 -20
- warp/{fem → _src/fem}/quadrature/quadrature.py +97 -47
- warp/_src/fem/space/__init__.py +248 -0
- warp/{fem → _src/fem}/space/basis_function_space.py +22 -11
- warp/_src/fem/space/basis_space.py +681 -0
- warp/{fem → _src/fem}/space/dof_mapper.py +5 -3
- warp/{fem → _src/fem}/space/function_space.py +16 -13
- warp/{fem → _src/fem}/space/grid_2d_function_space.py +6 -7
- warp/{fem → _src/fem}/space/grid_3d_function_space.py +6 -4
- warp/{fem → _src/fem}/space/hexmesh_function_space.py +6 -10
- warp/{fem → _src/fem}/space/nanogrid_function_space.py +5 -9
- warp/{fem → _src/fem}/space/partition.py +119 -60
- warp/{fem → _src/fem}/space/quadmesh_function_space.py +6 -10
- warp/{fem → _src/fem}/space/restriction.py +68 -33
- warp/_src/fem/space/shape/__init__.py +152 -0
- warp/{fem → _src/fem}/space/shape/cube_shape_function.py +11 -9
- warp/{fem → _src/fem}/space/shape/shape_function.py +10 -9
- warp/{fem → _src/fem}/space/shape/square_shape_function.py +8 -6
- warp/{fem → _src/fem}/space/shape/tet_shape_function.py +5 -3
- warp/{fem → _src/fem}/space/shape/triangle_shape_function.py +5 -3
- warp/{fem → _src/fem}/space/tetmesh_function_space.py +5 -9
- warp/_src/fem/space/topology.py +461 -0
- warp/{fem → _src/fem}/space/trimesh_function_space.py +5 -9
- warp/_src/fem/types.py +114 -0
- warp/_src/fem/utils.py +488 -0
- warp/_src/jax.py +188 -0
- warp/_src/jax_experimental/__init__.py +14 -0
- warp/_src/jax_experimental/custom_call.py +389 -0
- warp/_src/jax_experimental/ffi.py +1286 -0
- warp/_src/jax_experimental/xla_ffi.py +658 -0
- warp/_src/marching_cubes.py +710 -0
- warp/_src/math.py +416 -0
- warp/_src/optim/__init__.py +14 -0
- warp/_src/optim/adam.py +165 -0
- warp/_src/optim/linear.py +1608 -0
- warp/_src/optim/sgd.py +114 -0
- warp/_src/paddle.py +408 -0
- warp/_src/render/__init__.py +14 -0
- warp/_src/render/imgui_manager.py +291 -0
- warp/_src/render/render_opengl.py +3638 -0
- warp/_src/render/render_usd.py +939 -0
- warp/_src/render/utils.py +162 -0
- warp/_src/sparse.py +2718 -0
- warp/_src/tape.py +1208 -0
- warp/{thirdparty → _src/thirdparty}/unittest_parallel.py +9 -2
- warp/_src/torch.py +393 -0
- warp/_src/types.py +5888 -0
- warp/_src/utils.py +1695 -0
- warp/autograd.py +12 -1054
- warp/bin/warp-clang.so +0 -0
- warp/bin/warp.so +0 -0
- warp/build.py +8 -588
- warp/build_dll.py +6 -471
- warp/codegen.py +6 -4246
- warp/constants.py +6 -39
- warp/context.py +12 -7851
- warp/dlpack.py +6 -444
- warp/examples/distributed/example_jacobi_mpi.py +4 -5
- warp/examples/fem/example_adaptive_grid.py +1 -1
- warp/examples/fem/example_apic_fluid.py +1 -1
- warp/examples/fem/example_burgers.py +8 -8
- warp/examples/fem/example_diffusion.py +1 -1
- warp/examples/fem/example_distortion_energy.py +1 -1
- warp/examples/fem/example_mixed_elasticity.py +2 -2
- warp/examples/fem/example_navier_stokes.py +1 -1
- warp/examples/fem/example_nonconforming_contact.py +7 -7
- warp/examples/fem/example_stokes.py +1 -1
- warp/examples/fem/example_stokes_transfer.py +1 -1
- warp/examples/fem/utils.py +2 -2
- warp/examples/interop/example_jax_callable.py +1 -1
- warp/examples/interop/example_jax_ffi_callback.py +1 -1
- warp/examples/interop/example_jax_kernel.py +3 -2
- warp/examples/tile/example_tile_mcgp.py +191 -0
- warp/fabric.py +6 -337
- warp/fem/__init__.py +159 -97
- warp/fem/adaptivity.py +7 -489
- warp/fem/cache.py +9 -648
- warp/fem/dirichlet.py +6 -184
- warp/fem/field/__init__.py +8 -109
- warp/fem/field/field.py +7 -652
- warp/fem/geometry/__init__.py +7 -18
- warp/fem/geometry/closest_point.py +11 -77
- warp/fem/linalg.py +18 -366
- warp/fem/operator.py +11 -369
- warp/fem/polynomial.py +9 -209
- warp/fem/space/__init__.py +5 -211
- warp/fem/space/basis_space.py +6 -662
- warp/fem/space/shape/__init__.py +41 -118
- warp/fem/space/topology.py +6 -437
- warp/fem/types.py +6 -81
- warp/fem/utils.py +11 -444
- warp/jax.py +8 -165
- warp/jax_experimental/__init__.py +14 -1
- warp/jax_experimental/custom_call.py +8 -342
- warp/jax_experimental/ffi.py +17 -853
- warp/jax_experimental/xla_ffi.py +5 -596
- warp/marching_cubes.py +5 -689
- warp/math.py +16 -393
- warp/native/array.h +385 -37
- warp/native/builtin.h +316 -39
- warp/native/bvh.cpp +43 -9
- warp/native/bvh.cu +62 -27
- warp/native/bvh.h +310 -309
- warp/native/clang/clang.cpp +102 -97
- warp/native/coloring.cpp +0 -1
- warp/native/crt.h +208 -0
- warp/native/exports.h +156 -0
- warp/native/hashgrid.cu +2 -0
- warp/native/intersect.h +24 -1
- warp/native/intersect_tri.h +44 -35
- warp/native/mat.h +1456 -276
- warp/native/mesh.cpp +4 -4
- warp/native/mesh.cu +4 -2
- warp/native/mesh.h +176 -61
- warp/native/quat.h +0 -52
- warp/native/scan.cu +2 -0
- warp/native/sort.cu +22 -13
- warp/native/sort.h +2 -0
- warp/native/sparse.cu +7 -3
- warp/native/spatial.h +12 -0
- warp/native/tile.h +837 -70
- warp/native/tile_radix_sort.h +3 -3
- warp/native/tile_reduce.h +394 -46
- warp/native/tile_scan.h +4 -4
- warp/native/vec.h +469 -53
- warp/native/version.h +23 -0
- warp/native/volume.cpp +1 -1
- warp/native/volume.cu +1 -0
- warp/native/volume.h +1 -1
- warp/native/volume_builder.cu +2 -0
- warp/native/warp.cpp +60 -32
- warp/native/warp.cu +581 -280
- warp/native/warp.h +14 -11
- warp/optim/__init__.py +6 -3
- warp/optim/adam.py +6 -145
- warp/optim/linear.py +14 -1585
- warp/optim/sgd.py +6 -94
- warp/paddle.py +6 -388
- warp/render/__init__.py +8 -4
- warp/render/imgui_manager.py +7 -267
- warp/render/render_opengl.py +6 -3616
- warp/render/render_usd.py +6 -918
- warp/render/utils.py +6 -142
- warp/sparse.py +37 -2563
- warp/tape.py +6 -1188
- warp/tests/__main__.py +1 -1
- warp/tests/cuda/test_async.py +4 -4
- warp/tests/cuda/test_conditional_captures.py +1 -1
- warp/tests/cuda/test_multigpu.py +1 -1
- warp/tests/cuda/test_streams.py +58 -1
- warp/tests/geometry/test_bvh.py +157 -22
- warp/tests/geometry/test_hash_grid.py +38 -0
- warp/tests/geometry/test_marching_cubes.py +0 -1
- warp/tests/geometry/test_mesh.py +5 -3
- warp/tests/geometry/test_mesh_query_aabb.py +5 -12
- warp/tests/geometry/test_mesh_query_point.py +5 -2
- warp/tests/geometry/test_mesh_query_ray.py +15 -3
- warp/tests/geometry/test_volume_write.py +5 -5
- warp/tests/interop/test_dlpack.py +18 -17
- warp/tests/interop/test_jax.py +1382 -79
- warp/tests/interop/test_paddle.py +1 -1
- warp/tests/test_adam.py +0 -1
- warp/tests/test_arithmetic.py +9 -9
- warp/tests/test_array.py +580 -100
- warp/tests/test_array_reduce.py +3 -3
- warp/tests/test_atomic.py +12 -8
- warp/tests/test_atomic_bitwise.py +209 -0
- warp/tests/test_atomic_cas.py +4 -4
- warp/tests/test_bool.py +2 -2
- warp/tests/test_builtins_resolution.py +5 -571
- warp/tests/test_codegen.py +34 -15
- warp/tests/test_conditional.py +1 -1
- warp/tests/test_context.py +6 -6
- warp/tests/test_copy.py +242 -161
- warp/tests/test_ctypes.py +3 -3
- warp/tests/test_devices.py +24 -2
- warp/tests/test_examples.py +16 -84
- warp/tests/test_fabricarray.py +35 -35
- warp/tests/test_fast_math.py +0 -2
- warp/tests/test_fem.py +60 -14
- warp/tests/test_fixedarray.py +3 -3
- warp/tests/test_func.py +8 -5
- warp/tests/test_generics.py +1 -1
- warp/tests/test_indexedarray.py +24 -24
- warp/tests/test_intersect.py +39 -9
- warp/tests/test_large.py +1 -1
- warp/tests/test_lerp.py +3 -1
- warp/tests/test_linear_solvers.py +1 -1
- warp/tests/test_map.py +49 -4
- warp/tests/test_mat.py +52 -62
- warp/tests/test_mat_constructors.py +4 -5
- warp/tests/test_mat_lite.py +1 -1
- warp/tests/test_mat_scalar_ops.py +121 -121
- warp/tests/test_math.py +34 -0
- warp/tests/test_module_aot.py +4 -4
- warp/tests/test_modules_lite.py +28 -2
- warp/tests/test_print.py +11 -11
- warp/tests/test_quat.py +93 -58
- warp/tests/test_runlength_encode.py +1 -1
- warp/tests/test_scalar_ops.py +38 -10
- warp/tests/test_smoothstep.py +1 -1
- warp/tests/test_sparse.py +126 -15
- warp/tests/test_spatial.py +105 -87
- warp/tests/test_special_values.py +6 -6
- warp/tests/test_static.py +7 -7
- warp/tests/test_struct.py +13 -2
- warp/tests/test_triangle_closest_point.py +48 -1
- warp/tests/test_tuple.py +96 -0
- warp/tests/test_types.py +82 -9
- warp/tests/test_utils.py +52 -52
- warp/tests/test_vec.py +29 -29
- warp/tests/test_vec_constructors.py +5 -5
- warp/tests/test_vec_scalar_ops.py +97 -97
- warp/tests/test_version.py +75 -0
- warp/tests/tile/test_tile.py +239 -0
- warp/tests/tile/test_tile_atomic_bitwise.py +403 -0
- warp/tests/tile/test_tile_cholesky.py +7 -4
- warp/tests/tile/test_tile_load.py +26 -2
- warp/tests/tile/test_tile_mathdx.py +3 -3
- warp/tests/tile/test_tile_matmul.py +1 -1
- warp/tests/tile/test_tile_mlp.py +2 -4
- warp/tests/tile/test_tile_reduce.py +214 -13
- warp/tests/unittest_suites.py +6 -14
- warp/tests/unittest_utils.py +10 -9
- warp/tests/walkthrough_debug.py +3 -1
- warp/torch.py +6 -373
- warp/types.py +29 -5750
- warp/utils.py +10 -1659
- {warp_lang-1.9.0.dist-info → warp_lang-1.10.0.dist-info}/METADATA +47 -103
- warp_lang-1.10.0.dist-info/RECORD +468 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/Gaia-LICENSE.txt +6 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/appdirs-LICENSE.txt +22 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/asset_pixel_jpg-LICENSE.txt +3 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/cuda-LICENSE.txt +1582 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/dlpack-LICENSE.txt +201 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/fp16-LICENSE.txt +28 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/libmathdx-LICENSE.txt +220 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/llvm-LICENSE.txt +279 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/moller-LICENSE.txt +16 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/nanovdb-LICENSE.txt +2 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/nvrtc-LICENSE.txt +1592 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/svd-LICENSE.txt +23 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/unittest_parallel-LICENSE.txt +21 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/usd-LICENSE.txt +213 -0
- warp_lang-1.10.0.dist-info/licenses/licenses/windingnumber-LICENSE.txt +21 -0
- warp/examples/assets/cartpole.urdf +0 -110
- warp/examples/assets/crazyflie.usd +0 -0
- warp/examples/assets/nv_ant.xml +0 -92
- warp/examples/assets/nv_humanoid.xml +0 -183
- warp/examples/assets/quadruped.urdf +0 -268
- warp/examples/optim/example_bounce.py +0 -266
- warp/examples/optim/example_cloth_throw.py +0 -228
- warp/examples/optim/example_drone.py +0 -870
- warp/examples/optim/example_inverse_kinematics.py +0 -182
- warp/examples/optim/example_inverse_kinematics_torch.py +0 -191
- warp/examples/optim/example_softbody_properties.py +0 -400
- warp/examples/optim/example_spring_cage.py +0 -245
- warp/examples/optim/example_trajectory.py +0 -227
- warp/examples/sim/example_cartpole.py +0 -143
- warp/examples/sim/example_cloth.py +0 -225
- warp/examples/sim/example_cloth_self_contact.py +0 -316
- warp/examples/sim/example_granular.py +0 -130
- warp/examples/sim/example_granular_collision_sdf.py +0 -202
- warp/examples/sim/example_jacobian_ik.py +0 -244
- warp/examples/sim/example_particle_chain.py +0 -124
- warp/examples/sim/example_quadruped.py +0 -203
- warp/examples/sim/example_rigid_chain.py +0 -203
- warp/examples/sim/example_rigid_contact.py +0 -195
- warp/examples/sim/example_rigid_force.py +0 -133
- warp/examples/sim/example_rigid_gyroscopic.py +0 -115
- warp/examples/sim/example_rigid_soft_contact.py +0 -140
- warp/examples/sim/example_soft_body.py +0 -196
- warp/examples/tile/example_tile_walker.py +0 -327
- warp/sim/__init__.py +0 -74
- warp/sim/articulation.py +0 -793
- warp/sim/collide.py +0 -2570
- warp/sim/graph_coloring.py +0 -307
- warp/sim/import_mjcf.py +0 -791
- warp/sim/import_snu.py +0 -227
- warp/sim/import_urdf.py +0 -579
- warp/sim/import_usd.py +0 -898
- warp/sim/inertia.py +0 -357
- warp/sim/integrator.py +0 -245
- warp/sim/integrator_euler.py +0 -2000
- warp/sim/integrator_featherstone.py +0 -2101
- warp/sim/integrator_vbd.py +0 -2487
- warp/sim/integrator_xpbd.py +0 -3295
- warp/sim/model.py +0 -4821
- warp/sim/particles.py +0 -121
- warp/sim/render.py +0 -431
- warp/sim/utils.py +0 -431
- warp/tests/sim/disabled_kinematics.py +0 -244
- warp/tests/sim/test_cloth.py +0 -863
- warp/tests/sim/test_collision.py +0 -743
- warp/tests/sim/test_coloring.py +0 -347
- warp/tests/sim/test_inertia.py +0 -161
- warp/tests/sim/test_model.py +0 -226
- warp/tests/sim/test_sim_grad.py +0 -287
- warp/tests/sim/test_sim_grad_bounce_linear.py +0 -212
- warp/tests/sim/test_sim_kinematics.py +0 -98
- warp/thirdparty/__init__.py +0 -0
- warp_lang-1.9.0.dist-info/RECORD +0 -456
- /warp/{fem → _src/fem}/quadrature/__init__.py +0 -0
- /warp/{tests/sim → _src/thirdparty}/__init__.py +0 -0
- /warp/{thirdparty → _src/thirdparty}/appdirs.py +0 -0
- /warp/{thirdparty → _src/thirdparty}/dlpack.py +0 -0
- {warp_lang-1.9.0.dist-info → warp_lang-1.10.0.dist-info}/WHEEL +0 -0
- {warp_lang-1.9.0.dist-info → warp_lang-1.10.0.dist-info}/licenses/LICENSE.md +0 -0
- {warp_lang-1.9.0.dist-info → warp_lang-1.10.0.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
|
|
160
|
-
from warp.types import
|
|
161
|
-
|
|
162
|
-
from warp.types import
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
from warp.types import
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
from warp.types import
|
|
169
|
-
|
|
170
|
-
from warp.
|
|
171
|
-
from warp.
|
|
172
|
-
|
|
173
|
-
from warp.
|
|
174
|
-
|
|
175
|
-
from warp.context import
|
|
176
|
-
from warp.context import
|
|
177
|
-
from warp.context import
|
|
178
|
-
|
|
179
|
-
from warp.context import
|
|
180
|
-
from warp.context import
|
|
181
|
-
from warp.context import
|
|
182
|
-
from warp.context import
|
|
183
|
-
|
|
184
|
-
from warp.context import
|
|
185
|
-
from warp.context import
|
|
186
|
-
from warp.context import
|
|
187
|
-
from warp.context import
|
|
188
|
-
from warp.context import
|
|
189
|
-
from warp.context import
|
|
190
|
-
from warp.context import
|
|
191
|
-
from warp.context import
|
|
192
|
-
from warp.context import
|
|
193
|
-
|
|
194
|
-
from warp.context import
|
|
195
|
-
from warp.context import
|
|
196
|
-
from warp.context import
|
|
197
|
-
|
|
198
|
-
from warp.context import
|
|
199
|
-
from warp.context import
|
|
200
|
-
from warp.context import
|
|
201
|
-
from warp.context import
|
|
202
|
-
from warp.context import
|
|
203
|
-
from warp.context import
|
|
204
|
-
from warp.context import
|
|
205
|
-
|
|
206
|
-
from warp.context import
|
|
207
|
-
from warp.context import
|
|
208
|
-
from warp.context import
|
|
209
|
-
|
|
210
|
-
from warp.context import
|
|
211
|
-
from warp.context import
|
|
212
|
-
from warp.context import
|
|
213
|
-
from warp.context import
|
|
214
|
-
|
|
215
|
-
from warp.context import
|
|
216
|
-
from warp.context import
|
|
217
|
-
from warp.context import
|
|
218
|
-
|
|
219
|
-
from warp.context import
|
|
220
|
-
from warp.context import
|
|
221
|
-
from warp.context import
|
|
222
|
-
|
|
223
|
-
from warp.context import
|
|
224
|
-
from warp.context import
|
|
225
|
-
|
|
226
|
-
from warp.context import
|
|
227
|
-
from warp.context import
|
|
228
|
-
from warp.context import
|
|
229
|
-
|
|
230
|
-
from warp.context import
|
|
231
|
-
from warp.context import
|
|
232
|
-
from warp.context import
|
|
233
|
-
|
|
234
|
-
from warp.context import
|
|
235
|
-
|
|
236
|
-
from warp.context import
|
|
237
|
-
from warp.context import
|
|
238
|
-
from warp.context import
|
|
239
|
-
|
|
240
|
-
from warp.context import
|
|
241
|
-
|
|
242
|
-
from warp.context import
|
|
243
|
-
|
|
244
|
-
from warp.context import
|
|
245
|
-
|
|
246
|
-
from warp.context import
|
|
247
|
-
|
|
248
|
-
from warp.context import
|
|
249
|
-
from warp.context import
|
|
250
|
-
from warp.context import
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
from warp.context import
|
|
254
|
-
from warp.context import
|
|
255
|
-
from warp.context import
|
|
256
|
-
|
|
257
|
-
from warp.context import
|
|
258
|
-
from warp.context import
|
|
259
|
-
from warp.context import
|
|
260
|
-
|
|
261
|
-
from warp.
|
|
262
|
-
|
|
263
|
-
from warp.
|
|
264
|
-
|
|
265
|
-
from warp.
|
|
266
|
-
|
|
267
|
-
from warp.utils import
|
|
268
|
-
from warp.utils import
|
|
269
|
-
from warp.utils import
|
|
270
|
-
|
|
271
|
-
from warp.utils import
|
|
272
|
-
from warp.utils import
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
from warp.utils import
|
|
276
|
-
from warp.utils import
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
from warp.utils import
|
|
280
|
-
from warp.utils import
|
|
281
|
-
from warp.utils import
|
|
282
|
-
|
|
283
|
-
from warp.utils import
|
|
284
|
-
from warp.utils import
|
|
285
|
-
|
|
286
|
-
from warp.utils import
|
|
287
|
-
|
|
288
|
-
from warp.
|
|
289
|
-
|
|
290
|
-
from warp.
|
|
291
|
-
|
|
292
|
-
from warp.
|
|
293
|
-
|
|
294
|
-
from warp.torch import
|
|
295
|
-
from warp.torch import
|
|
296
|
-
from warp.torch import
|
|
297
|
-
from warp.torch import
|
|
298
|
-
|
|
299
|
-
from warp.
|
|
300
|
-
from warp.
|
|
301
|
-
from warp.
|
|
302
|
-
|
|
303
|
-
from warp.jax import
|
|
304
|
-
from warp.jax import
|
|
305
|
-
|
|
306
|
-
from warp.
|
|
307
|
-
from warp.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
from warp.
|
|
311
|
-
from warp.
|
|
312
|
-
|
|
313
|
-
from warp.paddle import
|
|
314
|
-
from warp.paddle import
|
|
315
|
-
from warp.paddle import
|
|
316
|
-
|
|
317
|
-
from warp.
|
|
318
|
-
from warp.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
from warp.
|
|
323
|
-
|
|
324
|
-
from warp.
|
|
325
|
-
|
|
326
|
-
from . import builtins
|
|
327
|
-
from warp.
|
|
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
|
-
..
|
|
751
|
-
This function has been
|
|
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.
|
|
@@ -1674,6 +3170,53 @@ def tile_reduce(op: Callable, a: Tile[Scalar, Tuple[int, ...]]) -> Tile[Scalar,
|
|
|
1674
3170
|
"""
|
|
1675
3171
|
...
|
|
1676
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)
|
|
3196
|
+
|
|
3197
|
+
arr = np.arange(TILE_M * TILE_N).reshape(TILE_M, TILE_N)
|
|
3198
|
+
|
|
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())
|
|
3206
|
+
|
|
3207
|
+
Prints:
|
|
3208
|
+
|
|
3209
|
+
.. code-block:: text
|
|
3210
|
+
|
|
3211
|
+
[[0. 1.]
|
|
3212
|
+
[2. 3.]
|
|
3213
|
+
[4. 5.]
|
|
3214
|
+
[6. 7.]]
|
|
3215
|
+
[ 1. 5. 9. 13.]
|
|
3216
|
+
|
|
3217
|
+
"""
|
|
3218
|
+
...
|
|
3219
|
+
|
|
1677
3220
|
@over
|
|
1678
3221
|
def tile_scan_inclusive(a: Tile[Scalar, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
|
|
1679
3222
|
"""Inclusive scan (prefix sum) across the tile.
|
|
@@ -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
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
-
..
|
|
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
|
|
|
@@ -2556,6 +4131,7 @@ def where(arr: Array[Any], value_if_true: Any, value_if_false: Any) -> Any:
|
|
|
2556
4131
|
@over
|
|
2557
4132
|
def atomic_add(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
2558
4133
|
"""Atomically adds ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
|
|
4134
|
+
|
|
2559
4135
|
This function is automatically invoked when using the syntax ``arr[i] += value``.
|
|
2560
4136
|
"""
|
|
2561
4137
|
...
|
|
@@ -2563,6 +4139,7 @@ def atomic_add(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
|
2563
4139
|
@over
|
|
2564
4140
|
def atomic_add(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
2565
4141
|
"""Atomically adds ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
|
|
4142
|
+
|
|
2566
4143
|
This function is automatically invoked when using the syntax ``arr[i,j] += value``.
|
|
2567
4144
|
"""
|
|
2568
4145
|
...
|
|
@@ -2570,6 +4147,7 @@ def atomic_add(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
|
2570
4147
|
@over
|
|
2571
4148
|
def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
2572
4149
|
"""Atomically adds ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
|
|
4150
|
+
|
|
2573
4151
|
This function is automatically invoked when using the syntax ``arr[i,j,k] += value``.
|
|
2574
4152
|
"""
|
|
2575
4153
|
...
|
|
@@ -2577,6 +4155,7 @@ def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
|
2577
4155
|
@over
|
|
2578
4156
|
def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
2579
4157
|
"""Atomically adds ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
|
|
4158
|
+
|
|
2580
4159
|
This function is automatically invoked when using the syntax ``arr[i,j,k,l] += value``.
|
|
2581
4160
|
"""
|
|
2582
4161
|
...
|
|
@@ -2584,6 +4163,7 @@ def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> A
|
|
|
2584
4163
|
@over
|
|
2585
4164
|
def atomic_add(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
2586
4165
|
"""Atomically adds ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
|
|
4166
|
+
|
|
2587
4167
|
This function is automatically invoked when using the syntax ``arr[i] += value``.
|
|
2588
4168
|
"""
|
|
2589
4169
|
...
|
|
@@ -2591,6 +4171,7 @@ def atomic_add(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
|
2591
4171
|
@over
|
|
2592
4172
|
def atomic_add(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
2593
4173
|
"""Atomically adds ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
|
|
4174
|
+
|
|
2594
4175
|
This function is automatically invoked when using the syntax ``arr[i,j] += value``.
|
|
2595
4176
|
"""
|
|
2596
4177
|
...
|
|
@@ -2598,6 +4179,7 @@ def atomic_add(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
|
2598
4179
|
@over
|
|
2599
4180
|
def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
2600
4181
|
"""Atomically adds ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
|
|
4182
|
+
|
|
2601
4183
|
This function is automatically invoked when using the syntax ``arr[i,j,k] += value``.
|
|
2602
4184
|
"""
|
|
2603
4185
|
...
|
|
@@ -2605,6 +4187,7 @@ def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any
|
|
|
2605
4187
|
@over
|
|
2606
4188
|
def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
2607
4189
|
"""Atomically adds ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
|
|
4190
|
+
|
|
2608
4191
|
This function is automatically invoked when using the syntax ``arr[i,j,k,l] += value``.
|
|
2609
4192
|
"""
|
|
2610
4193
|
...
|
|
@@ -2612,6 +4195,7 @@ def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any
|
|
|
2612
4195
|
@over
|
|
2613
4196
|
def atomic_add(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
2614
4197
|
"""Atomically adds ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
|
|
4198
|
+
|
|
2615
4199
|
This function is automatically invoked when using the syntax ``arr[i] += value``.
|
|
2616
4200
|
"""
|
|
2617
4201
|
...
|
|
@@ -2619,6 +4203,7 @@ def atomic_add(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
|
2619
4203
|
@over
|
|
2620
4204
|
def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
2621
4205
|
"""Atomically adds ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
|
|
4206
|
+
|
|
2622
4207
|
This function is automatically invoked when using the syntax ``arr[i,j] += value``.
|
|
2623
4208
|
"""
|
|
2624
4209
|
...
|
|
@@ -2626,6 +4211,7 @@ def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
|
2626
4211
|
@over
|
|
2627
4212
|
def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
2628
4213
|
"""Atomically adds ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
|
|
4214
|
+
|
|
2629
4215
|
This function is automatically invoked when using the syntax ``arr[i,j,k] += value``.
|
|
2630
4216
|
"""
|
|
2631
4217
|
...
|
|
@@ -2633,6 +4219,7 @@ def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any)
|
|
|
2633
4219
|
@over
|
|
2634
4220
|
def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
2635
4221
|
"""Atomically adds ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
|
|
4222
|
+
|
|
2636
4223
|
This function is automatically invoked when using the syntax ``arr[i,j,k,l] += value``.
|
|
2637
4224
|
"""
|
|
2638
4225
|
...
|
|
@@ -2640,6 +4227,7 @@ def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, val
|
|
|
2640
4227
|
@over
|
|
2641
4228
|
def atomic_sub(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
2642
4229
|
"""Atomically subtracts ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
|
|
4230
|
+
|
|
2643
4231
|
This function is automatically invoked when using the syntax ``arr[i] -= value``.
|
|
2644
4232
|
"""
|
|
2645
4233
|
...
|
|
@@ -2647,6 +4235,7 @@ def atomic_sub(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
|
2647
4235
|
@over
|
|
2648
4236
|
def atomic_sub(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
2649
4237
|
"""Atomically subtracts ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
|
|
4238
|
+
|
|
2650
4239
|
This function is automatically invoked when using the syntax ``arr[i,j] -= value``.
|
|
2651
4240
|
"""
|
|
2652
4241
|
...
|
|
@@ -2654,6 +4243,7 @@ def atomic_sub(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
|
2654
4243
|
@over
|
|
2655
4244
|
def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
2656
4245
|
"""Atomically subtracts ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
|
|
4246
|
+
|
|
2657
4247
|
This function is automatically invoked when using the syntax ``arr[i,j,k] -= value``.
|
|
2658
4248
|
"""
|
|
2659
4249
|
...
|
|
@@ -2661,6 +4251,7 @@ def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
|
2661
4251
|
@over
|
|
2662
4252
|
def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
2663
4253
|
"""Atomically subtracts ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
|
|
4254
|
+
|
|
2664
4255
|
This function is automatically invoked when using the syntax ``arr[i,j,k,l] -= value``.
|
|
2665
4256
|
"""
|
|
2666
4257
|
...
|
|
@@ -2668,6 +4259,7 @@ def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> A
|
|
|
2668
4259
|
@over
|
|
2669
4260
|
def atomic_sub(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
2670
4261
|
"""Atomically subtracts ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
|
|
4262
|
+
|
|
2671
4263
|
This function is automatically invoked when using the syntax ``arr[i] -= value``.
|
|
2672
4264
|
"""
|
|
2673
4265
|
...
|
|
@@ -2675,6 +4267,7 @@ def atomic_sub(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
|
2675
4267
|
@over
|
|
2676
4268
|
def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
2677
4269
|
"""Atomically subtracts ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
|
|
4270
|
+
|
|
2678
4271
|
This function is automatically invoked when using the syntax ``arr[i,j] -= value``.
|
|
2679
4272
|
"""
|
|
2680
4273
|
...
|
|
@@ -2682,6 +4275,7 @@ def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
|
2682
4275
|
@over
|
|
2683
4276
|
def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
2684
4277
|
"""Atomically subtracts ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
|
|
4278
|
+
|
|
2685
4279
|
This function is automatically invoked when using the syntax ``arr[i,j,k] -= value``.
|
|
2686
4280
|
"""
|
|
2687
4281
|
...
|
|
@@ -2689,6 +4283,7 @@ def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any
|
|
|
2689
4283
|
@over
|
|
2690
4284
|
def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
2691
4285
|
"""Atomically subtracts ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
|
|
4286
|
+
|
|
2692
4287
|
This function is automatically invoked when using the syntax ``arr[i,j,k,l] -= value``.
|
|
2693
4288
|
"""
|
|
2694
4289
|
...
|
|
@@ -2696,6 +4291,7 @@ def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any
|
|
|
2696
4291
|
@over
|
|
2697
4292
|
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
2698
4293
|
"""Atomically subtracts ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
|
|
4294
|
+
|
|
2699
4295
|
This function is automatically invoked when using the syntax ``arr[i] -= value``.
|
|
2700
4296
|
"""
|
|
2701
4297
|
...
|
|
@@ -2703,6 +4299,7 @@ def atomic_sub(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
|
2703
4299
|
@over
|
|
2704
4300
|
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
2705
4301
|
"""Atomically subtracts ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
|
|
4302
|
+
|
|
2706
4303
|
This function is automatically invoked when using the syntax ``arr[i,j] -= value``.
|
|
2707
4304
|
"""
|
|
2708
4305
|
...
|
|
@@ -2710,6 +4307,7 @@ def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
|
2710
4307
|
@over
|
|
2711
4308
|
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
2712
4309
|
"""Atomically subtracts ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
|
|
4310
|
+
|
|
2713
4311
|
This function is automatically invoked when using the syntax ``arr[i,j,k] -= value``.
|
|
2714
4312
|
"""
|
|
2715
4313
|
...
|
|
@@ -2717,6 +4315,7 @@ def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any)
|
|
|
2717
4315
|
@over
|
|
2718
4316
|
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
2719
4317
|
"""Atomically subtracts ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
|
|
4318
|
+
|
|
2720
4319
|
This function is automatically invoked when using the syntax ``arr[i,j,k,l] -= value``.
|
|
2721
4320
|
"""
|
|
2722
4321
|
...
|
|
@@ -3105,6 +4704,294 @@ def atomic_exch(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, va
|
|
|
3105
4704
|
"""
|
|
3106
4705
|
...
|
|
3107
4706
|
|
|
4707
|
+
@over
|
|
4708
|
+
def atomic_and(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
4709
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4710
|
+
|
|
4711
|
+
This function is automatically invoked when using the syntax ``arr[i] &= value``.
|
|
4712
|
+
"""
|
|
4713
|
+
...
|
|
4714
|
+
|
|
4715
|
+
@over
|
|
4716
|
+
def atomic_and(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4717
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4718
|
+
|
|
4719
|
+
This function is automatically invoked when using the syntax ``arr[i,j] &= value``.
|
|
4720
|
+
"""
|
|
4721
|
+
...
|
|
4722
|
+
|
|
4723
|
+
@over
|
|
4724
|
+
def atomic_and(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4725
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4726
|
+
|
|
4727
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] &= value``.
|
|
4728
|
+
"""
|
|
4729
|
+
...
|
|
4730
|
+
|
|
4731
|
+
@over
|
|
4732
|
+
def atomic_and(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4733
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4734
|
+
|
|
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: FabricArray[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
|
+
|
|
4743
|
+
This function is automatically invoked when using the syntax ``arr[i] &= value``.
|
|
4744
|
+
"""
|
|
4745
|
+
...
|
|
4746
|
+
|
|
4747
|
+
@over
|
|
4748
|
+
def atomic_and(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4749
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4750
|
+
|
|
4751
|
+
This function is automatically invoked when using the syntax ``arr[i,j] &= value``.
|
|
4752
|
+
"""
|
|
4753
|
+
...
|
|
4754
|
+
|
|
4755
|
+
@over
|
|
4756
|
+
def atomic_and(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4757
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4758
|
+
|
|
4759
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] &= value``.
|
|
4760
|
+
"""
|
|
4761
|
+
...
|
|
4762
|
+
|
|
4763
|
+
@over
|
|
4764
|
+
def atomic_and(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4765
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4766
|
+
|
|
4767
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] &= value``.
|
|
4768
|
+
"""
|
|
4769
|
+
...
|
|
4770
|
+
|
|
4771
|
+
@over
|
|
4772
|
+
def atomic_and(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
4773
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4774
|
+
|
|
4775
|
+
This function is automatically invoked when using the syntax ``arr[i] &= value``.
|
|
4776
|
+
"""
|
|
4777
|
+
...
|
|
4778
|
+
|
|
4779
|
+
@over
|
|
4780
|
+
def atomic_and(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4781
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4782
|
+
|
|
4783
|
+
This function is automatically invoked when using the syntax ``arr[i,j] &= value``.
|
|
4784
|
+
"""
|
|
4785
|
+
...
|
|
4786
|
+
|
|
4787
|
+
@over
|
|
4788
|
+
def atomic_and(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4789
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4790
|
+
|
|
4791
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] &= value``.
|
|
4792
|
+
"""
|
|
4793
|
+
...
|
|
4794
|
+
|
|
4795
|
+
@over
|
|
4796
|
+
def atomic_and(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4797
|
+
"""Atomically performs a bitwise AND between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4798
|
+
|
|
4799
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] &= value``.
|
|
4800
|
+
"""
|
|
4801
|
+
...
|
|
4802
|
+
|
|
4803
|
+
@over
|
|
4804
|
+
def atomic_or(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
4805
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4806
|
+
|
|
4807
|
+
This function is automatically invoked when using the syntax ``arr[i] |= value``.
|
|
4808
|
+
"""
|
|
4809
|
+
...
|
|
4810
|
+
|
|
4811
|
+
@over
|
|
4812
|
+
def atomic_or(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4813
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4814
|
+
|
|
4815
|
+
This function is automatically invoked when using the syntax ``arr[i,j] |= value``.
|
|
4816
|
+
"""
|
|
4817
|
+
...
|
|
4818
|
+
|
|
4819
|
+
@over
|
|
4820
|
+
def atomic_or(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4821
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4822
|
+
|
|
4823
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] |= value``.
|
|
4824
|
+
"""
|
|
4825
|
+
...
|
|
4826
|
+
|
|
4827
|
+
@over
|
|
4828
|
+
def atomic_or(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4829
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4830
|
+
|
|
4831
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] |= value``.
|
|
4832
|
+
"""
|
|
4833
|
+
...
|
|
4834
|
+
|
|
4835
|
+
@over
|
|
4836
|
+
def atomic_or(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
4837
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4838
|
+
|
|
4839
|
+
This function is automatically invoked when using the syntax ``arr[i] |= value``.
|
|
4840
|
+
"""
|
|
4841
|
+
...
|
|
4842
|
+
|
|
4843
|
+
@over
|
|
4844
|
+
def atomic_or(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4845
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4846
|
+
|
|
4847
|
+
This function is automatically invoked when using the syntax ``arr[i,j] |= value``.
|
|
4848
|
+
"""
|
|
4849
|
+
...
|
|
4850
|
+
|
|
4851
|
+
@over
|
|
4852
|
+
def atomic_or(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4853
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4854
|
+
|
|
4855
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] |= value``.
|
|
4856
|
+
"""
|
|
4857
|
+
...
|
|
4858
|
+
|
|
4859
|
+
@over
|
|
4860
|
+
def atomic_or(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4861
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4862
|
+
|
|
4863
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] |= value``.
|
|
4864
|
+
"""
|
|
4865
|
+
...
|
|
4866
|
+
|
|
4867
|
+
@over
|
|
4868
|
+
def atomic_or(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
4869
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4870
|
+
|
|
4871
|
+
This function is automatically invoked when using the syntax ``arr[i] |= value``.
|
|
4872
|
+
"""
|
|
4873
|
+
...
|
|
4874
|
+
|
|
4875
|
+
@over
|
|
4876
|
+
def atomic_or(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4877
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4878
|
+
|
|
4879
|
+
This function is automatically invoked when using the syntax ``arr[i,j] |= value``.
|
|
4880
|
+
"""
|
|
4881
|
+
...
|
|
4882
|
+
|
|
4883
|
+
@over
|
|
4884
|
+
def atomic_or(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4885
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4886
|
+
|
|
4887
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] |= value``.
|
|
4888
|
+
"""
|
|
4889
|
+
...
|
|
4890
|
+
|
|
4891
|
+
@over
|
|
4892
|
+
def atomic_or(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4893
|
+
"""Atomically performs a bitwise OR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4894
|
+
|
|
4895
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] |= value``.
|
|
4896
|
+
"""
|
|
4897
|
+
...
|
|
4898
|
+
|
|
4899
|
+
@over
|
|
4900
|
+
def atomic_xor(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
4901
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4902
|
+
|
|
4903
|
+
This function is automatically invoked when using the syntax ``arr[i] ^= value``.
|
|
4904
|
+
"""
|
|
4905
|
+
...
|
|
4906
|
+
|
|
4907
|
+
@over
|
|
4908
|
+
def atomic_xor(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4909
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4910
|
+
|
|
4911
|
+
This function is automatically invoked when using the syntax ``arr[i,j] ^= value``.
|
|
4912
|
+
"""
|
|
4913
|
+
...
|
|
4914
|
+
|
|
4915
|
+
@over
|
|
4916
|
+
def atomic_xor(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4917
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4918
|
+
|
|
4919
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] ^= value``.
|
|
4920
|
+
"""
|
|
4921
|
+
...
|
|
4922
|
+
|
|
4923
|
+
@over
|
|
4924
|
+
def atomic_xor(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4925
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4926
|
+
|
|
4927
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] ^= value``.
|
|
4928
|
+
"""
|
|
4929
|
+
...
|
|
4930
|
+
|
|
4931
|
+
@over
|
|
4932
|
+
def atomic_xor(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
4933
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4934
|
+
|
|
4935
|
+
This function is automatically invoked when using the syntax ``arr[i] ^= value``.
|
|
4936
|
+
"""
|
|
4937
|
+
...
|
|
4938
|
+
|
|
4939
|
+
@over
|
|
4940
|
+
def atomic_xor(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4941
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4942
|
+
|
|
4943
|
+
This function is automatically invoked when using the syntax ``arr[i,j] ^= value``.
|
|
4944
|
+
"""
|
|
4945
|
+
...
|
|
4946
|
+
|
|
4947
|
+
@over
|
|
4948
|
+
def atomic_xor(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4949
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4950
|
+
|
|
4951
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] ^= value``.
|
|
4952
|
+
"""
|
|
4953
|
+
...
|
|
4954
|
+
|
|
4955
|
+
@over
|
|
4956
|
+
def atomic_xor(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4957
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4958
|
+
|
|
4959
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] ^= value``.
|
|
4960
|
+
"""
|
|
4961
|
+
...
|
|
4962
|
+
|
|
4963
|
+
@over
|
|
4964
|
+
def atomic_xor(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
4965
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
4966
|
+
|
|
4967
|
+
This function is automatically invoked when using the syntax ``arr[i] ^= value``.
|
|
4968
|
+
"""
|
|
4969
|
+
...
|
|
4970
|
+
|
|
4971
|
+
@over
|
|
4972
|
+
def atomic_xor(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
4973
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
4974
|
+
|
|
4975
|
+
This function is automatically invoked when using the syntax ``arr[i,j] ^= value``.
|
|
4976
|
+
"""
|
|
4977
|
+
...
|
|
4978
|
+
|
|
4979
|
+
@over
|
|
4980
|
+
def atomic_xor(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
4981
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
4982
|
+
|
|
4983
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k] ^= value``.
|
|
4984
|
+
"""
|
|
4985
|
+
...
|
|
4986
|
+
|
|
4987
|
+
@over
|
|
4988
|
+
def atomic_xor(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
4989
|
+
"""Atomically performs a bitwise XOR between ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
4990
|
+
|
|
4991
|
+
This function is automatically invoked when using the syntax ``arr[i,j,k,l] ^= value``.
|
|
4992
|
+
"""
|
|
4993
|
+
...
|
|
4994
|
+
|
|
3108
4995
|
@over
|
|
3109
4996
|
def lerp(a: Float, b: Float, t: Float) -> Float:
|
|
3110
4997
|
"""Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
|
|
@@ -3232,31 +5119,106 @@ def bit_and(a: Int, b: Int) -> Int:
|
|
|
3232
5119
|
""" """
|
|
3233
5120
|
...
|
|
3234
5121
|
|
|
5122
|
+
@over
|
|
5123
|
+
def bit_and(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
|
|
5124
|
+
""" """
|
|
5125
|
+
...
|
|
5126
|
+
|
|
5127
|
+
@over
|
|
5128
|
+
def bit_and(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
|
|
5129
|
+
""" """
|
|
5130
|
+
...
|
|
5131
|
+
|
|
5132
|
+
@over
|
|
5133
|
+
def bit_and(a: Tile[Any, Tuple[int, ...]], b: Tile[Any, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
|
|
5134
|
+
"""Bitwise AND each element of two tiles together"""
|
|
5135
|
+
...
|
|
5136
|
+
|
|
3235
5137
|
@over
|
|
3236
5138
|
def bit_or(a: Int, b: Int) -> Int:
|
|
3237
5139
|
""" """
|
|
3238
5140
|
...
|
|
3239
5141
|
|
|
5142
|
+
@over
|
|
5143
|
+
def bit_or(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
|
|
5144
|
+
""" """
|
|
5145
|
+
...
|
|
5146
|
+
|
|
5147
|
+
@over
|
|
5148
|
+
def bit_or(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
|
|
5149
|
+
""" """
|
|
5150
|
+
...
|
|
5151
|
+
|
|
5152
|
+
@over
|
|
5153
|
+
def bit_or(a: Tile[Any, Tuple[int, ...]], b: Tile[Any, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
|
|
5154
|
+
"""Bitwise OR each element of two tiles together"""
|
|
5155
|
+
...
|
|
5156
|
+
|
|
3240
5157
|
@over
|
|
3241
5158
|
def bit_xor(a: Int, b: Int) -> Int:
|
|
3242
5159
|
""" """
|
|
3243
5160
|
...
|
|
3244
5161
|
|
|
5162
|
+
@over
|
|
5163
|
+
def bit_xor(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
|
|
5164
|
+
""" """
|
|
5165
|
+
...
|
|
5166
|
+
|
|
5167
|
+
@over
|
|
5168
|
+
def bit_xor(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
|
|
5169
|
+
""" """
|
|
5170
|
+
...
|
|
5171
|
+
|
|
5172
|
+
@over
|
|
5173
|
+
def bit_xor(a: Tile[Any, Tuple[int, ...]], b: Tile[Any, Tuple[int, ...]]) -> Tile[Scalar, Tuple[int, ...]]:
|
|
5174
|
+
"""Bitwise XOR each element of two tiles together"""
|
|
5175
|
+
...
|
|
5176
|
+
|
|
3245
5177
|
@over
|
|
3246
5178
|
def lshift(a: Int, b: Int) -> Int:
|
|
3247
5179
|
""" """
|
|
3248
5180
|
...
|
|
3249
5181
|
|
|
5182
|
+
@over
|
|
5183
|
+
def lshift(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
|
|
5184
|
+
""" """
|
|
5185
|
+
...
|
|
5186
|
+
|
|
5187
|
+
@over
|
|
5188
|
+
def lshift(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
|
|
5189
|
+
""" """
|
|
5190
|
+
...
|
|
5191
|
+
|
|
3250
5192
|
@over
|
|
3251
5193
|
def rshift(a: Int, b: Int) -> Int:
|
|
3252
5194
|
""" """
|
|
3253
5195
|
...
|
|
3254
5196
|
|
|
5197
|
+
@over
|
|
5198
|
+
def rshift(a: Vector[Any, Int], b: Vector[Any, Int]) -> Vector[Any, Int]:
|
|
5199
|
+
""" """
|
|
5200
|
+
...
|
|
5201
|
+
|
|
5202
|
+
@over
|
|
5203
|
+
def rshift(a: Matrix[Any, Any, Int], b: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
|
|
5204
|
+
""" """
|
|
5205
|
+
...
|
|
5206
|
+
|
|
3255
5207
|
@over
|
|
3256
5208
|
def invert(a: Int) -> Int:
|
|
3257
5209
|
""" """
|
|
3258
5210
|
...
|
|
3259
5211
|
|
|
5212
|
+
@over
|
|
5213
|
+
def invert(a: Vector[Any, Int]) -> Vector[Any, Int]:
|
|
5214
|
+
""" """
|
|
5215
|
+
...
|
|
5216
|
+
|
|
5217
|
+
@over
|
|
5218
|
+
def invert(a: Matrix[Any, Any, Int]) -> Matrix[Any, Any, Int]:
|
|
5219
|
+
""" """
|
|
5220
|
+
...
|
|
5221
|
+
|
|
3260
5222
|
@over
|
|
3261
5223
|
def mul(a: Scalar, b: Scalar) -> Scalar:
|
|
3262
5224
|
""" """
|
|
@@ -3672,6 +5634,39 @@ def len(a: Tuple) -> int:
|
|
|
3672
5634
|
"""Return the number of elements in a tuple."""
|
|
3673
5635
|
...
|
|
3674
5636
|
|
|
5637
|
+
@over
|
|
5638
|
+
def cast(a: Any, dtype: Any) -> Any:
|
|
5639
|
+
"""Reinterpret a value as a different type while preserving its bit pattern.
|
|
5640
|
+
|
|
5641
|
+
:param a: The value to cast
|
|
5642
|
+
:param dtype: The target type
|
|
5643
|
+
|
|
5644
|
+
Example:
|
|
5645
|
+
|
|
5646
|
+
.. code-block:: python
|
|
5647
|
+
|
|
5648
|
+
@wp.struct
|
|
5649
|
+
class MyStruct:
|
|
5650
|
+
f: wp.float16
|
|
5651
|
+
i: wp.int16
|
|
5652
|
+
|
|
5653
|
+
@wp.kernel
|
|
5654
|
+
def compute():
|
|
5655
|
+
x = wp.int32(0x40000000)
|
|
5656
|
+
x_casted = wp.cast(x, wp.float32)
|
|
5657
|
+
wp.expect_eq(x_casted, 2.0) # 0x40000000
|
|
5658
|
+
|
|
5659
|
+
s = MyStruct()
|
|
5660
|
+
s.f = wp.float16(2.0) # 0x4000
|
|
5661
|
+
s.i = wp.int16(4096) # 0x1000
|
|
5662
|
+
s_casted = wp.cast(s, wp.int32)
|
|
5663
|
+
wp.expect_eq(s_casted, 0x10004000)
|
|
5664
|
+
|
|
5665
|
+
wp.launch(compute, dim=1)
|
|
5666
|
+
|
|
5667
|
+
"""
|
|
5668
|
+
...
|
|
5669
|
+
|
|
3675
5670
|
@over
|
|
3676
5671
|
def norm_l1(v: Any):
|
|
3677
5672
|
"""Computes the L1 norm of a vector v.
|