warp-lang 1.0.1__py3-none-manylinux2014_aarch64.whl → 1.1.0__py3-none-manylinux2014_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 +108 -97
- warp/__init__.pyi +1 -1
- warp/bin/warp-clang.so +0 -0
- warp/bin/warp.so +0 -0
- warp/build.py +115 -113
- warp/build_dll.py +383 -375
- warp/builtins.py +3425 -3354
- warp/codegen.py +2878 -2792
- warp/config.py +40 -36
- warp/constants.py +45 -45
- warp/context.py +5194 -5102
- warp/dlpack.py +442 -442
- warp/examples/__init__.py +16 -16
- warp/examples/assets/bear.usd +0 -0
- warp/examples/assets/bunny.usd +0 -0
- warp/examples/assets/cartpole.urdf +110 -110
- warp/examples/assets/crazyflie.usd +0 -0
- warp/examples/assets/cube.usd +0 -0
- warp/examples/assets/nv_ant.xml +92 -92
- warp/examples/assets/nv_humanoid.xml +183 -183
- warp/examples/assets/quadruped.urdf +267 -267
- warp/examples/assets/rocks.nvdb +0 -0
- warp/examples/assets/rocks.usd +0 -0
- warp/examples/assets/sphere.usd +0 -0
- warp/examples/benchmarks/benchmark_api.py +383 -383
- warp/examples/benchmarks/benchmark_cloth.py +278 -279
- warp/examples/benchmarks/benchmark_cloth_cupy.py +88 -88
- warp/examples/benchmarks/benchmark_cloth_jax.py +97 -100
- warp/examples/benchmarks/benchmark_cloth_numba.py +146 -142
- warp/examples/benchmarks/benchmark_cloth_numpy.py +77 -77
- warp/examples/benchmarks/benchmark_cloth_pytorch.py +86 -86
- warp/examples/benchmarks/benchmark_cloth_taichi.py +112 -112
- warp/examples/benchmarks/benchmark_cloth_warp.py +146 -146
- warp/examples/benchmarks/benchmark_launches.py +295 -295
- warp/examples/browse.py +29 -28
- warp/examples/core/example_dem.py +234 -221
- warp/examples/core/example_fluid.py +293 -267
- warp/examples/core/example_graph_capture.py +144 -129
- warp/examples/core/example_marching_cubes.py +188 -176
- warp/examples/core/example_mesh.py +174 -154
- warp/examples/core/example_mesh_intersect.py +205 -193
- warp/examples/core/example_nvdb.py +176 -169
- warp/examples/core/example_raycast.py +105 -89
- warp/examples/core/example_raymarch.py +199 -178
- warp/examples/core/example_render_opengl.py +185 -141
- warp/examples/core/example_sph.py +405 -389
- warp/examples/core/example_torch.py +222 -181
- warp/examples/core/example_wave.py +263 -249
- warp/examples/fem/bsr_utils.py +378 -380
- warp/examples/fem/example_apic_fluid.py +407 -391
- warp/examples/fem/example_convection_diffusion.py +182 -168
- warp/examples/fem/example_convection_diffusion_dg.py +219 -209
- warp/examples/fem/example_convection_diffusion_dg0.py +204 -194
- warp/examples/fem/example_deformed_geometry.py +177 -159
- warp/examples/fem/example_diffusion.py +201 -173
- warp/examples/fem/example_diffusion_3d.py +177 -152
- warp/examples/fem/example_diffusion_mgpu.py +221 -214
- warp/examples/fem/example_mixed_elasticity.py +244 -222
- warp/examples/fem/example_navier_stokes.py +259 -243
- warp/examples/fem/example_stokes.py +220 -192
- warp/examples/fem/example_stokes_transfer.py +265 -249
- warp/examples/fem/mesh_utils.py +133 -109
- warp/examples/fem/plot_utils.py +292 -287
- warp/examples/optim/example_bounce.py +260 -248
- warp/examples/optim/example_cloth_throw.py +222 -210
- warp/examples/optim/example_diffray.py +566 -535
- warp/examples/optim/example_drone.py +864 -835
- warp/examples/optim/example_inverse_kinematics.py +176 -169
- warp/examples/optim/example_inverse_kinematics_torch.py +185 -170
- warp/examples/optim/example_spring_cage.py +239 -234
- warp/examples/optim/example_trajectory.py +223 -201
- warp/examples/optim/example_walker.py +306 -292
- warp/examples/sim/example_cartpole.py +139 -128
- warp/examples/sim/example_cloth.py +196 -184
- warp/examples/sim/example_granular.py +124 -113
- warp/examples/sim/example_granular_collision_sdf.py +197 -185
- warp/examples/sim/example_jacobian_ik.py +236 -213
- warp/examples/sim/example_particle_chain.py +118 -106
- warp/examples/sim/example_quadruped.py +193 -179
- warp/examples/sim/example_rigid_chain.py +197 -189
- warp/examples/sim/example_rigid_contact.py +189 -176
- warp/examples/sim/example_rigid_force.py +127 -126
- warp/examples/sim/example_rigid_gyroscopic.py +109 -97
- warp/examples/sim/example_rigid_soft_contact.py +134 -124
- warp/examples/sim/example_soft_body.py +190 -178
- warp/fabric.py +337 -335
- warp/fem/__init__.py +60 -27
- warp/fem/cache.py +401 -388
- warp/fem/dirichlet.py +178 -179
- warp/fem/domain.py +262 -263
- warp/fem/field/__init__.py +100 -101
- warp/fem/field/field.py +148 -149
- warp/fem/field/nodal_field.py +298 -299
- warp/fem/field/restriction.py +22 -21
- warp/fem/field/test.py +180 -181
- warp/fem/field/trial.py +183 -183
- warp/fem/geometry/__init__.py +15 -19
- warp/fem/geometry/closest_point.py +69 -70
- warp/fem/geometry/deformed_geometry.py +270 -271
- warp/fem/geometry/element.py +744 -744
- warp/fem/geometry/geometry.py +184 -186
- warp/fem/geometry/grid_2d.py +380 -373
- warp/fem/geometry/grid_3d.py +441 -435
- warp/fem/geometry/hexmesh.py +953 -953
- warp/fem/geometry/partition.py +374 -376
- warp/fem/geometry/quadmesh_2d.py +532 -532
- warp/fem/geometry/tetmesh.py +840 -840
- warp/fem/geometry/trimesh_2d.py +577 -577
- warp/fem/integrate.py +1630 -1615
- warp/fem/operator.py +190 -191
- warp/fem/polynomial.py +214 -213
- warp/fem/quadrature/__init__.py +2 -2
- warp/fem/quadrature/pic_quadrature.py +243 -245
- warp/fem/quadrature/quadrature.py +295 -294
- warp/fem/space/__init__.py +294 -292
- warp/fem/space/basis_space.py +488 -489
- warp/fem/space/collocated_function_space.py +100 -105
- warp/fem/space/dof_mapper.py +236 -236
- warp/fem/space/function_space.py +148 -145
- warp/fem/space/grid_2d_function_space.py +267 -267
- warp/fem/space/grid_3d_function_space.py +305 -306
- warp/fem/space/hexmesh_function_space.py +350 -352
- warp/fem/space/partition.py +350 -350
- warp/fem/space/quadmesh_2d_function_space.py +368 -369
- warp/fem/space/restriction.py +158 -160
- warp/fem/space/shape/__init__.py +13 -15
- warp/fem/space/shape/cube_shape_function.py +738 -738
- warp/fem/space/shape/shape_function.py +102 -103
- warp/fem/space/shape/square_shape_function.py +611 -611
- warp/fem/space/shape/tet_shape_function.py +565 -567
- warp/fem/space/shape/triangle_shape_function.py +429 -429
- warp/fem/space/tetmesh_function_space.py +294 -292
- warp/fem/space/topology.py +297 -295
- warp/fem/space/trimesh_2d_function_space.py +223 -221
- warp/fem/types.py +77 -77
- warp/fem/utils.py +495 -495
- warp/jax.py +166 -141
- warp/jax_experimental.py +341 -339
- warp/native/array.h +1072 -1025
- warp/native/builtin.h +1560 -1560
- warp/native/bvh.cpp +398 -398
- warp/native/bvh.cu +525 -525
- warp/native/bvh.h +429 -429
- warp/native/clang/clang.cpp +495 -464
- warp/native/crt.cpp +31 -31
- warp/native/crt.h +334 -334
- warp/native/cuda_crt.h +1049 -1049
- warp/native/cuda_util.cpp +549 -540
- warp/native/cuda_util.h +288 -203
- warp/native/cutlass_gemm.cpp +34 -34
- warp/native/cutlass_gemm.cu +372 -372
- warp/native/error.cpp +66 -66
- warp/native/error.h +27 -27
- warp/native/fabric.h +228 -228
- warp/native/hashgrid.cpp +301 -278
- warp/native/hashgrid.cu +78 -77
- warp/native/hashgrid.h +227 -227
- warp/native/initializer_array.h +32 -32
- warp/native/intersect.h +1204 -1204
- warp/native/intersect_adj.h +365 -365
- warp/native/intersect_tri.h +322 -322
- warp/native/marching.cpp +2 -2
- warp/native/marching.cu +497 -497
- warp/native/marching.h +2 -2
- warp/native/mat.h +1498 -1498
- warp/native/matnn.h +333 -333
- warp/native/mesh.cpp +203 -203
- warp/native/mesh.cu +293 -293
- warp/native/mesh.h +1887 -1887
- warp/native/nanovdb/NanoVDB.h +4782 -4782
- warp/native/nanovdb/PNanoVDB.h +2553 -2553
- warp/native/nanovdb/PNanoVDBWrite.h +294 -294
- warp/native/noise.h +850 -850
- warp/native/quat.h +1084 -1084
- warp/native/rand.h +299 -299
- warp/native/range.h +108 -108
- warp/native/reduce.cpp +156 -156
- warp/native/reduce.cu +348 -348
- warp/native/runlength_encode.cpp +61 -61
- warp/native/runlength_encode.cu +46 -46
- warp/native/scan.cpp +30 -30
- warp/native/scan.cu +36 -36
- warp/native/scan.h +7 -7
- warp/native/solid_angle.h +442 -442
- warp/native/sort.cpp +94 -94
- warp/native/sort.cu +97 -97
- warp/native/sort.h +14 -14
- warp/native/sparse.cpp +337 -337
- warp/native/sparse.cu +544 -544
- warp/native/spatial.h +630 -630
- warp/native/svd.h +562 -562
- warp/native/temp_buffer.h +30 -30
- warp/native/vec.h +1132 -1132
- warp/native/volume.cpp +297 -297
- warp/native/volume.cu +32 -32
- warp/native/volume.h +538 -538
- warp/native/volume_builder.cu +425 -425
- warp/native/volume_builder.h +19 -19
- warp/native/warp.cpp +1057 -1052
- warp/native/warp.cu +2943 -2828
- warp/native/warp.h +313 -305
- warp/optim/__init__.py +9 -9
- warp/optim/adam.py +120 -120
- warp/optim/linear.py +1104 -939
- warp/optim/sgd.py +104 -92
- warp/render/__init__.py +10 -10
- warp/render/render_opengl.py +3217 -3204
- warp/render/render_usd.py +768 -749
- warp/render/utils.py +152 -150
- warp/sim/__init__.py +52 -59
- warp/sim/articulation.py +685 -685
- warp/sim/collide.py +1594 -1590
- warp/sim/import_mjcf.py +489 -481
- warp/sim/import_snu.py +220 -221
- warp/sim/import_urdf.py +536 -516
- warp/sim/import_usd.py +887 -881
- warp/sim/inertia.py +316 -317
- warp/sim/integrator.py +234 -233
- warp/sim/integrator_euler.py +1956 -1956
- warp/sim/integrator_featherstone.py +1910 -1991
- warp/sim/integrator_xpbd.py +3294 -3312
- warp/sim/model.py +4473 -4314
- warp/sim/particles.py +113 -112
- warp/sim/render.py +417 -403
- warp/sim/utils.py +413 -410
- warp/sparse.py +1227 -1227
- warp/stubs.py +2109 -2469
- warp/tape.py +1162 -225
- warp/tests/__init__.py +1 -1
- warp/tests/__main__.py +4 -4
- warp/tests/assets/torus.usda +105 -105
- warp/tests/aux_test_class_kernel.py +26 -26
- warp/tests/aux_test_compile_consts_dummy.py +10 -10
- warp/tests/aux_test_conditional_unequal_types_kernels.py +21 -21
- warp/tests/aux_test_dependent.py +22 -22
- warp/tests/aux_test_grad_customs.py +23 -23
- warp/tests/aux_test_reference.py +11 -11
- warp/tests/aux_test_reference_reference.py +10 -10
- warp/tests/aux_test_square.py +17 -17
- warp/tests/aux_test_unresolved_func.py +14 -14
- warp/tests/aux_test_unresolved_symbol.py +14 -14
- warp/tests/disabled_kinematics.py +239 -239
- warp/tests/run_coverage_serial.py +31 -31
- warp/tests/test_adam.py +157 -157
- warp/tests/test_arithmetic.py +1124 -1124
- warp/tests/test_array.py +2417 -2326
- warp/tests/test_array_reduce.py +150 -150
- warp/tests/test_async.py +668 -656
- warp/tests/test_atomic.py +141 -141
- warp/tests/test_bool.py +204 -149
- warp/tests/test_builtins_resolution.py +1292 -1292
- warp/tests/test_bvh.py +164 -171
- warp/tests/test_closest_point_edge_edge.py +228 -228
- warp/tests/test_codegen.py +566 -553
- warp/tests/test_compile_consts.py +97 -101
- warp/tests/test_conditional.py +246 -246
- warp/tests/test_copy.py +232 -215
- warp/tests/test_ctypes.py +632 -632
- warp/tests/test_dense.py +67 -67
- warp/tests/test_devices.py +91 -98
- warp/tests/test_dlpack.py +530 -529
- warp/tests/test_examples.py +400 -378
- warp/tests/test_fabricarray.py +955 -955
- warp/tests/test_fast_math.py +62 -54
- warp/tests/test_fem.py +1277 -1278
- warp/tests/test_fp16.py +130 -130
- warp/tests/test_func.py +338 -337
- warp/tests/test_generics.py +571 -571
- warp/tests/test_grad.py +746 -640
- warp/tests/test_grad_customs.py +333 -336
- warp/tests/test_hash_grid.py +210 -164
- warp/tests/test_import.py +39 -39
- warp/tests/test_indexedarray.py +1134 -1134
- warp/tests/test_intersect.py +67 -67
- warp/tests/test_jax.py +307 -307
- warp/tests/test_large.py +167 -164
- warp/tests/test_launch.py +354 -354
- warp/tests/test_lerp.py +261 -261
- warp/tests/test_linear_solvers.py +191 -171
- warp/tests/test_lvalue.py +421 -493
- warp/tests/test_marching_cubes.py +65 -65
- warp/tests/test_mat.py +1801 -1827
- warp/tests/test_mat_lite.py +115 -115
- warp/tests/test_mat_scalar_ops.py +2907 -2889
- warp/tests/test_math.py +126 -193
- warp/tests/test_matmul.py +500 -499
- warp/tests/test_matmul_lite.py +410 -410
- warp/tests/test_mempool.py +188 -190
- warp/tests/test_mesh.py +284 -324
- warp/tests/test_mesh_query_aabb.py +228 -241
- warp/tests/test_mesh_query_point.py +692 -702
- warp/tests/test_mesh_query_ray.py +292 -303
- warp/tests/test_mlp.py +276 -276
- warp/tests/test_model.py +110 -110
- warp/tests/test_modules_lite.py +39 -39
- warp/tests/test_multigpu.py +163 -163
- warp/tests/test_noise.py +248 -248
- warp/tests/test_operators.py +250 -250
- warp/tests/test_options.py +123 -125
- warp/tests/test_peer.py +133 -137
- warp/tests/test_pinned.py +78 -78
- warp/tests/test_print.py +54 -54
- warp/tests/test_quat.py +2086 -2086
- warp/tests/test_rand.py +288 -288
- warp/tests/test_reload.py +217 -217
- warp/tests/test_rounding.py +179 -179
- warp/tests/test_runlength_encode.py +190 -190
- warp/tests/test_sim_grad.py +243 -0
- warp/tests/test_sim_kinematics.py +91 -97
- warp/tests/test_smoothstep.py +168 -168
- warp/tests/test_snippet.py +305 -266
- warp/tests/test_sparse.py +468 -460
- warp/tests/test_spatial.py +2148 -2148
- warp/tests/test_streams.py +486 -473
- warp/tests/test_struct.py +710 -675
- warp/tests/test_tape.py +173 -148
- warp/tests/test_torch.py +743 -743
- warp/tests/test_transient_module.py +87 -87
- warp/tests/test_types.py +556 -659
- warp/tests/test_utils.py +490 -499
- warp/tests/test_vec.py +1264 -1268
- warp/tests/test_vec_lite.py +73 -73
- warp/tests/test_vec_scalar_ops.py +2099 -2099
- warp/tests/test_verify_fp.py +94 -94
- warp/tests/test_volume.py +737 -736
- warp/tests/test_volume_write.py +255 -265
- warp/tests/unittest_serial.py +37 -37
- warp/tests/unittest_suites.py +363 -359
- warp/tests/unittest_utils.py +603 -578
- warp/tests/unused_test_misc.py +71 -71
- warp/tests/walkthrough_debug.py +85 -85
- warp/thirdparty/appdirs.py +598 -598
- warp/thirdparty/dlpack.py +143 -143
- warp/thirdparty/unittest_parallel.py +566 -561
- warp/torch.py +321 -295
- warp/types.py +4504 -4450
- warp/utils.py +1008 -821
- {warp_lang-1.0.1.dist-info → warp_lang-1.1.0.dist-info}/LICENSE.md +126 -126
- {warp_lang-1.0.1.dist-info → warp_lang-1.1.0.dist-info}/METADATA +338 -400
- warp_lang-1.1.0.dist-info/RECORD +352 -0
- warp/examples/assets/cube.usda +0 -42
- warp/examples/assets/sphere.usda +0 -56
- warp/examples/assets/torus.usda +0 -105
- warp_lang-1.0.1.dist-info/RECORD +0 -352
- {warp_lang-1.0.1.dist-info → warp_lang-1.1.0.dist-info}/WHEEL +0 -0
- {warp_lang-1.0.1.dist-info → warp_lang-1.1.0.dist-info}/top_level.txt +0 -0
warp/stubs.py
CHANGED
|
@@ -1,2469 +1,2109 @@
|
|
|
1
|
-
# Autogenerated file, do not edit, this file provides stubs for builtins autocomplete in VSCode, PyCharm, etc
|
|
2
|
-
|
|
3
|
-
from typing import Any
|
|
4
|
-
from typing import Tuple
|
|
5
|
-
from typing import Callable
|
|
6
|
-
from typing import TypeVar
|
|
7
|
-
from typing import Generic
|
|
8
|
-
from typing import overload as over
|
|
9
|
-
|
|
10
|
-
Length = TypeVar("Length", bound=int)
|
|
11
|
-
Rows = TypeVar("Rows", bound=int)
|
|
12
|
-
Cols = TypeVar("Cols", bound=int)
|
|
13
|
-
DType = TypeVar("DType")
|
|
14
|
-
Int = TypeVar("Int")
|
|
15
|
-
Float = TypeVar("Float")
|
|
16
|
-
Scalar = TypeVar("Scalar")
|
|
17
|
-
Vector = Generic[Length, Scalar]
|
|
18
|
-
Matrix = Generic[Rows, Cols, Scalar]
|
|
19
|
-
Quaternion = Generic[Float]
|
|
20
|
-
Transformation = Generic[Float]
|
|
21
|
-
Array = Generic[DType]
|
|
22
|
-
FabricArray = Generic[DType]
|
|
23
|
-
IndexedFabricArray = Generic[DType]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
from warp.types import array, array1d, array2d, array3d, array4d, constant
|
|
27
|
-
from warp.types import indexedarray, indexedarray1d, indexedarray2d, indexedarray3d, indexedarray4d
|
|
28
|
-
from warp.fabric import fabricarray, fabricarrayarray, indexedfabricarray, indexedfabricarrayarray
|
|
29
|
-
|
|
30
|
-
from warp.types import bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, float16, float32, float64
|
|
31
|
-
from warp.types import vec2, vec2b, vec2ub, vec2s, vec2us, vec2i, vec2ui, vec2l, vec2ul, vec2h, vec2f, vec2d
|
|
32
|
-
from warp.types import vec3, vec3b, vec3ub, vec3s, vec3us, vec3i, vec3ui, vec3l, vec3ul, vec3h, vec3f, vec3d
|
|
33
|
-
from warp.types import vec4, vec4b, vec4ub, vec4s, vec4us, vec4i, vec4ui, vec4l, vec4ul, vec4h, vec4f, vec4d
|
|
34
|
-
from warp.types import mat22, mat22h, mat22f, mat22d
|
|
35
|
-
from warp.types import mat33, mat33h, mat33f, mat33d
|
|
36
|
-
from warp.types import mat44, mat44h, mat44f, mat44d
|
|
37
|
-
from warp.types import quat, quath, quatf, quatd
|
|
38
|
-
from warp.types import transform, transformh, transformf, transformd
|
|
39
|
-
from warp.types import spatial_vector, spatial_vectorh, spatial_vectorf, spatial_vectord
|
|
40
|
-
from warp.types import spatial_matrix, spatial_matrixh, spatial_matrixf, spatial_matrixd
|
|
41
|
-
|
|
42
|
-
from warp.types import Bvh, Mesh, HashGrid, Volume, MarchingCubes
|
|
43
|
-
from warp.types import bvh_query_t, hash_grid_query_t, mesh_query_aabb_t, mesh_query_point_t, mesh_query_ray_t
|
|
44
|
-
|
|
45
|
-
from warp.types import matmul, adj_matmul, batched_matmul, adj_batched_matmul, from_ptr
|
|
46
|
-
|
|
47
|
-
from warp.types import vector as vec
|
|
48
|
-
from warp.types import matrix as mat
|
|
49
|
-
|
|
50
|
-
from warp.types import dtype_from_numpy, dtype_to_numpy
|
|
51
|
-
|
|
52
|
-
from warp.context import init, func, func_grad, func_replay, func_native, kernel, struct, overload
|
|
53
|
-
from warp.context import is_cpu_available, is_cuda_available, is_device_available
|
|
54
|
-
from warp.context import get_devices, get_preferred_device
|
|
55
|
-
from warp.context import get_cuda_devices, get_cuda_device_count, get_cuda_device, map_cuda_device, unmap_cuda_device
|
|
56
|
-
from warp.context import get_device, set_device, synchronize_device
|
|
57
|
-
from warp.context import (
|
|
58
|
-
zeros,
|
|
59
|
-
zeros_like,
|
|
60
|
-
ones,
|
|
61
|
-
ones_like,
|
|
62
|
-
full,
|
|
63
|
-
full_like,
|
|
64
|
-
clone,
|
|
65
|
-
empty,
|
|
66
|
-
empty_like,
|
|
67
|
-
copy,
|
|
68
|
-
from_numpy,
|
|
69
|
-
launch,
|
|
70
|
-
synchronize,
|
|
71
|
-
force_load,
|
|
72
|
-
load_module,
|
|
73
|
-
)
|
|
74
|
-
from warp.context import set_module_options, get_module_options, get_module
|
|
75
|
-
from warp.context import capture_begin, capture_end, capture_launch
|
|
76
|
-
from warp.context import Kernel, Function, Launch
|
|
77
|
-
from warp.context import Stream, get_stream, set_stream, wait_stream, synchronize_stream
|
|
78
|
-
from warp.context import Event, record_event, wait_event, synchronize_event
|
|
79
|
-
from warp.context import RegisteredGLBuffer
|
|
80
|
-
from warp.context import is_mempool_supported, is_mempool_enabled, set_mempool_enabled
|
|
81
|
-
from warp.context import set_mempool_release_threshold, get_mempool_release_threshold
|
|
82
|
-
from warp.context import is_mempool_access_supported, is_mempool_access_enabled, set_mempool_access_enabled
|
|
83
|
-
from warp.context import is_peer_access_supported, is_peer_access_enabled, set_peer_access_enabled
|
|
84
|
-
|
|
85
|
-
from warp.tape import Tape
|
|
86
|
-
from warp.utils import ScopedTimer, ScopedDevice, ScopedStream
|
|
87
|
-
from warp.utils import ScopedMempool, ScopedMempoolAccess, ScopedPeerAccess
|
|
88
|
-
from warp.utils import ScopedCapture
|
|
89
|
-
from warp.utils import transform_expand, quat_between_vectors
|
|
90
|
-
|
|
91
|
-
from warp.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
from warp.
|
|
101
|
-
|
|
102
|
-
from warp.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
Return the
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
Return the element-wise maximum of two vectors.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
Return
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
Return
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
Return
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
Return the
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
Return the
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
"""
|
|
316
|
-
...
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
@over
|
|
320
|
-
def
|
|
321
|
-
"""
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
Return the
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
"""
|
|
348
|
-
...
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
@over
|
|
352
|
-
def
|
|
353
|
-
"""
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
"""
|
|
378
|
-
...
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
@over
|
|
382
|
-
def
|
|
383
|
-
"""
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
Compute the
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
"""
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
"""
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
"""
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
"""
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
"""
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
"""
|
|
811
|
-
...
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
@over
|
|
815
|
-
def
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
"""
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
"""
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
"""
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
"""
|
|
940
|
-
...
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
@over
|
|
944
|
-
def
|
|
945
|
-
"""
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
"""
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
"""
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
"""
|
|
1180
|
-
...
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
@over
|
|
1184
|
-
def
|
|
1185
|
-
"""
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
"""
|
|
1222
|
-
...
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
@over
|
|
1226
|
-
def
|
|
1227
|
-
"""
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
"""
|
|
1246
|
-
...
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
@over
|
|
1250
|
-
def
|
|
1251
|
-
"""
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
"""
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
"""
|
|
1411
|
-
...
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
@over
|
|
1415
|
-
def
|
|
1416
|
-
"""
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
"""
|
|
1435
|
-
...
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
@over
|
|
1439
|
-
def
|
|
1440
|
-
"""
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
"""
|
|
1459
|
-
...
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
@over
|
|
1463
|
-
def
|
|
1464
|
-
"""
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
"""
|
|
1483
|
-
...
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
@over
|
|
1487
|
-
def
|
|
1488
|
-
"""
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
"""
|
|
1534
|
-
...
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
@over
|
|
1538
|
-
def
|
|
1539
|
-
"""
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
"""
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
"""
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
"""
|
|
1606
|
-
...
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
@over
|
|
1610
|
-
def
|
|
1611
|
-
"""
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
"""
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
"""
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
"""
|
|
1678
|
-
...
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
@over
|
|
1682
|
-
def
|
|
1683
|
-
"""
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
"""
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
"""
|
|
2103
|
-
...
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
@over
|
|
2107
|
-
def
|
|
2108
|
-
"""
|
|
2109
|
-
|
|
2110
|
-
"""
|
|
2111
|
-
...
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
@over
|
|
2115
|
-
def lower_bound(arr: Array[Scalar], value: Scalar) -> int:
|
|
2116
|
-
"""
|
|
2117
|
-
Search a sorted array ``arr`` for the closest element greater than or equal to ``value``.
|
|
2118
|
-
"""
|
|
2119
|
-
...
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
@over
|
|
2123
|
-
def lower_bound(arr: Array[Scalar], arr_begin: int32, arr_end: int32, value: Scalar) -> int:
|
|
2124
|
-
"""
|
|
2125
|
-
Search a sorted array ``arr`` in the range [arr_begin, arr_end) for the closest element greater than or equal to ``value``.
|
|
2126
|
-
"""
|
|
2127
|
-
...
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
@over
|
|
2131
|
-
def add(x: Scalar, y: Scalar) -> Scalar:
|
|
2132
|
-
""" """
|
|
2133
|
-
...
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
@over
|
|
2137
|
-
def add(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2138
|
-
""" """
|
|
2139
|
-
...
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
@over
|
|
2143
|
-
def add(x: Quaternion[Scalar], y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2144
|
-
""" """
|
|
2145
|
-
...
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
@over
|
|
2149
|
-
def add(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2150
|
-
""" """
|
|
2151
|
-
...
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
@over
|
|
2155
|
-
def add(x: Transformation[Scalar], y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
2156
|
-
""" """
|
|
2157
|
-
...
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
@over
|
|
2161
|
-
def sub(x: Scalar, y: Scalar) -> Scalar:
|
|
2162
|
-
""" """
|
|
2163
|
-
...
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
@over
|
|
2167
|
-
def sub(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2168
|
-
""" """
|
|
2169
|
-
...
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
@over
|
|
2173
|
-
def sub(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2174
|
-
""" """
|
|
2175
|
-
...
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
@over
|
|
2179
|
-
def sub(x: Quaternion[Scalar], y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2180
|
-
""" """
|
|
2181
|
-
...
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
@over
|
|
2185
|
-
def sub(x: Transformation[Scalar], y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
2186
|
-
""" """
|
|
2187
|
-
...
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
@over
|
|
2191
|
-
def bit_and(x: Int, y: Int) -> Int:
|
|
2192
|
-
""" """
|
|
2193
|
-
...
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
@over
|
|
2197
|
-
def bit_or(x: Int, y: Int) -> Int:
|
|
2198
|
-
""" """
|
|
2199
|
-
...
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
@over
|
|
2203
|
-
def bit_xor(x: Int, y: Int) -> Int:
|
|
2204
|
-
""" """
|
|
2205
|
-
...
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
@over
|
|
2209
|
-
def lshift(x: Int, y: Int) -> Int:
|
|
2210
|
-
""" """
|
|
2211
|
-
...
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
@over
|
|
2215
|
-
def rshift(x: Int, y: Int) -> Int:
|
|
2216
|
-
""" """
|
|
2217
|
-
...
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
@over
|
|
2221
|
-
def invert(x: Int) -> Int:
|
|
2222
|
-
""" """
|
|
2223
|
-
...
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
@over
|
|
2227
|
-
def mul(x: Scalar, y: Scalar) -> Scalar:
|
|
2228
|
-
""" """
|
|
2229
|
-
...
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
@over
|
|
2233
|
-
def mul(x: Vector[Any, Scalar], y: Scalar) -> Vector[Any, Scalar]:
|
|
2234
|
-
""" """
|
|
2235
|
-
...
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
@over
|
|
2239
|
-
def mul(x: Scalar, y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2240
|
-
""" """
|
|
2241
|
-
...
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
@over
|
|
2245
|
-
def mul(x: Quaternion[Scalar], y: Scalar) -> Quaternion[Scalar]:
|
|
2246
|
-
""" """
|
|
2247
|
-
...
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
@over
|
|
2251
|
-
def mul(x: Scalar, y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2252
|
-
""" """
|
|
2253
|
-
...
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
@over
|
|
2257
|
-
def mul(x: Quaternion[Scalar], y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2258
|
-
""" """
|
|
2259
|
-
...
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
@over
|
|
2263
|
-
def mul(x: Scalar, y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2264
|
-
""" """
|
|
2265
|
-
...
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
@over
|
|
2269
|
-
def mul(x: Matrix[Any, Any, Scalar], y: Scalar) -> Matrix[Any, Any, Scalar]:
|
|
2270
|
-
""" """
|
|
2271
|
-
...
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
@over
|
|
2275
|
-
def mul(x: Matrix[Any, Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2276
|
-
""" """
|
|
2277
|
-
...
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
@over
|
|
2281
|
-
def mul(x: Vector[Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2282
|
-
""" """
|
|
2283
|
-
...
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
@over
|
|
2287
|
-
def mul(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]):
|
|
2288
|
-
""" """
|
|
2289
|
-
...
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
@over
|
|
2293
|
-
def mul(x: Transformation[Scalar], y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
2294
|
-
""" """
|
|
2295
|
-
...
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
@over
|
|
2299
|
-
def mul(x: Scalar, y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
2300
|
-
""" """
|
|
2301
|
-
...
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
@over
|
|
2305
|
-
def mul(x: Transformation[Scalar], y: Scalar) -> Transformation[Scalar]:
|
|
2306
|
-
""" """
|
|
2307
|
-
...
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
@over
|
|
2311
|
-
def mod(x: Scalar, y: Scalar) -> Scalar:
|
|
2312
|
-
""" """
|
|
2313
|
-
...
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
@over
|
|
2317
|
-
def div(x: Scalar, y: Scalar) -> Scalar:
|
|
2318
|
-
""" """
|
|
2319
|
-
...
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
@over
|
|
2323
|
-
def div(x: Vector[Any, Scalar], y: Scalar) -> Vector[Any, Scalar]:
|
|
2324
|
-
""" """
|
|
2325
|
-
...
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
@over
|
|
2329
|
-
def div(x: Scalar, y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2330
|
-
""" """
|
|
2331
|
-
...
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
@over
|
|
2335
|
-
def div(x: Matrix[Any, Any, Scalar], y: Scalar) -> Matrix[Any, Any, Scalar]:
|
|
2336
|
-
""" """
|
|
2337
|
-
...
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
@over
|
|
2341
|
-
def div(x: Scalar, y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2342
|
-
""" """
|
|
2343
|
-
...
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
@over
|
|
2347
|
-
def div(x: Quaternion[Scalar], y: Scalar) -> Quaternion[Scalar]:
|
|
2348
|
-
""" """
|
|
2349
|
-
...
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
@over
|
|
2353
|
-
def div(x: Scalar, y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2354
|
-
""" """
|
|
2355
|
-
...
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
@over
|
|
2359
|
-
def floordiv(x: Scalar, y: Scalar) -> Scalar:
|
|
2360
|
-
""" """
|
|
2361
|
-
...
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
@over
|
|
2365
|
-
def pos(x: Scalar) -> Scalar:
|
|
2366
|
-
""" """
|
|
2367
|
-
...
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
@over
|
|
2371
|
-
def pos(x: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2372
|
-
""" """
|
|
2373
|
-
...
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
@over
|
|
2377
|
-
def pos(x: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2378
|
-
""" """
|
|
2379
|
-
...
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
@over
|
|
2383
|
-
def pos(x: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2384
|
-
""" """
|
|
2385
|
-
...
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
@over
|
|
2389
|
-
def neg(x: Scalar) -> Scalar:
|
|
2390
|
-
""" """
|
|
2391
|
-
...
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
@over
|
|
2395
|
-
def neg(x: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2396
|
-
""" """
|
|
2397
|
-
...
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
@over
|
|
2401
|
-
def neg(x: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2402
|
-
""" """
|
|
2403
|
-
...
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
@over
|
|
2407
|
-
def neg(x: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2408
|
-
""" """
|
|
2409
|
-
...
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
@over
|
|
2413
|
-
def unot(b: bool) -> bool:
|
|
2414
|
-
""" """
|
|
2415
|
-
...
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
@over
|
|
2419
|
-
def unot(b: int8) -> bool:
|
|
2420
|
-
""" """
|
|
2421
|
-
...
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
@over
|
|
2425
|
-
def unot(b: uint8) -> bool:
|
|
2426
|
-
""" """
|
|
2427
|
-
...
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
@over
|
|
2431
|
-
def unot(b: int16) -> bool:
|
|
2432
|
-
""" """
|
|
2433
|
-
...
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
@over
|
|
2437
|
-
def unot(b: uint16) -> bool:
|
|
2438
|
-
""" """
|
|
2439
|
-
...
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
@over
|
|
2443
|
-
def unot(b: int32) -> bool:
|
|
2444
|
-
""" """
|
|
2445
|
-
...
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
@over
|
|
2449
|
-
def unot(b: uint32) -> bool:
|
|
2450
|
-
""" """
|
|
2451
|
-
...
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
@over
|
|
2455
|
-
def unot(b: int64) -> bool:
|
|
2456
|
-
""" """
|
|
2457
|
-
...
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
@over
|
|
2461
|
-
def unot(b: uint64) -> bool:
|
|
2462
|
-
""" """
|
|
2463
|
-
...
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
@over
|
|
2467
|
-
def unot(a: Array[Any]) -> bool:
|
|
2468
|
-
""" """
|
|
2469
|
-
...
|
|
1
|
+
# Autogenerated file, do not edit, this file provides stubs for builtins autocomplete in VSCode, PyCharm, etc
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
from typing import Tuple
|
|
5
|
+
from typing import Callable
|
|
6
|
+
from typing import TypeVar
|
|
7
|
+
from typing import Generic
|
|
8
|
+
from typing import overload as over
|
|
9
|
+
|
|
10
|
+
Length = TypeVar("Length", bound=int)
|
|
11
|
+
Rows = TypeVar("Rows", bound=int)
|
|
12
|
+
Cols = TypeVar("Cols", bound=int)
|
|
13
|
+
DType = TypeVar("DType")
|
|
14
|
+
Int = TypeVar("Int")
|
|
15
|
+
Float = TypeVar("Float")
|
|
16
|
+
Scalar = TypeVar("Scalar")
|
|
17
|
+
Vector = Generic[Length, Scalar]
|
|
18
|
+
Matrix = Generic[Rows, Cols, Scalar]
|
|
19
|
+
Quaternion = Generic[Float]
|
|
20
|
+
Transformation = Generic[Float]
|
|
21
|
+
Array = Generic[DType]
|
|
22
|
+
FabricArray = Generic[DType]
|
|
23
|
+
IndexedFabricArray = Generic[DType]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
from warp.types import array, array1d, array2d, array3d, array4d, constant
|
|
27
|
+
from warp.types import indexedarray, indexedarray1d, indexedarray2d, indexedarray3d, indexedarray4d
|
|
28
|
+
from warp.fabric import fabricarray, fabricarrayarray, indexedfabricarray, indexedfabricarrayarray
|
|
29
|
+
|
|
30
|
+
from warp.types import bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, float16, float32, float64
|
|
31
|
+
from warp.types import vec2, vec2b, vec2ub, vec2s, vec2us, vec2i, vec2ui, vec2l, vec2ul, vec2h, vec2f, vec2d
|
|
32
|
+
from warp.types import vec3, vec3b, vec3ub, vec3s, vec3us, vec3i, vec3ui, vec3l, vec3ul, vec3h, vec3f, vec3d
|
|
33
|
+
from warp.types import vec4, vec4b, vec4ub, vec4s, vec4us, vec4i, vec4ui, vec4l, vec4ul, vec4h, vec4f, vec4d
|
|
34
|
+
from warp.types import mat22, mat22h, mat22f, mat22d
|
|
35
|
+
from warp.types import mat33, mat33h, mat33f, mat33d
|
|
36
|
+
from warp.types import mat44, mat44h, mat44f, mat44d
|
|
37
|
+
from warp.types import quat, quath, quatf, quatd
|
|
38
|
+
from warp.types import transform, transformh, transformf, transformd
|
|
39
|
+
from warp.types import spatial_vector, spatial_vectorh, spatial_vectorf, spatial_vectord
|
|
40
|
+
from warp.types import spatial_matrix, spatial_matrixh, spatial_matrixf, spatial_matrixd
|
|
41
|
+
|
|
42
|
+
from warp.types import Bvh, Mesh, HashGrid, Volume, MarchingCubes
|
|
43
|
+
from warp.types import bvh_query_t, hash_grid_query_t, mesh_query_aabb_t, mesh_query_point_t, mesh_query_ray_t
|
|
44
|
+
|
|
45
|
+
from warp.types import matmul, adj_matmul, batched_matmul, adj_batched_matmul, from_ptr
|
|
46
|
+
|
|
47
|
+
from warp.types import vector as vec
|
|
48
|
+
from warp.types import matrix as mat
|
|
49
|
+
|
|
50
|
+
from warp.types import dtype_from_numpy, dtype_to_numpy
|
|
51
|
+
|
|
52
|
+
from warp.context import init, func, func_grad, func_replay, func_native, kernel, struct, overload
|
|
53
|
+
from warp.context import is_cpu_available, is_cuda_available, is_device_available
|
|
54
|
+
from warp.context import get_devices, get_preferred_device
|
|
55
|
+
from warp.context import get_cuda_devices, get_cuda_device_count, get_cuda_device, map_cuda_device, unmap_cuda_device
|
|
56
|
+
from warp.context import get_device, set_device, synchronize_device
|
|
57
|
+
from warp.context import (
|
|
58
|
+
zeros,
|
|
59
|
+
zeros_like,
|
|
60
|
+
ones,
|
|
61
|
+
ones_like,
|
|
62
|
+
full,
|
|
63
|
+
full_like,
|
|
64
|
+
clone,
|
|
65
|
+
empty,
|
|
66
|
+
empty_like,
|
|
67
|
+
copy,
|
|
68
|
+
from_numpy,
|
|
69
|
+
launch,
|
|
70
|
+
synchronize,
|
|
71
|
+
force_load,
|
|
72
|
+
load_module,
|
|
73
|
+
)
|
|
74
|
+
from warp.context import set_module_options, get_module_options, get_module
|
|
75
|
+
from warp.context import capture_begin, capture_end, capture_launch
|
|
76
|
+
from warp.context import Kernel, Function, Launch
|
|
77
|
+
from warp.context import Stream, get_stream, set_stream, wait_stream, synchronize_stream
|
|
78
|
+
from warp.context import Event, record_event, wait_event, synchronize_event, get_event_elapsed_time
|
|
79
|
+
from warp.context import RegisteredGLBuffer
|
|
80
|
+
from warp.context import is_mempool_supported, is_mempool_enabled, set_mempool_enabled
|
|
81
|
+
from warp.context import set_mempool_release_threshold, get_mempool_release_threshold
|
|
82
|
+
from warp.context import is_mempool_access_supported, is_mempool_access_enabled, set_mempool_access_enabled
|
|
83
|
+
from warp.context import is_peer_access_supported, is_peer_access_enabled, set_peer_access_enabled
|
|
84
|
+
|
|
85
|
+
from warp.tape import Tape
|
|
86
|
+
from warp.utils import ScopedTimer, ScopedDevice, ScopedStream
|
|
87
|
+
from warp.utils import ScopedMempool, ScopedMempoolAccess, ScopedPeerAccess
|
|
88
|
+
from warp.utils import ScopedCapture
|
|
89
|
+
from warp.utils import transform_expand, quat_between_vectors
|
|
90
|
+
from warp.utils import TimingResult, timing_begin, timing_end, timing_print
|
|
91
|
+
from warp.utils import (
|
|
92
|
+
TIMING_KERNEL,
|
|
93
|
+
TIMING_KERNEL_BUILTIN,
|
|
94
|
+
TIMING_MEMCPY,
|
|
95
|
+
TIMING_MEMSET,
|
|
96
|
+
TIMING_GRAPH,
|
|
97
|
+
TIMING_ALL,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
from warp.torch import from_torch, to_torch
|
|
101
|
+
from warp.torch import dtype_from_torch, dtype_to_torch
|
|
102
|
+
from warp.torch import device_from_torch, device_to_torch
|
|
103
|
+
from warp.torch import stream_from_torch, stream_to_torch
|
|
104
|
+
|
|
105
|
+
from warp.jax import from_jax, to_jax
|
|
106
|
+
from warp.jax import dtype_from_jax, dtype_to_jax
|
|
107
|
+
from warp.jax import device_from_jax, device_to_jax
|
|
108
|
+
|
|
109
|
+
from warp.dlpack import from_dlpack, to_dlpack
|
|
110
|
+
|
|
111
|
+
from warp.constants import *
|
|
112
|
+
|
|
113
|
+
from . import builtins
|
|
114
|
+
|
|
115
|
+
import warp.config
|
|
116
|
+
|
|
117
|
+
__version__ = warp.config.version
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@over
|
|
121
|
+
def min(x: Scalar, y: Scalar) -> Scalar:
|
|
122
|
+
"""Return the minimum of two scalars."""
|
|
123
|
+
...
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@over
|
|
127
|
+
def min(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
128
|
+
"""Return the element-wise minimum of two vectors."""
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@over
|
|
133
|
+
def min(v: Vector[Any, Scalar]) -> Scalar:
|
|
134
|
+
"""Return the minimum element of a vector ``v``."""
|
|
135
|
+
...
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
@over
|
|
139
|
+
def max(x: Scalar, y: Scalar) -> Scalar:
|
|
140
|
+
"""Return the maximum of two scalars."""
|
|
141
|
+
...
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
@over
|
|
145
|
+
def max(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
146
|
+
"""Return the element-wise maximum of two vectors."""
|
|
147
|
+
...
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
@over
|
|
151
|
+
def max(v: Vector[Any, Scalar]) -> Scalar:
|
|
152
|
+
"""Return the maximum element of a vector ``v``."""
|
|
153
|
+
...
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
@over
|
|
157
|
+
def clamp(x: Scalar, a: Scalar, b: Scalar) -> Scalar:
|
|
158
|
+
"""Clamp the value of ``x`` to the range [a, b]."""
|
|
159
|
+
...
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@over
|
|
163
|
+
def abs(x: Scalar) -> Scalar:
|
|
164
|
+
"""Return the absolute value of ``x``."""
|
|
165
|
+
...
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
@over
|
|
169
|
+
def sign(x: Scalar) -> Scalar:
|
|
170
|
+
"""Return -1 if ``x`` < 0, return 1 otherwise."""
|
|
171
|
+
...
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@over
|
|
175
|
+
def step(x: Scalar) -> Scalar:
|
|
176
|
+
"""Return 1.0 if ``x`` < 0.0, return 0.0 otherwise."""
|
|
177
|
+
...
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@over
|
|
181
|
+
def nonzero(x: Scalar) -> Scalar:
|
|
182
|
+
"""Return 1.0 if ``x`` is not equal to zero, return 0.0 otherwise."""
|
|
183
|
+
...
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@over
|
|
187
|
+
def sin(x: Float) -> Float:
|
|
188
|
+
"""Return the sine of ``x`` in radians."""
|
|
189
|
+
...
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@over
|
|
193
|
+
def cos(x: Float) -> Float:
|
|
194
|
+
"""Return the cosine of ``x`` in radians."""
|
|
195
|
+
...
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@over
|
|
199
|
+
def acos(x: Float) -> Float:
|
|
200
|
+
"""Return arccos of ``x`` in radians. Inputs are automatically clamped to [-1.0, 1.0]."""
|
|
201
|
+
...
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
@over
|
|
205
|
+
def asin(x: Float) -> Float:
|
|
206
|
+
"""Return arcsin of ``x`` in radians. Inputs are automatically clamped to [-1.0, 1.0]."""
|
|
207
|
+
...
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
@over
|
|
211
|
+
def sqrt(x: Float) -> Float:
|
|
212
|
+
"""Return the square root of ``x``, where ``x`` is positive."""
|
|
213
|
+
...
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
@over
|
|
217
|
+
def cbrt(x: Float) -> Float:
|
|
218
|
+
"""Return the cube root of ``x``."""
|
|
219
|
+
...
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
@over
|
|
223
|
+
def tan(x: Float) -> Float:
|
|
224
|
+
"""Return the tangent of ``x`` in radians."""
|
|
225
|
+
...
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
@over
|
|
229
|
+
def atan(x: Float) -> Float:
|
|
230
|
+
"""Return the arctangent of ``x`` in radians."""
|
|
231
|
+
...
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
@over
|
|
235
|
+
def atan2(y: Float, x: Float) -> Float:
|
|
236
|
+
"""Return the 2-argument arctangent, atan2, of the point ``(x, y)`` in radians."""
|
|
237
|
+
...
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
@over
|
|
241
|
+
def sinh(x: Float) -> Float:
|
|
242
|
+
"""Return the sinh of ``x``."""
|
|
243
|
+
...
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
@over
|
|
247
|
+
def cosh(x: Float) -> Float:
|
|
248
|
+
"""Return the cosh of ``x``."""
|
|
249
|
+
...
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@over
|
|
253
|
+
def tanh(x: Float) -> Float:
|
|
254
|
+
"""Return the tanh of ``x``."""
|
|
255
|
+
...
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
@over
|
|
259
|
+
def degrees(x: Float) -> Float:
|
|
260
|
+
"""Convert ``x`` from radians into degrees."""
|
|
261
|
+
...
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
@over
|
|
265
|
+
def radians(x: Float) -> Float:
|
|
266
|
+
"""Convert ``x`` from degrees into radians."""
|
|
267
|
+
...
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
@over
|
|
271
|
+
def log(x: Float) -> Float:
|
|
272
|
+
"""Return the natural logarithm (base-e) of ``x``, where ``x`` is positive."""
|
|
273
|
+
...
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
@over
|
|
277
|
+
def log2(x: Float) -> Float:
|
|
278
|
+
"""Return the binary logarithm (base-2) of ``x``, where ``x`` is positive."""
|
|
279
|
+
...
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
@over
|
|
283
|
+
def log10(x: Float) -> Float:
|
|
284
|
+
"""Return the common logarithm (base-10) of ``x``, where ``x`` is positive."""
|
|
285
|
+
...
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
@over
|
|
289
|
+
def exp(x: Float) -> Float:
|
|
290
|
+
"""Return the value of the exponential function :math:`e^x`."""
|
|
291
|
+
...
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
@over
|
|
295
|
+
def pow(x: Float, y: Float) -> Float:
|
|
296
|
+
"""Return the result of ``x`` raised to power of ``y``."""
|
|
297
|
+
...
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
@over
|
|
301
|
+
def round(x: Float) -> Float:
|
|
302
|
+
"""Return the nearest integer value to ``x``, rounding halfway cases away from zero.
|
|
303
|
+
|
|
304
|
+
This is the most intuitive form of rounding in the colloquial sense, but can be slower than other options like :func:`warp.rint()`.
|
|
305
|
+
Differs from :func:`numpy.round()`, which behaves the same way as :func:`numpy.rint()`.
|
|
306
|
+
"""
|
|
307
|
+
...
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
@over
|
|
311
|
+
def rint(x: Float) -> Float:
|
|
312
|
+
"""Return the nearest integer value to ``x``, rounding halfway cases to nearest even integer.
|
|
313
|
+
|
|
314
|
+
It is generally faster than :func:`warp.round()`. Equivalent to :func:`numpy.rint()`.
|
|
315
|
+
"""
|
|
316
|
+
...
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
@over
|
|
320
|
+
def trunc(x: Float) -> Float:
|
|
321
|
+
"""Return the nearest integer that is closer to zero than ``x``.
|
|
322
|
+
|
|
323
|
+
In other words, it discards the fractional part of ``x``.
|
|
324
|
+
It is similar to casting ``float(int(x))``, but preserves the negative sign when x is in the range [-0.0, -1.0).
|
|
325
|
+
Equivalent to :func:`numpy.trunc()` and :func:`numpy.fix()`.
|
|
326
|
+
"""
|
|
327
|
+
...
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@over
|
|
331
|
+
def floor(x: Float) -> Float:
|
|
332
|
+
"""Return the largest integer that is less than or equal to ``x``."""
|
|
333
|
+
...
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
@over
|
|
337
|
+
def ceil(x: Float) -> Float:
|
|
338
|
+
"""Return the smallest integer that is greater than or equal to ``x``."""
|
|
339
|
+
...
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
@over
|
|
343
|
+
def frac(x: Float) -> Float:
|
|
344
|
+
"""Retrieve the fractional part of x.
|
|
345
|
+
|
|
346
|
+
In other words, it discards the integer part of x and is equivalent to ``x - trunc(x)``.
|
|
347
|
+
"""
|
|
348
|
+
...
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
@over
|
|
352
|
+
def dot(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Scalar:
|
|
353
|
+
"""Compute the dot product between two vectors."""
|
|
354
|
+
...
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
@over
|
|
358
|
+
def dot(x: Quaternion[Float], y: Quaternion[Float]) -> Scalar:
|
|
359
|
+
"""Compute the dot product between two quaternions."""
|
|
360
|
+
...
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
@over
|
|
364
|
+
def ddot(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Scalar:
|
|
365
|
+
"""Compute the double dot product between two matrices."""
|
|
366
|
+
...
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
@over
|
|
370
|
+
def argmin(v: Vector[Any, Scalar]) -> uint32:
|
|
371
|
+
"""Return the index of the minimum element of a vector ``v``."""
|
|
372
|
+
...
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
@over
|
|
376
|
+
def argmax(v: Vector[Any, Scalar]) -> uint32:
|
|
377
|
+
"""Return the index of the maximum element of a vector ``v``."""
|
|
378
|
+
...
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
@over
|
|
382
|
+
def outer(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
383
|
+
"""Compute the outer product ``x*y^T`` for two vectors."""
|
|
384
|
+
...
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
@over
|
|
388
|
+
def cross(x: Vector[3, Scalar], y: Vector[3, Scalar]) -> Vector[3, Scalar]:
|
|
389
|
+
"""Compute the cross product of two 3D vectors."""
|
|
390
|
+
...
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
@over
|
|
394
|
+
def skew(x: Vector[3, Scalar]):
|
|
395
|
+
"""Compute the skew-symmetric 3x3 matrix for a 3D vector ``x``."""
|
|
396
|
+
...
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
@over
|
|
400
|
+
def length(x: Vector[Any, Float]) -> Scalar:
|
|
401
|
+
"""Compute the length of a floating-point vector ``x``."""
|
|
402
|
+
...
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
@over
|
|
406
|
+
def length(x: Quaternion[Float]) -> Scalar:
|
|
407
|
+
"""Compute the length of a quaternion ``x``."""
|
|
408
|
+
...
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
@over
|
|
412
|
+
def length_sq(x: Vector[Any, Scalar]) -> Scalar:
|
|
413
|
+
"""Compute the squared length of a vector ``x``."""
|
|
414
|
+
...
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
@over
|
|
418
|
+
def length_sq(x: Quaternion[Scalar]) -> Scalar:
|
|
419
|
+
"""Compute the squared length of a quaternion ``x``."""
|
|
420
|
+
...
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
@over
|
|
424
|
+
def normalize(x: Vector[Any, Float]) -> Vector[Any, Scalar]:
|
|
425
|
+
"""Compute the normalized value of ``x``. If ``length(x)`` is 0 then the zero vector is returned."""
|
|
426
|
+
...
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
@over
|
|
430
|
+
def normalize(x: Quaternion[Float]) -> Quaternion[Scalar]:
|
|
431
|
+
"""Compute the normalized value of ``x``. If ``length(x)`` is 0, then the zero quaternion is returned."""
|
|
432
|
+
...
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
@over
|
|
436
|
+
def transpose(m: Matrix[Any, Any, Scalar]):
|
|
437
|
+
"""Return the transpose of the matrix ``m``."""
|
|
438
|
+
...
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
@over
|
|
442
|
+
def inverse(m: Matrix[2, 2, Float]) -> Matrix[Any, Any, Float]:
|
|
443
|
+
"""Return the inverse of a 2x2 matrix ``m``."""
|
|
444
|
+
...
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
@over
|
|
448
|
+
def inverse(m: Matrix[3, 3, Float]) -> Matrix[Any, Any, Float]:
|
|
449
|
+
"""Return the inverse of a 3x3 matrix ``m``."""
|
|
450
|
+
...
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
@over
|
|
454
|
+
def inverse(m: Matrix[4, 4, Float]) -> Matrix[Any, Any, Float]:
|
|
455
|
+
"""Return the inverse of a 4x4 matrix ``m``."""
|
|
456
|
+
...
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
@over
|
|
460
|
+
def determinant(m: Matrix[2, 2, Float]) -> Scalar:
|
|
461
|
+
"""Return the determinant of a 2x2 matrix ``m``."""
|
|
462
|
+
...
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
@over
|
|
466
|
+
def determinant(m: Matrix[3, 3, Float]) -> Scalar:
|
|
467
|
+
"""Return the determinant of a 3x3 matrix ``m``."""
|
|
468
|
+
...
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
@over
|
|
472
|
+
def determinant(m: Matrix[4, 4, Float]) -> Scalar:
|
|
473
|
+
"""Return the determinant of a 4x4 matrix ``m``."""
|
|
474
|
+
...
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
@over
|
|
478
|
+
def trace(m: Matrix[Any, Any, Scalar]) -> Scalar:
|
|
479
|
+
"""Return the trace of the matrix ``m``."""
|
|
480
|
+
...
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
@over
|
|
484
|
+
def diag(d: Vector[Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
485
|
+
"""Returns a matrix with the components of the vector ``d`` on the diagonal."""
|
|
486
|
+
...
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
@over
|
|
490
|
+
def get_diag(m: Matrix[Any, Any, Scalar]) -> Vector[Any, Scalar]:
|
|
491
|
+
"""Returns a vector containing the diagonal elements of the square matrix ``m``."""
|
|
492
|
+
...
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
@over
|
|
496
|
+
def cw_mul(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
497
|
+
"""Component-wise multiplication of two vectors."""
|
|
498
|
+
...
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
@over
|
|
502
|
+
def cw_mul(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
503
|
+
"""Component-wise multiplication of two matrices."""
|
|
504
|
+
...
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
@over
|
|
508
|
+
def cw_div(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
509
|
+
"""Component-wise division of two vectors."""
|
|
510
|
+
...
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
@over
|
|
514
|
+
def cw_div(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
515
|
+
"""Component-wise division of two matrices."""
|
|
516
|
+
...
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
@over
|
|
520
|
+
def quat_identity() -> quatf:
|
|
521
|
+
"""Construct an identity quaternion with zero imaginary part and real part of 1.0"""
|
|
522
|
+
...
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
@over
|
|
526
|
+
def quat_from_axis_angle(axis: Vector[3, Float], angle: Float) -> Quaternion[Scalar]:
|
|
527
|
+
"""Construct a quaternion representing a rotation of angle radians around the given axis."""
|
|
528
|
+
...
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
@over
|
|
532
|
+
def quat_to_axis_angle(q: Quaternion[Float], axis: Vector[3, Float], angle: Float):
|
|
533
|
+
"""Extract the rotation axis and angle radians a quaternion represents."""
|
|
534
|
+
...
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
@over
|
|
538
|
+
def quat_from_matrix(m: Matrix[3, 3, Float]) -> Quaternion[Scalar]:
|
|
539
|
+
"""Construct a quaternion from a 3x3 matrix."""
|
|
540
|
+
...
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
@over
|
|
544
|
+
def quat_rpy(roll: Float, pitch: Float, yaw: Float) -> Quaternion[Scalar]:
|
|
545
|
+
"""Construct a quaternion representing a combined roll (z), pitch (x), yaw rotations (y) in radians."""
|
|
546
|
+
...
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
@over
|
|
550
|
+
def quat_inverse(q: Quaternion[Float]) -> Quaternion[Scalar]:
|
|
551
|
+
"""Compute quaternion conjugate."""
|
|
552
|
+
...
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
@over
|
|
556
|
+
def quat_rotate(q: Quaternion[Float], p: Vector[3, Float]) -> Vector[3, Scalar]:
|
|
557
|
+
"""Rotate a vector by a quaternion."""
|
|
558
|
+
...
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
@over
|
|
562
|
+
def quat_rotate_inv(q: Quaternion[Float], p: Vector[3, Float]) -> Vector[3, Scalar]:
|
|
563
|
+
"""Rotate a vector by the inverse of a quaternion."""
|
|
564
|
+
...
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
@over
|
|
568
|
+
def quat_slerp(q0: Quaternion[Float], q1: Quaternion[Float], t: Float) -> Quaternion[Scalar]:
|
|
569
|
+
"""Linearly interpolate between two quaternions."""
|
|
570
|
+
...
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
@over
|
|
574
|
+
def quat_to_matrix(q: Quaternion[Float]) -> Matrix[3, 3, Scalar]:
|
|
575
|
+
"""Convert a quaternion to a 3x3 rotation matrix."""
|
|
576
|
+
...
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
@over
|
|
580
|
+
def transform_identity() -> transformf:
|
|
581
|
+
"""Construct an identity transform with zero translation and identity rotation."""
|
|
582
|
+
...
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
@over
|
|
586
|
+
def transform_get_translation(t: Transformation[Float]) -> Vector[3, Scalar]:
|
|
587
|
+
"""Return the translational part of a transform ``t``."""
|
|
588
|
+
...
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
@over
|
|
592
|
+
def transform_get_rotation(t: Transformation[Float]) -> Quaternion[Scalar]:
|
|
593
|
+
"""Return the rotational part of a transform ``t``."""
|
|
594
|
+
...
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
@over
|
|
598
|
+
def transform_multiply(a: Transformation[Float], b: Transformation[Float]) -> Transformation[Scalar]:
|
|
599
|
+
"""Multiply two rigid body transformations together."""
|
|
600
|
+
...
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
@over
|
|
604
|
+
def transform_point(t: Transformation[Scalar], p: Vector[3, Scalar]) -> Vector[3, Scalar]:
|
|
605
|
+
"""Apply the transform to a point ``p`` treating the homogeneous coordinate as w=1 (translation and rotation)."""
|
|
606
|
+
...
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
@over
|
|
610
|
+
def transform_point(m: Matrix[4, 4, Scalar], p: Vector[3, Scalar]) -> Vector[3, Scalar]:
|
|
611
|
+
"""Apply the transform to a point ``p`` treating the homogeneous coordinate as w=1.
|
|
612
|
+
|
|
613
|
+
The transformation is applied treating ``p`` as a column vector, e.g.: ``y = M*p``.
|
|
614
|
+
Note this is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = p^T*M^T``.
|
|
615
|
+
If the transform is coming from a library that uses row-vectors, then users should transpose the transformation
|
|
616
|
+
matrix before calling this method.
|
|
617
|
+
"""
|
|
618
|
+
...
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
@over
|
|
622
|
+
def transform_vector(t: Transformation[Scalar], v: Vector[3, Scalar]) -> Vector[3, Scalar]:
|
|
623
|
+
"""Apply the transform to a vector ``v`` treating the homogeneous coordinate as w=0 (rotation only)."""
|
|
624
|
+
...
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
@over
|
|
628
|
+
def transform_vector(m: Matrix[4, 4, Scalar], v: Vector[3, Scalar]) -> Vector[3, Scalar]:
|
|
629
|
+
"""Apply the transform to a vector ``v`` treating the homogeneous coordinate as w=0.
|
|
630
|
+
|
|
631
|
+
The transformation is applied treating ``v`` as a column vector, e.g.: ``y = M*v``
|
|
632
|
+
note this is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = v^T*M^T``.
|
|
633
|
+
If the transform is coming from a library that uses row-vectors, then users should transpose the transformation
|
|
634
|
+
matrix before calling this method.
|
|
635
|
+
"""
|
|
636
|
+
...
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
@over
|
|
640
|
+
def transform_inverse(t: Transformation[Float]) -> Transformation[Float]:
|
|
641
|
+
"""Compute the inverse of the transformation ``t``."""
|
|
642
|
+
...
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
@over
|
|
646
|
+
def spatial_dot(a: Vector[6, Float], b: Vector[6, Float]) -> Scalar:
|
|
647
|
+
"""Compute the dot product of two 6D screw vectors."""
|
|
648
|
+
...
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
@over
|
|
652
|
+
def spatial_cross(a: Vector[6, Float], b: Vector[6, Float]) -> Vector[6, Float]:
|
|
653
|
+
"""Compute the cross product of two 6D screw vectors."""
|
|
654
|
+
...
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
@over
|
|
658
|
+
def spatial_cross_dual(a: Vector[6, Float], b: Vector[6, Float]) -> Vector[6, Float]:
|
|
659
|
+
"""Compute the dual cross product of two 6D screw vectors."""
|
|
660
|
+
...
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
@over
|
|
664
|
+
def spatial_top(a: Vector[6, Float]):
|
|
665
|
+
"""Return the top (first) part of a 6D screw vector."""
|
|
666
|
+
...
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
@over
|
|
670
|
+
def spatial_bottom(a: Vector[6, Float]):
|
|
671
|
+
"""Return the bottom (second) part of a 6D screw vector."""
|
|
672
|
+
...
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
@over
|
|
676
|
+
def spatial_jacobian(
|
|
677
|
+
S: Array[Vector[6, Float]],
|
|
678
|
+
joint_parents: Array[int32],
|
|
679
|
+
joint_qd_start: Array[int32],
|
|
680
|
+
joint_start: int32,
|
|
681
|
+
joint_count: int32,
|
|
682
|
+
J_start: int32,
|
|
683
|
+
J_out: Array[Float],
|
|
684
|
+
):
|
|
685
|
+
""" """
|
|
686
|
+
...
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
@over
|
|
690
|
+
def spatial_mass(
|
|
691
|
+
I_s: Array[Matrix[6, 6, Float]], joint_start: int32, joint_count: int32, M_start: int32, M: Array[Float]
|
|
692
|
+
):
|
|
693
|
+
""" """
|
|
694
|
+
...
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
@over
|
|
698
|
+
def mlp(
|
|
699
|
+
weights: Array[float32],
|
|
700
|
+
bias: Array[float32],
|
|
701
|
+
activation: Callable,
|
|
702
|
+
index: int32,
|
|
703
|
+
x: Array[float32],
|
|
704
|
+
out: Array[float32],
|
|
705
|
+
):
|
|
706
|
+
"""Evaluate a multi-layer perceptron (MLP) layer in the form: ``out = act(weights*x + bias)``.
|
|
707
|
+
|
|
708
|
+
:param weights: A layer's network weights with dimensions ``(m, n)``.
|
|
709
|
+
:param bias: An array with dimensions ``(n)``.
|
|
710
|
+
:param activation: A ``wp.func`` function that takes a single scalar float as input and returns a scalar float as output
|
|
711
|
+
:param index: The batch item to process, typically each thread will process one item in the batch, in which case
|
|
712
|
+
index should be ``wp.tid()``
|
|
713
|
+
:param x: The feature matrix with dimensions ``(n, b)``
|
|
714
|
+
:param out: The network output with dimensions ``(m, b)``
|
|
715
|
+
|
|
716
|
+
:note: Feature and output matrices are transposed compared to some other frameworks such as PyTorch.
|
|
717
|
+
All matrices are assumed to be stored in flattened row-major memory layout (NumPy default).
|
|
718
|
+
"""
|
|
719
|
+
...
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
@over
|
|
723
|
+
def bvh_query_aabb(id: uint64, lower: vec3f, upper: vec3f) -> bvh_query_t:
|
|
724
|
+
"""Construct an axis-aligned bounding box query against a BVH object.
|
|
725
|
+
|
|
726
|
+
This query can be used to iterate over all bounds inside a BVH.
|
|
727
|
+
|
|
728
|
+
:param id: The BVH identifier
|
|
729
|
+
:param lower: The lower bound of the bounding box in BVH space
|
|
730
|
+
:param upper: The upper bound of the bounding box in BVH space
|
|
731
|
+
"""
|
|
732
|
+
...
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
@over
|
|
736
|
+
def bvh_query_ray(id: uint64, start: vec3f, dir: vec3f) -> bvh_query_t:
|
|
737
|
+
"""Construct a ray query against a BVH object.
|
|
738
|
+
|
|
739
|
+
This query can be used to iterate over all bounds that intersect the ray.
|
|
740
|
+
|
|
741
|
+
:param id: The BVH identifier
|
|
742
|
+
:param start: The start of the ray in BVH space
|
|
743
|
+
:param dir: The direction of the ray in BVH space
|
|
744
|
+
"""
|
|
745
|
+
...
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
@over
|
|
749
|
+
def bvh_query_next(query: bvh_query_t, index: int32) -> bool:
|
|
750
|
+
"""Move to the next bound returned by the query.
|
|
751
|
+
The index of the current bound is stored in ``index``, returns ``False`` if there are no more overlapping bound.
|
|
752
|
+
"""
|
|
753
|
+
...
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
@over
|
|
757
|
+
def mesh_query_point(id: uint64, point: vec3f, max_dist: float32) -> mesh_query_point_t:
|
|
758
|
+
"""Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given ``point`` in space.
|
|
759
|
+
|
|
760
|
+
Identifies the sign of the distance using additional ray-casts to determine if the point is inside or outside.
|
|
761
|
+
This method is relatively robust, but does increase computational cost.
|
|
762
|
+
See below for additional sign determination methods.
|
|
763
|
+
|
|
764
|
+
:param id: The mesh identifier
|
|
765
|
+
:param point: The point in space to query
|
|
766
|
+
:param max_dist: Mesh faces above this distance will not be considered by the query
|
|
767
|
+
"""
|
|
768
|
+
...
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
@over
|
|
772
|
+
def mesh_query_point_no_sign(id: uint64, point: vec3f, max_dist: float32) -> mesh_query_point_t:
|
|
773
|
+
"""Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given ``point`` in space.
|
|
774
|
+
|
|
775
|
+
This method does not compute the sign of the point (inside/outside) which makes it faster than other point query methods.
|
|
776
|
+
|
|
777
|
+
:param id: The mesh identifier
|
|
778
|
+
:param point: The point in space to query
|
|
779
|
+
:param max_dist: Mesh faces above this distance will not be considered by the query
|
|
780
|
+
"""
|
|
781
|
+
...
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
@over
|
|
785
|
+
def mesh_query_furthest_point_no_sign(id: uint64, point: vec3f, min_dist: float32) -> mesh_query_point_t:
|
|
786
|
+
"""Computes the furthest point on the mesh with identifier `id` to the given point in space.
|
|
787
|
+
|
|
788
|
+
This method does not compute the sign of the point (inside/outside).
|
|
789
|
+
|
|
790
|
+
:param id: The mesh identifier
|
|
791
|
+
:param point: The point in space to query
|
|
792
|
+
:param min_dist: Mesh faces below this distance will not be considered by the query
|
|
793
|
+
"""
|
|
794
|
+
...
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
@over
|
|
798
|
+
def mesh_query_point_sign_normal(id: uint64, point: vec3f, max_dist: float32, epsilon: float32) -> mesh_query_point_t:
|
|
799
|
+
"""Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given ``point`` in space.
|
|
800
|
+
|
|
801
|
+
Identifies the sign of the distance (inside/outside) using the angle-weighted pseudo normal.
|
|
802
|
+
This approach to sign determination is robust for well conditioned meshes that are watertight and non-self intersecting.
|
|
803
|
+
It is also comparatively fast to compute.
|
|
804
|
+
|
|
805
|
+
:param id: The mesh identifier
|
|
806
|
+
:param point: The point in space to query
|
|
807
|
+
:param max_dist: Mesh faces above this distance will not be considered by the query
|
|
808
|
+
:param epsilon: Epsilon treating distance values as equal, when locating the minimum distance vertex/face/edge, as a
|
|
809
|
+
fraction of the average edge length, also for treating closest point as being on edge/vertex default 1e-3
|
|
810
|
+
"""
|
|
811
|
+
...
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
@over
|
|
815
|
+
def mesh_query_point_sign_winding_number(
|
|
816
|
+
id: uint64, point: vec3f, max_dist: float32, accuracy: float32, threshold: float32
|
|
817
|
+
) -> mesh_query_point_t:
|
|
818
|
+
"""Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given point in space.
|
|
819
|
+
|
|
820
|
+
Identifies the sign using the winding number of the mesh relative to the query point. This method of sign determination is robust for poorly conditioned meshes
|
|
821
|
+
and provides a smooth approximation to sign even when the mesh is not watertight. This method is the most robust and accurate of the sign determination meshes
|
|
822
|
+
but also the most expensive.
|
|
823
|
+
|
|
824
|
+
.. note:: The :class:`Mesh` object must be constructed with ``support_winding_number=True`` for this method to return correct results.
|
|
825
|
+
|
|
826
|
+
:param id: The mesh identifier
|
|
827
|
+
:param point: The point in space to query
|
|
828
|
+
:param max_dist: Mesh faces above this distance will not be considered by the query
|
|
829
|
+
:param accuracy: Accuracy for computing the winding number with fast winding number method utilizing second-order dipole approximation, default 2.0
|
|
830
|
+
:param threshold: The threshold of the winding number to be considered inside, default 0.5
|
|
831
|
+
"""
|
|
832
|
+
...
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
@over
|
|
836
|
+
def mesh_query_ray(id: uint64, start: vec3f, dir: vec3f, max_t: float32) -> mesh_query_ray_t:
|
|
837
|
+
"""Computes the closest ray hit on the :class:`Mesh` with identifier ``id``.
|
|
838
|
+
|
|
839
|
+
:param id: The mesh identifier
|
|
840
|
+
:param start: The start point of the ray
|
|
841
|
+
:param dir: The ray direction (should be normalized)
|
|
842
|
+
:param max_t: The maximum distance along the ray to check for intersections
|
|
843
|
+
"""
|
|
844
|
+
...
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
@over
|
|
848
|
+
def mesh_query_aabb(id: uint64, lower: vec3f, upper: vec3f) -> mesh_query_aabb_t:
|
|
849
|
+
"""Construct an axis-aligned bounding box query against a :class:`Mesh`.
|
|
850
|
+
|
|
851
|
+
This query can be used to iterate over all triangles inside a volume.
|
|
852
|
+
|
|
853
|
+
:param id: The mesh identifier
|
|
854
|
+
:param lower: The lower bound of the bounding box in mesh space
|
|
855
|
+
:param upper: The upper bound of the bounding box in mesh space
|
|
856
|
+
"""
|
|
857
|
+
...
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
@over
|
|
861
|
+
def mesh_query_aabb_next(query: mesh_query_aabb_t, index: int32) -> bool:
|
|
862
|
+
"""Move to the next triangle overlapping the query bounding box.
|
|
863
|
+
|
|
864
|
+
The index of the current face is stored in ``index``, returns ``False`` if there are no more overlapping triangles.
|
|
865
|
+
"""
|
|
866
|
+
...
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
@over
|
|
870
|
+
def mesh_eval_position(id: uint64, face: int32, bary_u: float32, bary_v: float32) -> vec3f:
|
|
871
|
+
"""Evaluates the position on the :class:`Mesh` given a face index and barycentric coordinates."""
|
|
872
|
+
...
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
@over
|
|
876
|
+
def mesh_eval_velocity(id: uint64, face: int32, bary_u: float32, bary_v: float32) -> vec3f:
|
|
877
|
+
"""Evaluates the velocity on the :class:`Mesh` given a face index and barycentric coordinates."""
|
|
878
|
+
...
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
@over
|
|
882
|
+
def hash_grid_query(id: uint64, point: vec3f, max_dist: float32) -> hash_grid_query_t:
|
|
883
|
+
"""Construct a point query against a :class:`HashGrid`.
|
|
884
|
+
|
|
885
|
+
This query can be used to iterate over all neighboring point within a fixed radius from the query point.
|
|
886
|
+
"""
|
|
887
|
+
...
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
@over
|
|
891
|
+
def hash_grid_query_next(query: hash_grid_query_t, index: int32) -> bool:
|
|
892
|
+
"""Move to the next point in the hash grid query.
|
|
893
|
+
|
|
894
|
+
The index of the current neighbor is stored in ``index``, returns ``False`` if there are no more neighbors.
|
|
895
|
+
"""
|
|
896
|
+
...
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
@over
|
|
900
|
+
def hash_grid_point_id(id: uint64, index: int32) -> int:
|
|
901
|
+
"""Return the index of a point in the :class:`HashGrid`.
|
|
902
|
+
|
|
903
|
+
This can be used to reorder threads such that grid traversal occurs in a spatially coherent order.
|
|
904
|
+
|
|
905
|
+
Returns -1 if the :class:`HashGrid` has not been reserved.
|
|
906
|
+
"""
|
|
907
|
+
...
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
@over
|
|
911
|
+
def intersect_tri_tri(v0: vec3f, v1: vec3f, v2: vec3f, u0: vec3f, u1: vec3f, u2: vec3f) -> int:
|
|
912
|
+
"""Tests for intersection between two triangles (v0, v1, v2) and (u0, u1, u2) using Moller's method.
|
|
913
|
+
|
|
914
|
+
Returns > 0 if triangles intersect.
|
|
915
|
+
"""
|
|
916
|
+
...
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
@over
|
|
920
|
+
def mesh_get(id: uint64) -> Mesh:
|
|
921
|
+
"""Retrieves the mesh given its index."""
|
|
922
|
+
...
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
@over
|
|
926
|
+
def mesh_eval_face_normal(id: uint64, face: int32) -> vec3f:
|
|
927
|
+
"""Evaluates the face normal the mesh given a face index."""
|
|
928
|
+
...
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
@over
|
|
932
|
+
def mesh_get_point(id: uint64, index: int32) -> vec3f:
|
|
933
|
+
"""Returns the point of the mesh given a index."""
|
|
934
|
+
...
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
@over
|
|
938
|
+
def mesh_get_velocity(id: uint64, index: int32) -> vec3f:
|
|
939
|
+
"""Returns the velocity of the mesh given a index."""
|
|
940
|
+
...
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
@over
|
|
944
|
+
def mesh_get_index(id: uint64, index: int32) -> int:
|
|
945
|
+
"""Returns the point-index of the mesh given a face-vertex index."""
|
|
946
|
+
...
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
@over
|
|
950
|
+
def closest_point_edge_edge(p1: vec3f, q1: vec3f, p2: vec3f, q2: vec3f, epsilon: float32) -> vec3f:
|
|
951
|
+
"""Finds the closest points between two edges.
|
|
952
|
+
|
|
953
|
+
Returns barycentric weights to the points on each edge, as well as the closest distance between the edges.
|
|
954
|
+
|
|
955
|
+
:param p1: First point of first edge
|
|
956
|
+
:param q1: Second point of first edge
|
|
957
|
+
:param p2: First point of second edge
|
|
958
|
+
:param q2: Second point of second edge
|
|
959
|
+
:param epsilon: Zero tolerance for determining if points in an edge are degenerate.
|
|
960
|
+
:param out: vec3 output containing (s,t,d), where `s` in [0,1] is the barycentric weight for the first edge, `t` is the barycentric weight for the second edge, and `d` is the distance between the two edges at these two closest points.
|
|
961
|
+
"""
|
|
962
|
+
...
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
@over
|
|
966
|
+
def volume_sample_f(id: uint64, uvw: vec3f, sampling_mode: int32) -> float:
|
|
967
|
+
"""Sample the volume given by ``id`` at the volume local-space point ``uvw``.
|
|
968
|
+
|
|
969
|
+
Interpolation should be :attr:`warp.Volume.CLOSEST` or :attr:`wp.Volume.LINEAR.`
|
|
970
|
+
"""
|
|
971
|
+
...
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
@over
|
|
975
|
+
def volume_sample_grad_f(id: uint64, uvw: vec3f, sampling_mode: int32, grad: vec3f) -> float:
|
|
976
|
+
"""Sample the volume and its gradient given by ``id`` at the volume local-space point ``uvw``.
|
|
977
|
+
|
|
978
|
+
Interpolation should be :attr:`warp.Volume.CLOSEST` or :attr:`wp.Volume.LINEAR.`
|
|
979
|
+
"""
|
|
980
|
+
...
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
@over
|
|
984
|
+
def volume_lookup_f(id: uint64, i: int32, j: int32, k: int32) -> float:
|
|
985
|
+
"""Returns the value of voxel with coordinates ``i``, ``j``, ``k``.
|
|
986
|
+
|
|
987
|
+
If the voxel at this index does not exist, this function returns the background value
|
|
988
|
+
"""
|
|
989
|
+
...
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
@over
|
|
993
|
+
def volume_store_f(id: uint64, i: int32, j: int32, k: int32, value: float32):
|
|
994
|
+
"""Store ``value`` at the voxel with coordinates ``i``, ``j``, ``k``."""
|
|
995
|
+
...
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
@over
|
|
999
|
+
def volume_sample_v(id: uint64, uvw: vec3f, sampling_mode: int32) -> vec3f:
|
|
1000
|
+
"""Sample the vector volume given by ``id`` at the volume local-space point ``uvw``.
|
|
1001
|
+
|
|
1002
|
+
Interpolation should be :attr:`warp.Volume.CLOSEST` or :attr:`wp.Volume.LINEAR.`
|
|
1003
|
+
"""
|
|
1004
|
+
...
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
@over
|
|
1008
|
+
def volume_lookup_v(id: uint64, i: int32, j: int32, k: int32) -> vec3f:
|
|
1009
|
+
"""Returns the vector value of voxel with coordinates ``i``, ``j``, ``k``.
|
|
1010
|
+
|
|
1011
|
+
If the voxel at this index does not exist, this function returns the background value.
|
|
1012
|
+
"""
|
|
1013
|
+
...
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
@over
|
|
1017
|
+
def volume_store_v(id: uint64, i: int32, j: int32, k: int32, value: vec3f):
|
|
1018
|
+
"""Store ``value`` at the voxel with coordinates ``i``, ``j``, ``k``."""
|
|
1019
|
+
...
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
@over
|
|
1023
|
+
def volume_sample_i(id: uint64, uvw: vec3f) -> int:
|
|
1024
|
+
"""Sample the :class:`int32` volume given by ``id`` at the volume local-space point ``uvw``."""
|
|
1025
|
+
...
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
@over
|
|
1029
|
+
def volume_lookup_i(id: uint64, i: int32, j: int32, k: int32) -> int:
|
|
1030
|
+
"""Returns the :class:`int32` value of voxel with coordinates ``i``, ``j``, ``k``.
|
|
1031
|
+
|
|
1032
|
+
If the voxel at this index does not exist, this function returns the background value.
|
|
1033
|
+
"""
|
|
1034
|
+
...
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
@over
|
|
1038
|
+
def volume_store_i(id: uint64, i: int32, j: int32, k: int32, value: int32):
|
|
1039
|
+
"""Store ``value`` at the voxel with coordinates ``i``, ``j``, ``k``."""
|
|
1040
|
+
...
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
@over
|
|
1044
|
+
def volume_index_to_world(id: uint64, uvw: vec3f) -> vec3f:
|
|
1045
|
+
"""Transform a point ``uvw`` defined in volume index space to world space given the volume's intrinsic affine transformation."""
|
|
1046
|
+
...
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
@over
|
|
1050
|
+
def volume_world_to_index(id: uint64, xyz: vec3f) -> vec3f:
|
|
1051
|
+
"""Transform a point ``xyz`` defined in volume world space to the volume's index space given the volume's intrinsic affine transformation."""
|
|
1052
|
+
...
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
@over
|
|
1056
|
+
def volume_index_to_world_dir(id: uint64, uvw: vec3f) -> vec3f:
|
|
1057
|
+
"""Transform a direction ``uvw`` defined in volume index space to world space given the volume's intrinsic affine transformation."""
|
|
1058
|
+
...
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
@over
|
|
1062
|
+
def volume_world_to_index_dir(id: uint64, xyz: vec3f) -> vec3f:
|
|
1063
|
+
"""Transform a direction ``xyz`` defined in volume world space to the volume's index space given the volume's intrinsic affine transformation."""
|
|
1064
|
+
...
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
@over
|
|
1068
|
+
def rand_init(seed: int32) -> uint32:
|
|
1069
|
+
"""Initialize a new random number generator given a user-defined seed. Returns a 32-bit integer representing the RNG state."""
|
|
1070
|
+
...
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
@over
|
|
1074
|
+
def rand_init(seed: int32, offset: int32) -> uint32:
|
|
1075
|
+
"""Initialize a new random number generator given a user-defined seed and an offset.
|
|
1076
|
+
|
|
1077
|
+
This alternative constructor can be useful in parallel programs, where a kernel as a whole should share a seed,
|
|
1078
|
+
but each thread should generate uncorrelated values. In this case usage should be ``r = rand_init(seed, tid)``
|
|
1079
|
+
"""
|
|
1080
|
+
...
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
@over
|
|
1084
|
+
def randi(state: uint32) -> int:
|
|
1085
|
+
"""Return a random integer in the range [0, 2^32)."""
|
|
1086
|
+
...
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
@over
|
|
1090
|
+
def randi(state: uint32, min: int32, max: int32) -> int:
|
|
1091
|
+
"""Return a random integer between [min, max)."""
|
|
1092
|
+
...
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
@over
|
|
1096
|
+
def randf(state: uint32) -> float:
|
|
1097
|
+
"""Return a random float between [0.0, 1.0)."""
|
|
1098
|
+
...
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
@over
|
|
1102
|
+
def randf(state: uint32, min: float32, max: float32) -> float:
|
|
1103
|
+
"""Return a random float between [min, max)."""
|
|
1104
|
+
...
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
@over
|
|
1108
|
+
def randn(state: uint32) -> float:
|
|
1109
|
+
"""Sample a normal distribution."""
|
|
1110
|
+
...
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
@over
|
|
1114
|
+
def sample_cdf(state: uint32, cdf: Array[float32]) -> int:
|
|
1115
|
+
"""Inverse-transform sample a cumulative distribution function."""
|
|
1116
|
+
...
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
@over
|
|
1120
|
+
def sample_triangle(state: uint32) -> vec2f:
|
|
1121
|
+
"""Uniformly sample a triangle. Returns sample barycentric coordinates."""
|
|
1122
|
+
...
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
@over
|
|
1126
|
+
def sample_unit_ring(state: uint32) -> vec2f:
|
|
1127
|
+
"""Uniformly sample a ring in the xy plane."""
|
|
1128
|
+
...
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
@over
|
|
1132
|
+
def sample_unit_disk(state: uint32) -> vec2f:
|
|
1133
|
+
"""Uniformly sample a disk in the xy plane."""
|
|
1134
|
+
...
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
@over
|
|
1138
|
+
def sample_unit_sphere_surface(state: uint32) -> vec3f:
|
|
1139
|
+
"""Uniformly sample a unit sphere surface."""
|
|
1140
|
+
...
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
@over
|
|
1144
|
+
def sample_unit_sphere(state: uint32) -> vec3f:
|
|
1145
|
+
"""Uniformly sample a unit sphere."""
|
|
1146
|
+
...
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
@over
|
|
1150
|
+
def sample_unit_hemisphere_surface(state: uint32) -> vec3f:
|
|
1151
|
+
"""Uniformly sample a unit hemisphere surface."""
|
|
1152
|
+
...
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
@over
|
|
1156
|
+
def sample_unit_hemisphere(state: uint32) -> vec3f:
|
|
1157
|
+
"""Uniformly sample a unit hemisphere."""
|
|
1158
|
+
...
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
@over
|
|
1162
|
+
def sample_unit_square(state: uint32) -> vec2f:
|
|
1163
|
+
"""Uniformly sample a unit square."""
|
|
1164
|
+
...
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
@over
|
|
1168
|
+
def sample_unit_cube(state: uint32) -> vec3f:
|
|
1169
|
+
"""Uniformly sample a unit cube."""
|
|
1170
|
+
...
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
@over
|
|
1174
|
+
def poisson(state: uint32, lam: float32) -> uint32:
|
|
1175
|
+
"""Generate a random sample from a Poisson distribution.
|
|
1176
|
+
|
|
1177
|
+
:param state: RNG state
|
|
1178
|
+
:param lam: The expected value of the distribution
|
|
1179
|
+
"""
|
|
1180
|
+
...
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
@over
|
|
1184
|
+
def noise(state: uint32, x: float32) -> float:
|
|
1185
|
+
"""Non-periodic Perlin-style noise in 1D."""
|
|
1186
|
+
...
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
@over
|
|
1190
|
+
def noise(state: uint32, xy: vec2f) -> float:
|
|
1191
|
+
"""Non-periodic Perlin-style noise in 2D."""
|
|
1192
|
+
...
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
@over
|
|
1196
|
+
def noise(state: uint32, xyz: vec3f) -> float:
|
|
1197
|
+
"""Non-periodic Perlin-style noise in 3D."""
|
|
1198
|
+
...
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
@over
|
|
1202
|
+
def noise(state: uint32, xyzt: vec4f) -> float:
|
|
1203
|
+
"""Non-periodic Perlin-style noise in 4D."""
|
|
1204
|
+
...
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
@over
|
|
1208
|
+
def pnoise(state: uint32, x: float32, px: int32) -> float:
|
|
1209
|
+
"""Periodic Perlin-style noise in 1D."""
|
|
1210
|
+
...
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
@over
|
|
1214
|
+
def pnoise(state: uint32, xy: vec2f, px: int32, py: int32) -> float:
|
|
1215
|
+
"""Periodic Perlin-style noise in 2D."""
|
|
1216
|
+
...
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
@over
|
|
1220
|
+
def pnoise(state: uint32, xyz: vec3f, px: int32, py: int32, pz: int32) -> float:
|
|
1221
|
+
"""Periodic Perlin-style noise in 3D."""
|
|
1222
|
+
...
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
@over
|
|
1226
|
+
def pnoise(state: uint32, xyzt: vec4f, px: int32, py: int32, pz: int32, pt: int32) -> float:
|
|
1227
|
+
"""Periodic Perlin-style noise in 4D."""
|
|
1228
|
+
...
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
@over
|
|
1232
|
+
def curlnoise(state: uint32, xy: vec2f, octaves: uint32, lacunarity: float32, gain: float32) -> vec2f:
|
|
1233
|
+
"""Divergence-free vector field based on the gradient of a Perlin noise function."""
|
|
1234
|
+
...
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
@over
|
|
1238
|
+
def curlnoise(state: uint32, xyz: vec3f, octaves: uint32, lacunarity: float32, gain: float32) -> vec3f:
|
|
1239
|
+
"""Divergence-free vector field based on the curl of three Perlin noise functions."""
|
|
1240
|
+
...
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
@over
|
|
1244
|
+
def curlnoise(state: uint32, xyzt: vec4f, octaves: uint32, lacunarity: float32, gain: float32) -> vec3f:
|
|
1245
|
+
"""Divergence-free vector field based on the curl of three Perlin noise functions."""
|
|
1246
|
+
...
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
@over
|
|
1250
|
+
def printf():
|
|
1251
|
+
"""Allows printing formatted strings using C-style format specifiers."""
|
|
1252
|
+
...
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
@over
|
|
1256
|
+
def tid() -> Tuple[int, int]:
|
|
1257
|
+
"""Return the current thread indices for a 2D kernel launch.
|
|
1258
|
+
|
|
1259
|
+
Use ``i,j = wp.tid()`` syntax to retrieve the coordinates inside the kernel thread grid.
|
|
1260
|
+
|
|
1261
|
+
This function may not be called from user-defined Warp functions.
|
|
1262
|
+
"""
|
|
1263
|
+
...
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
@over
|
|
1267
|
+
def tid() -> Tuple[int, int, int]:
|
|
1268
|
+
"""Return the current thread indices for a 3D kernel launch.
|
|
1269
|
+
|
|
1270
|
+
Use ``i,j,k = wp.tid()`` syntax to retrieve the coordinates inside the kernel thread grid.
|
|
1271
|
+
|
|
1272
|
+
This function may not be called from user-defined Warp functions.
|
|
1273
|
+
"""
|
|
1274
|
+
...
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
@over
|
|
1278
|
+
def tid() -> Tuple[int, int, int, int]:
|
|
1279
|
+
"""Return the current thread indices for a 4D kernel launch.
|
|
1280
|
+
|
|
1281
|
+
Use ``i,j,k,l = wp.tid()`` syntax to retrieve the coordinates inside the kernel thread grid.
|
|
1282
|
+
|
|
1283
|
+
This function may not be called from user-defined Warp functions.
|
|
1284
|
+
"""
|
|
1285
|
+
...
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
@over
|
|
1289
|
+
def select(cond: bool, arg1: Any, arg2: Any):
|
|
1290
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1291
|
+
...
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
@over
|
|
1295
|
+
def select(cond: int8, arg1: Any, arg2: Any):
|
|
1296
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1297
|
+
...
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
@over
|
|
1301
|
+
def select(cond: uint8, arg1: Any, arg2: Any):
|
|
1302
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1303
|
+
...
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
@over
|
|
1307
|
+
def select(cond: int16, arg1: Any, arg2: Any):
|
|
1308
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1309
|
+
...
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
@over
|
|
1313
|
+
def select(cond: uint16, arg1: Any, arg2: Any):
|
|
1314
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1315
|
+
...
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
@over
|
|
1319
|
+
def select(cond: int32, arg1: Any, arg2: Any):
|
|
1320
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1321
|
+
...
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
@over
|
|
1325
|
+
def select(cond: uint32, arg1: Any, arg2: Any):
|
|
1326
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1327
|
+
...
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
@over
|
|
1331
|
+
def select(cond: int64, arg1: Any, arg2: Any):
|
|
1332
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1333
|
+
...
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
@over
|
|
1337
|
+
def select(cond: uint64, arg1: Any, arg2: Any):
|
|
1338
|
+
"""Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``"""
|
|
1339
|
+
...
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
@over
|
|
1343
|
+
def select(arr: Array[Any], arg1: Any, arg2: Any):
|
|
1344
|
+
"""Select between two arguments, if ``arr`` is null then return ``arg1``, otherwise return ``arg2``"""
|
|
1345
|
+
...
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
@over
|
|
1349
|
+
def atomic_add(a: Array[Any], i: int32, value: Any):
|
|
1350
|
+
"""Atomically add ``value`` onto ``a[i]``."""
|
|
1351
|
+
...
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
@over
|
|
1355
|
+
def atomic_add(a: Array[Any], i: int32, j: int32, value: Any):
|
|
1356
|
+
"""Atomically add ``value`` onto ``a[i,j]``."""
|
|
1357
|
+
...
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
@over
|
|
1361
|
+
def atomic_add(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1362
|
+
"""Atomically add ``value`` onto ``a[i,j,k]``."""
|
|
1363
|
+
...
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
@over
|
|
1367
|
+
def atomic_add(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1368
|
+
"""Atomically add ``value`` onto ``a[i,j,k,l]``."""
|
|
1369
|
+
...
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
@over
|
|
1373
|
+
def atomic_add(a: FabricArray[Any], i: int32, value: Any):
|
|
1374
|
+
"""Atomically add ``value`` onto ``a[i]``."""
|
|
1375
|
+
...
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
@over
|
|
1379
|
+
def atomic_add(a: FabricArray[Any], i: int32, j: int32, value: Any):
|
|
1380
|
+
"""Atomically add ``value`` onto ``a[i,j]``."""
|
|
1381
|
+
...
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
@over
|
|
1385
|
+
def atomic_add(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1386
|
+
"""Atomically add ``value`` onto ``a[i,j,k]``."""
|
|
1387
|
+
...
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
@over
|
|
1391
|
+
def atomic_add(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1392
|
+
"""Atomically add ``value`` onto ``a[i,j,k,l]``."""
|
|
1393
|
+
...
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
@over
|
|
1397
|
+
def atomic_add(a: IndexedFabricArray[Any], i: int32, value: Any):
|
|
1398
|
+
"""Atomically add ``value`` onto ``a[i]``."""
|
|
1399
|
+
...
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
@over
|
|
1403
|
+
def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
|
|
1404
|
+
"""Atomically add ``value`` onto ``a[i,j]``."""
|
|
1405
|
+
...
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
@over
|
|
1409
|
+
def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1410
|
+
"""Atomically add ``value`` onto ``a[i,j,k]``."""
|
|
1411
|
+
...
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
@over
|
|
1415
|
+
def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1416
|
+
"""Atomically add ``value`` onto ``a[i,j,k,l]``."""
|
|
1417
|
+
...
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
@over
|
|
1421
|
+
def atomic_sub(a: Array[Any], i: int32, value: Any):
|
|
1422
|
+
"""Atomically subtract ``value`` onto ``a[i]``."""
|
|
1423
|
+
...
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
@over
|
|
1427
|
+
def atomic_sub(a: Array[Any], i: int32, j: int32, value: Any):
|
|
1428
|
+
"""Atomically subtract ``value`` onto ``a[i,j]``."""
|
|
1429
|
+
...
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
@over
|
|
1433
|
+
def atomic_sub(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1434
|
+
"""Atomically subtract ``value`` onto ``a[i,j,k]``."""
|
|
1435
|
+
...
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
@over
|
|
1439
|
+
def atomic_sub(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1440
|
+
"""Atomically subtract ``value`` onto ``a[i,j,k,l]``."""
|
|
1441
|
+
...
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
@over
|
|
1445
|
+
def atomic_sub(a: FabricArray[Any], i: int32, value: Any):
|
|
1446
|
+
"""Atomically subtract ``value`` onto ``a[i]``."""
|
|
1447
|
+
...
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
@over
|
|
1451
|
+
def atomic_sub(a: FabricArray[Any], i: int32, j: int32, value: Any):
|
|
1452
|
+
"""Atomically subtract ``value`` onto ``a[i,j]``."""
|
|
1453
|
+
...
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
@over
|
|
1457
|
+
def atomic_sub(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1458
|
+
"""Atomically subtract ``value`` onto ``a[i,j,k]``."""
|
|
1459
|
+
...
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
@over
|
|
1463
|
+
def atomic_sub(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1464
|
+
"""Atomically subtract ``value`` onto ``a[i,j,k,l]``."""
|
|
1465
|
+
...
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
@over
|
|
1469
|
+
def atomic_sub(a: IndexedFabricArray[Any], i: int32, value: Any):
|
|
1470
|
+
"""Atomically subtract ``value`` onto ``a[i]``."""
|
|
1471
|
+
...
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
@over
|
|
1475
|
+
def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
|
|
1476
|
+
"""Atomically subtract ``value`` onto ``a[i,j]``."""
|
|
1477
|
+
...
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
@over
|
|
1481
|
+
def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1482
|
+
"""Atomically subtract ``value`` onto ``a[i,j,k]``."""
|
|
1483
|
+
...
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
@over
|
|
1487
|
+
def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1488
|
+
"""Atomically subtract ``value`` onto ``a[i,j,k,l]``."""
|
|
1489
|
+
...
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
@over
|
|
1493
|
+
def atomic_min(a: Array[Any], i: int32, value: Any):
|
|
1494
|
+
"""Compute the minimum of ``value`` and ``a[i]`` and atomically update the array.
|
|
1495
|
+
|
|
1496
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1497
|
+
"""
|
|
1498
|
+
...
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
@over
|
|
1502
|
+
def atomic_min(a: Array[Any], i: int32, j: int32, value: Any):
|
|
1503
|
+
"""Compute the minimum of ``value`` and ``a[i,j]`` and atomically update the array.
|
|
1504
|
+
|
|
1505
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1506
|
+
"""
|
|
1507
|
+
...
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
@over
|
|
1511
|
+
def atomic_min(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1512
|
+
"""Compute the minimum of ``value`` and ``a[i,j,k]`` and atomically update the array.
|
|
1513
|
+
|
|
1514
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1515
|
+
"""
|
|
1516
|
+
...
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
@over
|
|
1520
|
+
def atomic_min(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1521
|
+
"""Compute the minimum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
|
|
1522
|
+
|
|
1523
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1524
|
+
"""
|
|
1525
|
+
...
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
@over
|
|
1529
|
+
def atomic_min(a: FabricArray[Any], i: int32, value: Any):
|
|
1530
|
+
"""Compute the minimum of ``value`` and ``a[i]`` and atomically update the array.
|
|
1531
|
+
|
|
1532
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1533
|
+
"""
|
|
1534
|
+
...
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
@over
|
|
1538
|
+
def atomic_min(a: FabricArray[Any], i: int32, j: int32, value: Any):
|
|
1539
|
+
"""Compute the minimum of ``value`` and ``a[i,j]`` and atomically update the array.
|
|
1540
|
+
|
|
1541
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1542
|
+
"""
|
|
1543
|
+
...
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
@over
|
|
1547
|
+
def atomic_min(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1548
|
+
"""Compute the minimum of ``value`` and ``a[i,j,k]`` and atomically update the array.
|
|
1549
|
+
|
|
1550
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1551
|
+
"""
|
|
1552
|
+
...
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
@over
|
|
1556
|
+
def atomic_min(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1557
|
+
"""Compute the minimum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
|
|
1558
|
+
|
|
1559
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1560
|
+
"""
|
|
1561
|
+
...
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
@over
|
|
1565
|
+
def atomic_min(a: IndexedFabricArray[Any], i: int32, value: Any):
|
|
1566
|
+
"""Compute the minimum of ``value`` and ``a[i]`` and atomically update the array.
|
|
1567
|
+
|
|
1568
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1569
|
+
"""
|
|
1570
|
+
...
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
@over
|
|
1574
|
+
def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
|
|
1575
|
+
"""Compute the minimum of ``value`` and ``a[i,j]`` and atomically update the array.
|
|
1576
|
+
|
|
1577
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1578
|
+
"""
|
|
1579
|
+
...
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
@over
|
|
1583
|
+
def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1584
|
+
"""Compute the minimum of ``value`` and ``a[i,j,k]`` and atomically update the array.
|
|
1585
|
+
|
|
1586
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1587
|
+
"""
|
|
1588
|
+
...
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
@over
|
|
1592
|
+
def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1593
|
+
"""Compute the minimum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
|
|
1594
|
+
|
|
1595
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1596
|
+
"""
|
|
1597
|
+
...
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
@over
|
|
1601
|
+
def atomic_max(a: Array[Any], i: int32, value: Any):
|
|
1602
|
+
"""Compute the maximum of ``value`` and ``a[i]`` and atomically update the array.
|
|
1603
|
+
|
|
1604
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1605
|
+
"""
|
|
1606
|
+
...
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
@over
|
|
1610
|
+
def atomic_max(a: Array[Any], i: int32, j: int32, value: Any):
|
|
1611
|
+
"""Compute the maximum of ``value`` and ``a[i,j]`` and atomically update the array.
|
|
1612
|
+
|
|
1613
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1614
|
+
"""
|
|
1615
|
+
...
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
@over
|
|
1619
|
+
def atomic_max(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1620
|
+
"""Compute the maximum of ``value`` and ``a[i,j,k]`` and atomically update the array.
|
|
1621
|
+
|
|
1622
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1623
|
+
"""
|
|
1624
|
+
...
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
@over
|
|
1628
|
+
def atomic_max(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1629
|
+
"""Compute the maximum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
|
|
1630
|
+
|
|
1631
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1632
|
+
"""
|
|
1633
|
+
...
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
@over
|
|
1637
|
+
def atomic_max(a: FabricArray[Any], i: int32, value: Any):
|
|
1638
|
+
"""Compute the maximum of ``value`` and ``a[i]`` and atomically update the array.
|
|
1639
|
+
|
|
1640
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1641
|
+
"""
|
|
1642
|
+
...
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
@over
|
|
1646
|
+
def atomic_max(a: FabricArray[Any], i: int32, j: int32, value: Any):
|
|
1647
|
+
"""Compute the maximum of ``value`` and ``a[i,j]`` and atomically update the array.
|
|
1648
|
+
|
|
1649
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1650
|
+
"""
|
|
1651
|
+
...
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
@over
|
|
1655
|
+
def atomic_max(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1656
|
+
"""Compute the maximum of ``value`` and ``a[i,j,k]`` and atomically update the array.
|
|
1657
|
+
|
|
1658
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1659
|
+
"""
|
|
1660
|
+
...
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
@over
|
|
1664
|
+
def atomic_max(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1665
|
+
"""Compute the maximum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
|
|
1666
|
+
|
|
1667
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1668
|
+
"""
|
|
1669
|
+
...
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
@over
|
|
1673
|
+
def atomic_max(a: IndexedFabricArray[Any], i: int32, value: Any):
|
|
1674
|
+
"""Compute the maximum of ``value`` and ``a[i]`` and atomically update the array.
|
|
1675
|
+
|
|
1676
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1677
|
+
"""
|
|
1678
|
+
...
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
@over
|
|
1682
|
+
def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
|
|
1683
|
+
"""Compute the maximum of ``value`` and ``a[i,j]`` and atomically update the array.
|
|
1684
|
+
|
|
1685
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1686
|
+
"""
|
|
1687
|
+
...
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
@over
|
|
1691
|
+
def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
|
|
1692
|
+
"""Compute the maximum of ``value`` and ``a[i,j,k]`` and atomically update the array.
|
|
1693
|
+
|
|
1694
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1695
|
+
"""
|
|
1696
|
+
...
|
|
1697
|
+
|
|
1698
|
+
|
|
1699
|
+
@over
|
|
1700
|
+
def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
|
|
1701
|
+
"""Compute the maximum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
|
|
1702
|
+
|
|
1703
|
+
.. note:: The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1704
|
+
"""
|
|
1705
|
+
...
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
@over
|
|
1709
|
+
def lerp(a: Float, b: Float, t: Float) -> Float:
|
|
1710
|
+
"""Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
|
|
1711
|
+
...
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
@over
|
|
1715
|
+
def lerp(a: Vector[Any, Float], b: Vector[Any, Float], t: Float) -> Vector[Any, Float]:
|
|
1716
|
+
"""Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
|
|
1717
|
+
...
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
@over
|
|
1721
|
+
def lerp(a: Matrix[Any, Any, Float], b: Matrix[Any, Any, Float], t: Float) -> Matrix[Any, Any, Float]:
|
|
1722
|
+
"""Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
|
|
1723
|
+
...
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
@over
|
|
1727
|
+
def lerp(a: Quaternion[Float], b: Quaternion[Float], t: Float) -> Quaternion[Float]:
|
|
1728
|
+
"""Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
|
|
1729
|
+
...
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
@over
|
|
1733
|
+
def lerp(a: Transformation[Float], b: Transformation[Float], t: Float) -> Transformation[Float]:
|
|
1734
|
+
"""Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``"""
|
|
1735
|
+
...
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
@over
|
|
1739
|
+
def smoothstep(edge0: Float, edge1: Float, x: Float) -> Float:
|
|
1740
|
+
"""Smoothly interpolate between two values ``edge0`` and ``edge1`` using a factor ``x``,
|
|
1741
|
+
and return a result between 0 and 1 using a cubic Hermite interpolation after clamping.
|
|
1742
|
+
"""
|
|
1743
|
+
...
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
@over
|
|
1747
|
+
def expect_near(arg1: Float, arg2: Float, tolerance: Float):
|
|
1748
|
+
"""Prints an error to stdout if ``arg1`` and ``arg2`` are not closer than tolerance in magnitude"""
|
|
1749
|
+
...
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
@over
|
|
1753
|
+
def expect_near(arg1: vec3f, arg2: vec3f, tolerance: float32):
|
|
1754
|
+
"""Prints an error to stdout if any element of ``arg1`` and ``arg2`` are not closer than tolerance in magnitude"""
|
|
1755
|
+
...
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
@over
|
|
1759
|
+
def lower_bound(arr: Array[Scalar], value: Scalar) -> int:
|
|
1760
|
+
"""Search a sorted array ``arr`` for the closest element greater than or equal to ``value``."""
|
|
1761
|
+
...
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
@over
|
|
1765
|
+
def lower_bound(arr: Array[Scalar], arr_begin: int32, arr_end: int32, value: Scalar) -> int:
|
|
1766
|
+
"""Search a sorted array ``arr`` in the range [arr_begin, arr_end) for the closest element greater than or equal to ``value``."""
|
|
1767
|
+
...
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
@over
|
|
1771
|
+
def add(x: Scalar, y: Scalar) -> Scalar:
|
|
1772
|
+
""" """
|
|
1773
|
+
...
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
@over
|
|
1777
|
+
def add(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
1778
|
+
""" """
|
|
1779
|
+
...
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
@over
|
|
1783
|
+
def add(x: Quaternion[Scalar], y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
1784
|
+
""" """
|
|
1785
|
+
...
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
@over
|
|
1789
|
+
def add(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
1790
|
+
""" """
|
|
1791
|
+
...
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
@over
|
|
1795
|
+
def add(x: Transformation[Scalar], y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
1796
|
+
""" """
|
|
1797
|
+
...
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
@over
|
|
1801
|
+
def sub(x: Scalar, y: Scalar) -> Scalar:
|
|
1802
|
+
""" """
|
|
1803
|
+
...
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
@over
|
|
1807
|
+
def sub(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
1808
|
+
""" """
|
|
1809
|
+
...
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
@over
|
|
1813
|
+
def sub(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
1814
|
+
""" """
|
|
1815
|
+
...
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
@over
|
|
1819
|
+
def sub(x: Quaternion[Scalar], y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
1820
|
+
""" """
|
|
1821
|
+
...
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
@over
|
|
1825
|
+
def sub(x: Transformation[Scalar], y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
1826
|
+
""" """
|
|
1827
|
+
...
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
@over
|
|
1831
|
+
def bit_and(x: Int, y: Int) -> Int:
|
|
1832
|
+
""" """
|
|
1833
|
+
...
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
@over
|
|
1837
|
+
def bit_or(x: Int, y: Int) -> Int:
|
|
1838
|
+
""" """
|
|
1839
|
+
...
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
@over
|
|
1843
|
+
def bit_xor(x: Int, y: Int) -> Int:
|
|
1844
|
+
""" """
|
|
1845
|
+
...
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
@over
|
|
1849
|
+
def lshift(x: Int, y: Int) -> Int:
|
|
1850
|
+
""" """
|
|
1851
|
+
...
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
@over
|
|
1855
|
+
def rshift(x: Int, y: Int) -> Int:
|
|
1856
|
+
""" """
|
|
1857
|
+
...
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
@over
|
|
1861
|
+
def invert(x: Int) -> Int:
|
|
1862
|
+
""" """
|
|
1863
|
+
...
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
@over
|
|
1867
|
+
def mul(x: Scalar, y: Scalar) -> Scalar:
|
|
1868
|
+
""" """
|
|
1869
|
+
...
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
@over
|
|
1873
|
+
def mul(x: Vector[Any, Scalar], y: Scalar) -> Vector[Any, Scalar]:
|
|
1874
|
+
""" """
|
|
1875
|
+
...
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
@over
|
|
1879
|
+
def mul(x: Scalar, y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
1880
|
+
""" """
|
|
1881
|
+
...
|
|
1882
|
+
|
|
1883
|
+
|
|
1884
|
+
@over
|
|
1885
|
+
def mul(x: Quaternion[Scalar], y: Scalar) -> Quaternion[Scalar]:
|
|
1886
|
+
""" """
|
|
1887
|
+
...
|
|
1888
|
+
|
|
1889
|
+
|
|
1890
|
+
@over
|
|
1891
|
+
def mul(x: Scalar, y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
1892
|
+
""" """
|
|
1893
|
+
...
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
@over
|
|
1897
|
+
def mul(x: Quaternion[Scalar], y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
1898
|
+
""" """
|
|
1899
|
+
...
|
|
1900
|
+
|
|
1901
|
+
|
|
1902
|
+
@over
|
|
1903
|
+
def mul(x: Scalar, y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
1904
|
+
""" """
|
|
1905
|
+
...
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
@over
|
|
1909
|
+
def mul(x: Matrix[Any, Any, Scalar], y: Scalar) -> Matrix[Any, Any, Scalar]:
|
|
1910
|
+
""" """
|
|
1911
|
+
...
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
@over
|
|
1915
|
+
def mul(x: Matrix[Any, Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
1916
|
+
""" """
|
|
1917
|
+
...
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
@over
|
|
1921
|
+
def mul(x: Vector[Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Vector[Any, Scalar]:
|
|
1922
|
+
""" """
|
|
1923
|
+
...
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
@over
|
|
1927
|
+
def mul(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]):
|
|
1928
|
+
""" """
|
|
1929
|
+
...
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
@over
|
|
1933
|
+
def mul(x: Transformation[Scalar], y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
1934
|
+
""" """
|
|
1935
|
+
...
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
@over
|
|
1939
|
+
def mul(x: Scalar, y: Transformation[Scalar]) -> Transformation[Scalar]:
|
|
1940
|
+
""" """
|
|
1941
|
+
...
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
@over
|
|
1945
|
+
def mul(x: Transformation[Scalar], y: Scalar) -> Transformation[Scalar]:
|
|
1946
|
+
""" """
|
|
1947
|
+
...
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
@over
|
|
1951
|
+
def mod(x: Scalar, y: Scalar) -> Scalar:
|
|
1952
|
+
""" """
|
|
1953
|
+
...
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
@over
|
|
1957
|
+
def div(x: Scalar, y: Scalar) -> Scalar:
|
|
1958
|
+
""" """
|
|
1959
|
+
...
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
@over
|
|
1963
|
+
def div(x: Vector[Any, Scalar], y: Scalar) -> Vector[Any, Scalar]:
|
|
1964
|
+
""" """
|
|
1965
|
+
...
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
@over
|
|
1969
|
+
def div(x: Scalar, y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
1970
|
+
""" """
|
|
1971
|
+
...
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
@over
|
|
1975
|
+
def div(x: Matrix[Any, Any, Scalar], y: Scalar) -> Matrix[Any, Any, Scalar]:
|
|
1976
|
+
""" """
|
|
1977
|
+
...
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
@over
|
|
1981
|
+
def div(x: Scalar, y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
1982
|
+
""" """
|
|
1983
|
+
...
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
@over
|
|
1987
|
+
def div(x: Quaternion[Scalar], y: Scalar) -> Quaternion[Scalar]:
|
|
1988
|
+
""" """
|
|
1989
|
+
...
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
@over
|
|
1993
|
+
def div(x: Scalar, y: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
1994
|
+
""" """
|
|
1995
|
+
...
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
@over
|
|
1999
|
+
def floordiv(x: Scalar, y: Scalar) -> Scalar:
|
|
2000
|
+
""" """
|
|
2001
|
+
...
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
@over
|
|
2005
|
+
def pos(x: Scalar) -> Scalar:
|
|
2006
|
+
""" """
|
|
2007
|
+
...
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
@over
|
|
2011
|
+
def pos(x: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2012
|
+
""" """
|
|
2013
|
+
...
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
@over
|
|
2017
|
+
def pos(x: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2018
|
+
""" """
|
|
2019
|
+
...
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
@over
|
|
2023
|
+
def pos(x: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2024
|
+
""" """
|
|
2025
|
+
...
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
@over
|
|
2029
|
+
def neg(x: Scalar) -> Scalar:
|
|
2030
|
+
""" """
|
|
2031
|
+
...
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
@over
|
|
2035
|
+
def neg(x: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
|
|
2036
|
+
""" """
|
|
2037
|
+
...
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
@over
|
|
2041
|
+
def neg(x: Quaternion[Scalar]) -> Quaternion[Scalar]:
|
|
2042
|
+
""" """
|
|
2043
|
+
...
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
@over
|
|
2047
|
+
def neg(x: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
|
|
2048
|
+
""" """
|
|
2049
|
+
...
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
@over
|
|
2053
|
+
def unot(b: bool) -> bool:
|
|
2054
|
+
""" """
|
|
2055
|
+
...
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
@over
|
|
2059
|
+
def unot(b: int8) -> bool:
|
|
2060
|
+
""" """
|
|
2061
|
+
...
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
@over
|
|
2065
|
+
def unot(b: uint8) -> bool:
|
|
2066
|
+
""" """
|
|
2067
|
+
...
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
@over
|
|
2071
|
+
def unot(b: int16) -> bool:
|
|
2072
|
+
""" """
|
|
2073
|
+
...
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
@over
|
|
2077
|
+
def unot(b: uint16) -> bool:
|
|
2078
|
+
""" """
|
|
2079
|
+
...
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+
@over
|
|
2083
|
+
def unot(b: int32) -> bool:
|
|
2084
|
+
""" """
|
|
2085
|
+
...
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
@over
|
|
2089
|
+
def unot(b: uint32) -> bool:
|
|
2090
|
+
""" """
|
|
2091
|
+
...
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
@over
|
|
2095
|
+
def unot(b: int64) -> bool:
|
|
2096
|
+
""" """
|
|
2097
|
+
...
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
@over
|
|
2101
|
+
def unot(b: uint64) -> bool:
|
|
2102
|
+
""" """
|
|
2103
|
+
...
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
@over
|
|
2107
|
+
def unot(a: Array[Any]) -> bool:
|
|
2108
|
+
""" """
|
|
2109
|
+
...
|