warp-lang 1.0.0b2__py3-none-manylinux2014_x86_64.whl → 1.0.0b6__py3-none-manylinux2014_x86_64.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.
Files changed (269) hide show
  1. docs/conf.py +17 -5
  2. examples/env/env_ant.py +1 -1
  3. examples/env/env_cartpole.py +1 -1
  4. examples/env/env_humanoid.py +1 -1
  5. examples/env/env_usd.py +4 -1
  6. examples/env/environment.py +8 -9
  7. examples/example_dem.py +34 -33
  8. examples/example_diffray.py +364 -337
  9. examples/example_fluid.py +32 -23
  10. examples/example_jacobian_ik.py +97 -93
  11. examples/example_marching_cubes.py +6 -16
  12. examples/example_mesh.py +6 -16
  13. examples/example_mesh_intersect.py +16 -14
  14. examples/example_nvdb.py +14 -16
  15. examples/example_raycast.py +14 -13
  16. examples/example_raymarch.py +16 -23
  17. examples/example_render_opengl.py +19 -10
  18. examples/example_sim_cartpole.py +82 -78
  19. examples/example_sim_cloth.py +45 -48
  20. examples/example_sim_fk_grad.py +51 -44
  21. examples/example_sim_fk_grad_torch.py +47 -40
  22. examples/example_sim_grad_bounce.py +108 -133
  23. examples/example_sim_grad_cloth.py +99 -113
  24. examples/example_sim_granular.py +5 -6
  25. examples/{example_sim_sdf_shape.py → example_sim_granular_collision_sdf.py} +37 -26
  26. examples/example_sim_neo_hookean.py +51 -55
  27. examples/example_sim_particle_chain.py +4 -4
  28. examples/example_sim_quadruped.py +126 -81
  29. examples/example_sim_rigid_chain.py +54 -61
  30. examples/example_sim_rigid_contact.py +66 -70
  31. examples/example_sim_rigid_fem.py +3 -3
  32. examples/example_sim_rigid_force.py +1 -1
  33. examples/example_sim_rigid_gyroscopic.py +3 -4
  34. examples/example_sim_rigid_kinematics.py +28 -39
  35. examples/example_sim_trajopt.py +112 -110
  36. examples/example_sph.py +9 -8
  37. examples/example_wave.py +7 -7
  38. examples/fem/bsr_utils.py +30 -17
  39. examples/fem/example_apic_fluid.py +85 -69
  40. examples/fem/example_convection_diffusion.py +97 -93
  41. examples/fem/example_convection_diffusion_dg.py +142 -149
  42. examples/fem/example_convection_diffusion_dg0.py +141 -136
  43. examples/fem/example_deformed_geometry.py +146 -0
  44. examples/fem/example_diffusion.py +115 -84
  45. examples/fem/example_diffusion_3d.py +116 -86
  46. examples/fem/example_diffusion_mgpu.py +102 -79
  47. examples/fem/example_mixed_elasticity.py +139 -100
  48. examples/fem/example_navier_stokes.py +175 -162
  49. examples/fem/example_stokes.py +143 -111
  50. examples/fem/example_stokes_transfer.py +186 -157
  51. examples/fem/mesh_utils.py +59 -97
  52. examples/fem/plot_utils.py +138 -17
  53. tools/ci/publishing/build_nodes_info.py +54 -0
  54. warp/__init__.py +4 -3
  55. warp/__init__.pyi +1 -0
  56. warp/bin/warp-clang.so +0 -0
  57. warp/bin/warp.so +0 -0
  58. warp/build.py +5 -3
  59. warp/build_dll.py +29 -9
  60. warp/builtins.py +836 -492
  61. warp/codegen.py +864 -553
  62. warp/config.py +3 -1
  63. warp/context.py +389 -172
  64. warp/fem/__init__.py +24 -6
  65. warp/fem/cache.py +318 -25
  66. warp/fem/dirichlet.py +7 -3
  67. warp/fem/domain.py +14 -0
  68. warp/fem/field/__init__.py +30 -38
  69. warp/fem/field/field.py +149 -0
  70. warp/fem/field/nodal_field.py +244 -138
  71. warp/fem/field/restriction.py +8 -6
  72. warp/fem/field/test.py +127 -59
  73. warp/fem/field/trial.py +117 -60
  74. warp/fem/geometry/__init__.py +5 -1
  75. warp/fem/geometry/deformed_geometry.py +271 -0
  76. warp/fem/geometry/element.py +24 -1
  77. warp/fem/geometry/geometry.py +86 -14
  78. warp/fem/geometry/grid_2d.py +112 -54
  79. warp/fem/geometry/grid_3d.py +134 -65
  80. warp/fem/geometry/hexmesh.py +953 -0
  81. warp/fem/geometry/partition.py +85 -33
  82. warp/fem/geometry/quadmesh_2d.py +532 -0
  83. warp/fem/geometry/tetmesh.py +451 -115
  84. warp/fem/geometry/trimesh_2d.py +197 -92
  85. warp/fem/integrate.py +534 -268
  86. warp/fem/operator.py +58 -31
  87. warp/fem/polynomial.py +11 -0
  88. warp/fem/quadrature/__init__.py +1 -1
  89. warp/fem/quadrature/pic_quadrature.py +150 -58
  90. warp/fem/quadrature/quadrature.py +209 -57
  91. warp/fem/space/__init__.py +230 -53
  92. warp/fem/space/basis_space.py +489 -0
  93. warp/fem/space/collocated_function_space.py +105 -0
  94. warp/fem/space/dof_mapper.py +49 -2
  95. warp/fem/space/function_space.py +90 -39
  96. warp/fem/space/grid_2d_function_space.py +149 -496
  97. warp/fem/space/grid_3d_function_space.py +173 -538
  98. warp/fem/space/hexmesh_function_space.py +352 -0
  99. warp/fem/space/partition.py +129 -76
  100. warp/fem/space/quadmesh_2d_function_space.py +369 -0
  101. warp/fem/space/restriction.py +46 -34
  102. warp/fem/space/shape/__init__.py +15 -0
  103. warp/fem/space/shape/cube_shape_function.py +738 -0
  104. warp/fem/space/shape/shape_function.py +103 -0
  105. warp/fem/space/shape/square_shape_function.py +611 -0
  106. warp/fem/space/shape/tet_shape_function.py +567 -0
  107. warp/fem/space/shape/triangle_shape_function.py +429 -0
  108. warp/fem/space/tetmesh_function_space.py +132 -1039
  109. warp/fem/space/topology.py +295 -0
  110. warp/fem/space/trimesh_2d_function_space.py +104 -742
  111. warp/fem/types.py +13 -11
  112. warp/fem/utils.py +335 -60
  113. warp/native/array.h +120 -34
  114. warp/native/builtin.h +101 -72
  115. warp/native/bvh.cpp +73 -325
  116. warp/native/bvh.cu +406 -23
  117. warp/native/bvh.h +22 -40
  118. warp/native/clang/clang.cpp +1 -0
  119. warp/native/crt.h +2 -0
  120. warp/native/cuda_util.cpp +8 -3
  121. warp/native/cuda_util.h +1 -0
  122. warp/native/exports.h +1522 -1243
  123. warp/native/intersect.h +19 -4
  124. warp/native/intersect_adj.h +8 -8
  125. warp/native/mat.h +76 -17
  126. warp/native/mesh.cpp +33 -108
  127. warp/native/mesh.cu +114 -18
  128. warp/native/mesh.h +395 -40
  129. warp/native/noise.h +272 -329
  130. warp/native/quat.h +51 -8
  131. warp/native/rand.h +44 -34
  132. warp/native/reduce.cpp +1 -1
  133. warp/native/sparse.cpp +4 -4
  134. warp/native/sparse.cu +163 -155
  135. warp/native/spatial.h +2 -2
  136. warp/native/temp_buffer.h +18 -14
  137. warp/native/vec.h +103 -21
  138. warp/native/warp.cpp +2 -1
  139. warp/native/warp.cu +28 -3
  140. warp/native/warp.h +4 -3
  141. warp/render/render_opengl.py +261 -109
  142. warp/sim/__init__.py +1 -2
  143. warp/sim/articulation.py +385 -185
  144. warp/sim/import_mjcf.py +59 -48
  145. warp/sim/import_urdf.py +15 -15
  146. warp/sim/import_usd.py +174 -102
  147. warp/sim/inertia.py +17 -18
  148. warp/sim/integrator_xpbd.py +4 -3
  149. warp/sim/model.py +330 -250
  150. warp/sim/render.py +1 -1
  151. warp/sparse.py +625 -152
  152. warp/stubs.py +341 -309
  153. warp/tape.py +9 -6
  154. warp/tests/__main__.py +3 -6
  155. warp/tests/assets/curlnoise_golden.npy +0 -0
  156. warp/tests/assets/pnoise_golden.npy +0 -0
  157. warp/tests/{test_class_kernel.py → aux_test_class_kernel.py} +9 -1
  158. warp/tests/aux_test_conditional_unequal_types_kernels.py +21 -0
  159. warp/tests/{test_dependent.py → aux_test_dependent.py} +2 -2
  160. warp/tests/{test_reference.py → aux_test_reference.py} +1 -1
  161. warp/tests/aux_test_unresolved_func.py +14 -0
  162. warp/tests/aux_test_unresolved_symbol.py +14 -0
  163. warp/tests/disabled_kinematics.py +239 -0
  164. warp/tests/run_coverage_serial.py +31 -0
  165. warp/tests/test_adam.py +103 -106
  166. warp/tests/test_arithmetic.py +94 -74
  167. warp/tests/test_array.py +82 -101
  168. warp/tests/test_array_reduce.py +57 -23
  169. warp/tests/test_atomic.py +64 -28
  170. warp/tests/test_bool.py +22 -12
  171. warp/tests/test_builtins_resolution.py +1292 -0
  172. warp/tests/test_bvh.py +18 -18
  173. warp/tests/test_closest_point_edge_edge.py +54 -57
  174. warp/tests/test_codegen.py +165 -134
  175. warp/tests/test_compile_consts.py +28 -20
  176. warp/tests/test_conditional.py +108 -24
  177. warp/tests/test_copy.py +10 -12
  178. warp/tests/test_ctypes.py +112 -88
  179. warp/tests/test_dense.py +21 -14
  180. warp/tests/test_devices.py +98 -0
  181. warp/tests/test_dlpack.py +75 -75
  182. warp/tests/test_examples.py +237 -0
  183. warp/tests/test_fabricarray.py +22 -24
  184. warp/tests/test_fast_math.py +15 -11
  185. warp/tests/test_fem.py +1034 -124
  186. warp/tests/test_fp16.py +23 -16
  187. warp/tests/test_func.py +187 -86
  188. warp/tests/test_generics.py +194 -49
  189. warp/tests/test_grad.py +123 -181
  190. warp/tests/test_grad_customs.py +176 -0
  191. warp/tests/test_hash_grid.py +35 -34
  192. warp/tests/test_import.py +10 -23
  193. warp/tests/test_indexedarray.py +24 -25
  194. warp/tests/test_intersect.py +18 -9
  195. warp/tests/test_large.py +141 -0
  196. warp/tests/test_launch.py +14 -41
  197. warp/tests/test_lerp.py +64 -65
  198. warp/tests/test_lvalue.py +493 -0
  199. warp/tests/test_marching_cubes.py +12 -13
  200. warp/tests/test_mat.py +517 -2898
  201. warp/tests/test_mat_lite.py +115 -0
  202. warp/tests/test_mat_scalar_ops.py +2889 -0
  203. warp/tests/test_math.py +103 -9
  204. warp/tests/test_matmul.py +304 -69
  205. warp/tests/test_matmul_lite.py +410 -0
  206. warp/tests/test_mesh.py +60 -22
  207. warp/tests/test_mesh_query_aabb.py +21 -25
  208. warp/tests/test_mesh_query_point.py +111 -22
  209. warp/tests/test_mesh_query_ray.py +12 -24
  210. warp/tests/test_mlp.py +30 -22
  211. warp/tests/test_model.py +92 -89
  212. warp/tests/test_modules_lite.py +39 -0
  213. warp/tests/test_multigpu.py +88 -114
  214. warp/tests/test_noise.py +12 -11
  215. warp/tests/test_operators.py +16 -20
  216. warp/tests/test_options.py +11 -11
  217. warp/tests/test_pinned.py +17 -18
  218. warp/tests/test_print.py +32 -11
  219. warp/tests/test_quat.py +275 -129
  220. warp/tests/test_rand.py +18 -16
  221. warp/tests/test_reload.py +38 -34
  222. warp/tests/test_rounding.py +50 -43
  223. warp/tests/test_runlength_encode.py +168 -20
  224. warp/tests/test_smoothstep.py +9 -11
  225. warp/tests/test_snippet.py +143 -0
  226. warp/tests/test_sparse.py +261 -63
  227. warp/tests/test_spatial.py +276 -243
  228. warp/tests/test_streams.py +110 -85
  229. warp/tests/test_struct.py +268 -63
  230. warp/tests/test_tape.py +39 -21
  231. warp/tests/test_torch.py +90 -86
  232. warp/tests/test_transient_module.py +10 -12
  233. warp/tests/test_types.py +363 -0
  234. warp/tests/test_utils.py +451 -0
  235. warp/tests/test_vec.py +354 -2050
  236. warp/tests/test_vec_lite.py +73 -0
  237. warp/tests/test_vec_scalar_ops.py +2099 -0
  238. warp/tests/test_volume.py +418 -376
  239. warp/tests/test_volume_write.py +124 -134
  240. warp/tests/unittest_serial.py +35 -0
  241. warp/tests/unittest_suites.py +291 -0
  242. warp/tests/unittest_utils.py +342 -0
  243. warp/tests/{test_misc.py → unused_test_misc.py} +13 -5
  244. warp/tests/{test_debug.py → walkthough_debug.py} +3 -17
  245. warp/thirdparty/appdirs.py +36 -45
  246. warp/thirdparty/unittest_parallel.py +589 -0
  247. warp/types.py +622 -211
  248. warp/utils.py +54 -393
  249. warp_lang-1.0.0b6.dist-info/METADATA +238 -0
  250. warp_lang-1.0.0b6.dist-info/RECORD +409 -0
  251. {warp_lang-1.0.0b2.dist-info → warp_lang-1.0.0b6.dist-info}/WHEEL +1 -1
  252. examples/example_cache_management.py +0 -40
  253. examples/example_multigpu.py +0 -54
  254. examples/example_struct.py +0 -65
  255. examples/fem/example_stokes_transfer_3d.py +0 -210
  256. warp/fem/field/discrete_field.py +0 -80
  257. warp/fem/space/nodal_function_space.py +0 -233
  258. warp/tests/test_all.py +0 -223
  259. warp/tests/test_array_scan.py +0 -60
  260. warp/tests/test_base.py +0 -208
  261. warp/tests/test_unresolved_func.py +0 -7
  262. warp/tests/test_unresolved_symbol.py +0 -7
  263. warp_lang-1.0.0b2.dist-info/METADATA +0 -26
  264. warp_lang-1.0.0b2.dist-info/RECORD +0 -378
  265. /warp/tests/{test_compile_consts_dummy.py → aux_test_compile_consts_dummy.py} +0 -0
  266. /warp/tests/{test_reference_reference.py → aux_test_reference_reference.py} +0 -0
  267. /warp/tests/{test_square.py → aux_test_square.py} +0 -0
  268. {warp_lang-1.0.0b2.dist-info → warp_lang-1.0.0b6.dist-info}/LICENSE.md +0 -0
  269. {warp_lang-1.0.0b2.dist-info → warp_lang-1.0.0b6.dist-info}/top_level.txt +0 -0
warp/stubs.py CHANGED
@@ -19,6 +19,8 @@ Matrix = Generic[Rows, Cols, Scalar]
19
19
  Quaternion = Generic[Float]
20
20
  Transformation = Generic[Float]
21
21
  Array = Generic[DType]
22
+ FabricArray = Generic[DType]
23
+ IndexedFabricArray = Generic[DType]
22
24
 
23
25
 
24
26
  from warp.types import array, array1d, array2d, array3d, array4d, constant
@@ -38,14 +40,15 @@ from warp.types import spatial_vector, spatial_vectorh, spatial_vectorf, spatial
38
40
  from warp.types import spatial_matrix, spatial_matrixh, spatial_matrixf, spatial_matrixd
39
41
 
40
42
  from warp.types import Bvh, Mesh, HashGrid, Volume, MarchingCubes
41
- from warp.types import bvh_query_t, mesh_query_aabb_t, hash_grid_query_t
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
+
42
45
 
43
46
  from warp.types import matmul, adj_matmul, batched_matmul, adj_batched_matmul, from_ptr
44
47
 
45
48
  from warp.types import vector as vec
46
49
  from warp.types import matrix as mat
47
50
 
48
- from warp.context import init, func, func_grad, func_replay, kernel, struct, overload
51
+ from warp.context import init, func, func_grad, func_replay, func_native, kernel, struct, overload
49
52
  from warp.context import is_cpu_available, is_cuda_available, is_device_available
50
53
  from warp.context import get_devices, get_preferred_device
51
54
  from warp.context import get_cuda_devices, get_cuda_device_count, get_cuda_device, map_cuda_device, unmap_cuda_device
@@ -67,7 +70,6 @@ from warp.context import (
67
70
  )
68
71
  from warp.context import set_module_options, get_module_options, get_module
69
72
  from warp.context import capture_begin, capture_end, capture_launch
70
- from warp.context import print_builtins, export_builtins, export_stubs
71
73
  from warp.context import Kernel, Function, Launch
72
74
  from warp.context import Stream, get_stream, set_stream, synchronize_stream
73
75
  from warp.context import Event, record_event, wait_event, wait_stream
@@ -106,7 +108,7 @@ def min(x: Scalar, y: Scalar) -> Scalar:
106
108
  @over
107
109
  def min(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
108
110
  """
109
- Return the element wise minimum of two vectors.
111
+ Return the element-wise minimum of two vectors.
110
112
  """
111
113
  ...
112
114
 
@@ -114,7 +116,7 @@ def min(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
114
116
  @over
115
117
  def min(v: Vector[Any, Scalar]) -> Scalar:
116
118
  """
117
- Return the minimum element of a vector.
119
+ Return the minimum element of a vector ``v``.
118
120
  """
119
121
  ...
120
122
 
@@ -130,7 +132,7 @@ def max(x: Scalar, y: Scalar) -> Scalar:
130
132
  @over
131
133
  def max(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
132
134
  """
133
- Return the element wise maximum of two vectors.
135
+ Return the element-wise maximum of two vectors.
134
136
  """
135
137
  ...
136
138
 
@@ -138,7 +140,7 @@ def max(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
138
140
  @over
139
141
  def max(v: Vector[Any, Scalar]) -> Scalar:
140
142
  """
141
- Return the maximum element of a vector.
143
+ Return the maximum element of a vector ``v``.
142
144
  """
143
145
  ...
144
146
 
@@ -146,7 +148,7 @@ def max(v: Vector[Any, Scalar]) -> Scalar:
146
148
  @over
147
149
  def clamp(x: Scalar, a: Scalar, b: Scalar) -> Scalar:
148
150
  """
149
- Clamp the value of x to the range [a, b].
151
+ Clamp the value of ``x`` to the range [a, b].
150
152
  """
151
153
  ...
152
154
 
@@ -154,7 +156,7 @@ def clamp(x: Scalar, a: Scalar, b: Scalar) -> Scalar:
154
156
  @over
155
157
  def abs(x: Scalar) -> Scalar:
156
158
  """
157
- Return the absolute value of x.
159
+ Return the absolute value of ``x``.
158
160
  """
159
161
  ...
160
162
 
@@ -162,7 +164,7 @@ def abs(x: Scalar) -> Scalar:
162
164
  @over
163
165
  def sign(x: Scalar) -> Scalar:
164
166
  """
165
- Return -1 if x < 0, return 1 otherwise.
167
+ Return -1 if ``x`` < 0, return 1 otherwise.
166
168
  """
167
169
  ...
168
170
 
@@ -170,7 +172,7 @@ def sign(x: Scalar) -> Scalar:
170
172
  @over
171
173
  def step(x: Scalar) -> Scalar:
172
174
  """
173
- Return 1.0 if x < 0.0, return 0.0 otherwise.
175
+ Return 1.0 if ``x`` < 0.0, return 0.0 otherwise.
174
176
  """
175
177
  ...
176
178
 
@@ -178,7 +180,7 @@ def step(x: Scalar) -> Scalar:
178
180
  @over
179
181
  def nonzero(x: Scalar) -> Scalar:
180
182
  """
181
- Return 1.0 if x is not equal to zero, return 0.0 otherwise.
183
+ Return 1.0 if ``x`` is not equal to zero, return 0.0 otherwise.
182
184
  """
183
185
  ...
184
186
 
@@ -186,7 +188,7 @@ def nonzero(x: Scalar) -> Scalar:
186
188
  @over
187
189
  def sin(x: Float) -> Float:
188
190
  """
189
- Return the sine of x in radians.
191
+ Return the sine of ``x`` in radians.
190
192
  """
191
193
  ...
192
194
 
@@ -194,7 +196,7 @@ def sin(x: Float) -> Float:
194
196
  @over
195
197
  def cos(x: Float) -> Float:
196
198
  """
197
- Return the cosine of x in radians.
199
+ Return the cosine of ``x`` in radians.
198
200
  """
199
201
  ...
200
202
 
@@ -202,7 +204,7 @@ def cos(x: Float) -> Float:
202
204
  @over
203
205
  def acos(x: Float) -> Float:
204
206
  """
205
- Return arccos of x in radians. Inputs are automatically clamped to [-1.0, 1.0].
207
+ Return arccos of ``x`` in radians. Inputs are automatically clamped to [-1.0, 1.0].
206
208
  """
207
209
  ...
208
210
 
@@ -210,7 +212,7 @@ def acos(x: Float) -> Float:
210
212
  @over
211
213
  def asin(x: Float) -> Float:
212
214
  """
213
- Return arcsin of x in radians. Inputs are automatically clamped to [-1.0, 1.0].
215
+ Return arcsin of ``x`` in radians. Inputs are automatically clamped to [-1.0, 1.0].
214
216
  """
215
217
  ...
216
218
 
@@ -218,7 +220,15 @@ def asin(x: Float) -> Float:
218
220
  @over
219
221
  def sqrt(x: Float) -> Float:
220
222
  """
221
- Return the sqrt of x, where x is positive.
223
+ Return the square root of ``x``, where ``x`` is positive.
224
+ """
225
+ ...
226
+
227
+
228
+ @over
229
+ def cbrt(x: Float) -> Float:
230
+ """
231
+ Return the cube root of ``x``.
222
232
  """
223
233
  ...
224
234
 
@@ -226,7 +236,7 @@ def sqrt(x: Float) -> Float:
226
236
  @over
227
237
  def tan(x: Float) -> Float:
228
238
  """
229
- Return tangent of x in radians.
239
+ Return the tangent of ``x`` in radians.
230
240
  """
231
241
  ...
232
242
 
@@ -234,7 +244,7 @@ def tan(x: Float) -> Float:
234
244
  @over
235
245
  def atan(x: Float) -> Float:
236
246
  """
237
- Return arctan of x.
247
+ Return the arctangent of ``x`` in radians.
238
248
  """
239
249
  ...
240
250
 
@@ -242,7 +252,7 @@ def atan(x: Float) -> Float:
242
252
  @over
243
253
  def atan2(y: Float, x: Float) -> Float:
244
254
  """
245
- Return atan2 of x.
255
+ Return the 2-argument arctangent, atan2, of the point ``(x, y)`` in radians.
246
256
  """
247
257
  ...
248
258
 
@@ -250,7 +260,7 @@ def atan2(y: Float, x: Float) -> Float:
250
260
  @over
251
261
  def sinh(x: Float) -> Float:
252
262
  """
253
- Return the sinh of x.
263
+ Return the sinh of ``x``.
254
264
  """
255
265
  ...
256
266
 
@@ -258,7 +268,7 @@ def sinh(x: Float) -> Float:
258
268
  @over
259
269
  def cosh(x: Float) -> Float:
260
270
  """
261
- Return the cosh of x.
271
+ Return the cosh of ``x``.
262
272
  """
263
273
  ...
264
274
 
@@ -266,7 +276,7 @@ def cosh(x: Float) -> Float:
266
276
  @over
267
277
  def tanh(x: Float) -> Float:
268
278
  """
269
- Return the tanh of x.
279
+ Return the tanh of ``x``.
270
280
  """
271
281
  ...
272
282
 
@@ -274,7 +284,7 @@ def tanh(x: Float) -> Float:
274
284
  @over
275
285
  def degrees(x: Float) -> Float:
276
286
  """
277
- Convert radians into degrees.
287
+ Convert ``x`` from radians into degrees.
278
288
  """
279
289
  ...
280
290
 
@@ -282,7 +292,7 @@ def degrees(x: Float) -> Float:
282
292
  @over
283
293
  def radians(x: Float) -> Float:
284
294
  """
285
- Convert degrees into radians.
295
+ Convert ``x`` from degrees into radians.
286
296
  """
287
297
  ...
288
298
 
@@ -290,7 +300,7 @@ def radians(x: Float) -> Float:
290
300
  @over
291
301
  def log(x: Float) -> Float:
292
302
  """
293
- Return the natural log (base-e) of x, where x is positive.
303
+ Return the natural logarithm (base-e) of ``x``, where ``x`` is positive.
294
304
  """
295
305
  ...
296
306
 
@@ -298,7 +308,7 @@ def log(x: Float) -> Float:
298
308
  @over
299
309
  def log2(x: Float) -> Float:
300
310
  """
301
- Return the natural log (base-2) of x, where x is positive.
311
+ Return the binary logarithm (base-2) of ``x``, where ``x`` is positive.
302
312
  """
303
313
  ...
304
314
 
@@ -306,7 +316,7 @@ def log2(x: Float) -> Float:
306
316
  @over
307
317
  def log10(x: Float) -> Float:
308
318
  """
309
- Return the natural log (base-10) of x, where x is positive.
319
+ Return the common logarithm (base-10) of ``x``, where ``x`` is positive.
310
320
  """
311
321
  ...
312
322
 
@@ -314,7 +324,7 @@ def log10(x: Float) -> Float:
314
324
  @over
315
325
  def exp(x: Float) -> Float:
316
326
  """
317
- Return base-e exponential, e^x.
327
+ Return the value of the exponential function :math:`e^x`.
318
328
  """
319
329
  ...
320
330
 
@@ -322,7 +332,7 @@ def exp(x: Float) -> Float:
322
332
  @over
323
333
  def pow(x: Float, y: Float) -> Float:
324
334
  """
325
- Return the result of x raised to power of y.
335
+ Return the result of ``x`` raised to power of ``y``.
326
336
  """
327
337
  ...
328
338
 
@@ -330,9 +340,9 @@ def pow(x: Float, y: Float) -> Float:
330
340
  @over
331
341
  def round(x: Float) -> Float:
332
342
  """
333
- Calculate the nearest integer value, rounding halfway cases away from zero.
334
- This is the most intuitive form of rounding in the colloquial sense, but can be slower than other options like ``warp.rint()``.
335
- Differs from ``numpy.round()``, which behaves the same way as ``numpy.rint()``.
343
+ Return the nearest integer value to ``x``, rounding halfway cases away from zero.
344
+ This is the most intuitive form of rounding in the colloquial sense, but can be slower than other options like :func:`warp.rint()`.
345
+ Differs from :func:`numpy.round()`, which behaves the same way as :func:`numpy.rint()`.
336
346
  """
337
347
  ...
338
348
 
@@ -340,9 +350,8 @@ def round(x: Float) -> Float:
340
350
  @over
341
351
  def rint(x: Float) -> Float:
342
352
  """
343
- Calculate the nearest integer value, rounding halfway cases to nearest even integer.
344
- It is generally faster than ``warp.round()``.
345
- Equivalent to ``numpy.rint()``.
353
+ Return the nearest integer value to ``x``, rounding halfway cases to nearest even integer.
354
+ It is generally faster than :func:`warp.round()`. Equivalent to :func:`numpy.rint()`.
346
355
  """
347
356
  ...
348
357
 
@@ -350,10 +359,10 @@ def rint(x: Float) -> Float:
350
359
  @over
351
360
  def trunc(x: Float) -> Float:
352
361
  """
353
- Calculate the nearest integer that is closer to zero than x.
354
- In other words, it discards the fractional part of x.
355
- It is similar to casting ``float(int(x))``, but preserves the negative sign when x is in the range [-0.0, -1.0).
356
- Equivalent to ``numpy.trunc()`` and ``numpy.fix()``.
362
+ Return the nearest integer that is closer to zero than ``x``.
363
+ In other words, it discards the fractional part of ``x``.
364
+ It is similar to casting ``float(int(x))``, but preserves the negative sign when x is in the range [-0.0, -1.0).
365
+ Equivalent to :func:`numpy.trunc()` and :func:`numpy.fix()`.
357
366
  """
358
367
  ...
359
368
 
@@ -361,7 +370,7 @@ def trunc(x: Float) -> Float:
361
370
  @over
362
371
  def floor(x: Float) -> Float:
363
372
  """
364
- Calculate the largest integer that is less than or equal to x.
373
+ Return the largest integer that is less than or equal to ``x``.
365
374
  """
366
375
  ...
367
376
 
@@ -369,7 +378,16 @@ def floor(x: Float) -> Float:
369
378
  @over
370
379
  def ceil(x: Float) -> Float:
371
380
  """
372
- Calculate the smallest integer that is greater than or equal to x.
381
+ Return the smallest integer that is greater than or equal to ``x``.
382
+ """
383
+ ...
384
+
385
+
386
+ @over
387
+ def frac(x: Float) -> Float:
388
+ """
389
+ Retrieve the fractional part of x.
390
+ In other words, it discards the integer part of x and is equivalent to ``x - trunc(x)``.
373
391
  """
374
392
  ...
375
393
 
@@ -401,7 +419,7 @@ def ddot(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Scalar:
401
419
  @over
402
420
  def argmin(v: Vector[Any, Scalar]) -> uint32:
403
421
  """
404
- Return the index of the minimum element of a vector.
422
+ Return the index of the minimum element of a vector ``v``.
405
423
  """
406
424
  ...
407
425
 
@@ -409,7 +427,7 @@ def argmin(v: Vector[Any, Scalar]) -> uint32:
409
427
  @over
410
428
  def argmax(v: Vector[Any, Scalar]) -> uint32:
411
429
  """
412
- Return the index of the maximum element of a vector.
430
+ Return the index of the maximum element of a vector ``v``.
413
431
  """
414
432
  ...
415
433
 
@@ -417,7 +435,7 @@ def argmax(v: Vector[Any, Scalar]) -> uint32:
417
435
  @over
418
436
  def outer(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Matrix[Any, Any, Scalar]:
419
437
  """
420
- Compute the outer product x*y^T for two vec2 objects.
438
+ Compute the outer product ``x*y^T`` for two vectors.
421
439
  """
422
440
  ...
423
441
 
@@ -425,7 +443,7 @@ def outer(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Matrix[Any, Any, Sc
425
443
  @over
426
444
  def cross(x: Vector[3, Scalar], y: Vector[3, Scalar]) -> Vector[3, Scalar]:
427
445
  """
428
- Compute the cross product of two 3d vectors.
446
+ Compute the cross product of two 3D vectors.
429
447
  """
430
448
  ...
431
449
 
@@ -433,7 +451,7 @@ def cross(x: Vector[3, Scalar], y: Vector[3, Scalar]) -> Vector[3, Scalar]:
433
451
  @over
434
452
  def skew(x: Vector[3, Scalar]):
435
453
  """
436
- Compute the skew symmetric matrix for a 3d vector.
454
+ Compute the skew-symmetric 3x3 matrix for a 3D vector ``x``.
437
455
  """
438
456
  ...
439
457
 
@@ -441,7 +459,7 @@ def skew(x: Vector[3, Scalar]):
441
459
  @over
442
460
  def length(x: Vector[Any, Float]) -> Scalar:
443
461
  """
444
- Compute the length of a vector.
462
+ Compute the length of a vector ``x``.
445
463
  """
446
464
  ...
447
465
 
@@ -449,7 +467,7 @@ def length(x: Vector[Any, Float]) -> Scalar:
449
467
  @over
450
468
  def length(x: Quaternion[Float]) -> Scalar:
451
469
  """
452
- Compute the length of a quaternion.
470
+ Compute the length of a quaternion ``x``.
453
471
  """
454
472
  ...
455
473
 
@@ -457,7 +475,7 @@ def length(x: Quaternion[Float]) -> Scalar:
457
475
  @over
458
476
  def length_sq(x: Vector[Any, Scalar]) -> Scalar:
459
477
  """
460
- Compute the squared length of a 2d vector.
478
+ Compute the squared length of a 2D vector ``x``.
461
479
  """
462
480
  ...
463
481
 
@@ -465,7 +483,7 @@ def length_sq(x: Vector[Any, Scalar]) -> Scalar:
465
483
  @over
466
484
  def length_sq(x: Quaternion[Scalar]) -> Scalar:
467
485
  """
468
- Compute the squared length of a quaternion.
486
+ Compute the squared length of a quaternion ``x``.
469
487
  """
470
488
  ...
471
489
 
@@ -473,7 +491,7 @@ def length_sq(x: Quaternion[Scalar]) -> Scalar:
473
491
  @over
474
492
  def normalize(x: Vector[Any, Float]) -> Vector[Any, Scalar]:
475
493
  """
476
- Compute the normalized value of x, if length(x) is 0 then the zero vector is returned.
494
+ Compute the normalized value of ``x``. If ``length(x)`` is 0 then the zero vector is returned.
477
495
  """
478
496
  ...
479
497
 
@@ -481,7 +499,7 @@ def normalize(x: Vector[Any, Float]) -> Vector[Any, Scalar]:
481
499
  @over
482
500
  def normalize(x: Quaternion[Float]) -> Quaternion[Scalar]:
483
501
  """
484
- Compute the normalized value of x, if length(x) is 0 then the zero quat is returned.
502
+ Compute the normalized value of ``x``. If ``length(x)`` is 0, then the zero quaternion is returned.
485
503
  """
486
504
  ...
487
505
 
@@ -489,7 +507,7 @@ def normalize(x: Quaternion[Float]) -> Quaternion[Scalar]:
489
507
  @over
490
508
  def transpose(m: Matrix[Any, Any, Scalar]):
491
509
  """
492
- Return the transpose of the matrix m
510
+ Return the transpose of the matrix ``m``.
493
511
  """
494
512
  ...
495
513
 
@@ -497,7 +515,7 @@ def transpose(m: Matrix[Any, Any, Scalar]):
497
515
  @over
498
516
  def inverse(m: Matrix[2, 2, Float]) -> Matrix[Any, Any, Float]:
499
517
  """
500
- Return the inverse of a 2x2 matrix m
518
+ Return the inverse of a 2x2 matrix ``m``.
501
519
  """
502
520
  ...
503
521
 
@@ -505,7 +523,7 @@ def inverse(m: Matrix[2, 2, Float]) -> Matrix[Any, Any, Float]:
505
523
  @over
506
524
  def inverse(m: Matrix[3, 3, Float]) -> Matrix[Any, Any, Float]:
507
525
  """
508
- Return the inverse of a 3x3 matrix m
526
+ Return the inverse of a 3x3 matrix ``m``.
509
527
  """
510
528
  ...
511
529
 
@@ -513,7 +531,7 @@ def inverse(m: Matrix[3, 3, Float]) -> Matrix[Any, Any, Float]:
513
531
  @over
514
532
  def inverse(m: Matrix[4, 4, Float]) -> Matrix[Any, Any, Float]:
515
533
  """
516
- Return the inverse of a 4x4 matrix m
534
+ Return the inverse of a 4x4 matrix ``m``.
517
535
  """
518
536
  ...
519
537
 
@@ -521,7 +539,7 @@ def inverse(m: Matrix[4, 4, Float]) -> Matrix[Any, Any, Float]:
521
539
  @over
522
540
  def determinant(m: Matrix[2, 2, Float]) -> Scalar:
523
541
  """
524
- Return the determinant of a 2x2 matrix m
542
+ Return the determinant of a 2x2 matrix ``m``.
525
543
  """
526
544
  ...
527
545
 
@@ -529,7 +547,7 @@ def determinant(m: Matrix[2, 2, Float]) -> Scalar:
529
547
  @over
530
548
  def determinant(m: Matrix[3, 3, Float]) -> Scalar:
531
549
  """
532
- Return the determinant of a 3x3 matrix m
550
+ Return the determinant of a 3x3 matrix ``m``.
533
551
  """
534
552
  ...
535
553
 
@@ -537,7 +555,7 @@ def determinant(m: Matrix[3, 3, Float]) -> Scalar:
537
555
  @over
538
556
  def determinant(m: Matrix[4, 4, Float]) -> Scalar:
539
557
  """
540
- Return the determinant of a 4x4 matrix m
558
+ Return the determinant of a 4x4 matrix ``m``.
541
559
  """
542
560
  ...
543
561
 
@@ -545,7 +563,7 @@ def determinant(m: Matrix[4, 4, Float]) -> Scalar:
545
563
  @over
546
564
  def trace(m: Matrix[Any, Any, Scalar]) -> Scalar:
547
565
  """
548
- Return the trace of the matrix m
566
+ Return the trace of the matrix ``m``.
549
567
  """
550
568
  ...
551
569
 
@@ -553,7 +571,7 @@ def trace(m: Matrix[Any, Any, Scalar]) -> Scalar:
553
571
  @over
554
572
  def diag(d: Vector[Any, Scalar]) -> Matrix[Any, Any, Scalar]:
555
573
  """
556
- Returns a matrix with the components of the vector d on the diagonal
574
+ Returns a matrix with the components of the vector ``d`` on the diagonal.
557
575
  """
558
576
  ...
559
577
 
@@ -561,7 +579,7 @@ def diag(d: Vector[Any, Scalar]) -> Matrix[Any, Any, Scalar]:
561
579
  @over
562
580
  def get_diag(m: Matrix[Any, Any, Scalar]) -> Vector[Any, Scalar]:
563
581
  """
564
- Returns a vector containing the diagonal elements of the square matrix.
582
+ Returns a vector containing the diagonal elements of the square matrix ``m``.
565
583
  """
566
584
  ...
567
585
 
@@ -569,7 +587,7 @@ def get_diag(m: Matrix[Any, Any, Scalar]) -> Vector[Any, Scalar]:
569
587
  @over
570
588
  def cw_mul(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
571
589
  """
572
- Component wise multiply of two 2d vectors.
590
+ Component-wise multiplication of two 2D vectors.
573
591
  """
574
592
  ...
575
593
 
@@ -577,7 +595,7 @@ def cw_mul(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar
577
595
  @over
578
596
  def cw_mul(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
579
597
  """
580
- Component wise multiply of two 2d vectors.
598
+ Component-wise multiplication of two 2D vectors.
581
599
  """
582
600
  ...
583
601
 
@@ -585,7 +603,7 @@ def cw_mul(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[A
585
603
  @over
586
604
  def cw_div(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar]:
587
605
  """
588
- Component wise division of two 2d vectors.
606
+ Component-wise division of two 2D vectors.
589
607
  """
590
608
  ...
591
609
 
@@ -593,7 +611,7 @@ def cw_div(x: Vector[Any, Scalar], y: Vector[Any, Scalar]) -> Vector[Any, Scalar
593
611
  @over
594
612
  def cw_div(x: Matrix[Any, Any, Scalar], y: Matrix[Any, Any, Scalar]) -> Matrix[Any, Any, Scalar]:
595
613
  """
596
- Component wise division of two 2d vectors.
614
+ Component-wise division of two 2D vectors.
597
615
  """
598
616
  ...
599
617
 
@@ -657,7 +675,7 @@ def quat_rotate(q: Quaternion[Float], p: Vector[3, Float]) -> Vector[3, Scalar]:
657
675
  @over
658
676
  def quat_rotate_inv(q: Quaternion[Float], p: Vector[3, Float]) -> Vector[3, Scalar]:
659
677
  """
660
- Rotate a vector the inverse of a quaternion.
678
+ Rotate a vector by the inverse of a quaternion.
661
679
  """
662
680
  ...
663
681
 
@@ -689,7 +707,7 @@ def transform_identity() -> transformf:
689
707
  @over
690
708
  def transform_get_translation(t: Transformation[Float]) -> Vector[3, Scalar]:
691
709
  """
692
- Return the translational part of a transform.
710
+ Return the translational part of a transform ``t``.
693
711
  """
694
712
  ...
695
713
 
@@ -697,7 +715,7 @@ def transform_get_translation(t: Transformation[Float]) -> Vector[3, Scalar]:
697
715
  @over
698
716
  def transform_get_rotation(t: Transformation[Float]) -> Quaternion[Scalar]:
699
717
  """
700
- Return the rotational part of a transform.
718
+ Return the rotational part of a transform ``t``.
701
719
  """
702
720
  ...
703
721
 
@@ -713,7 +731,7 @@ def transform_multiply(a: Transformation[Float], b: Transformation[Float]) -> Tr
713
731
  @over
714
732
  def transform_point(t: Transformation[Scalar], p: Vector[3, Scalar]) -> Vector[3, Scalar]:
715
733
  """
716
- Apply the transform to a point p treating the homogenous coordinate as w=1 (translation and rotation).
734
+ Apply the transform to a point ``p`` treating the homogenous coordinate as w=1 (translation and rotation).
717
735
  """
718
736
  ...
719
737
 
@@ -721,9 +739,11 @@ def transform_point(t: Transformation[Scalar], p: Vector[3, Scalar]) -> Vector[3
721
739
  @over
722
740
  def transform_point(m: Matrix[4, 4, Scalar], p: Vector[3, Scalar]) -> Vector[3, Scalar]:
723
741
  """
724
- Apply the transform to a point ``p`` treating the homogenous coordinate as w=1. The transformation is applied treating ``p`` as a column vector, e.g.: ``y = M*p``
725
- note this is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = p^T*M^T``. If the transform is coming from a library that uses row-vectors
726
- then users should transpose the transformation matrix before calling this method.
742
+ Apply the transform to a point ``p`` treating the homogenous coordinate as w=1.
743
+ The transformation is applied treating ``p`` as a column vector, e.g.: ``y = M*p``.
744
+ Note this is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = p^T*M^T``.
745
+ If the transform is coming from a library that uses row-vectors, then users should transpose the transformation
746
+ matrix before calling this method.
727
747
  """
728
748
  ...
729
749
 
@@ -731,7 +751,7 @@ def transform_point(m: Matrix[4, 4, Scalar], p: Vector[3, Scalar]) -> Vector[3,
731
751
  @over
732
752
  def transform_vector(t: Transformation[Scalar], v: Vector[3, Scalar]) -> Vector[3, Scalar]:
733
753
  """
734
- Apply the transform to a vector v treating the homogenous coordinate as w=0 (rotation only).
754
+ Apply the transform to a vector ``v`` treating the homogenous coordinate as w=0 (rotation only).
735
755
  """
736
756
  ...
737
757
 
@@ -739,9 +759,11 @@ def transform_vector(t: Transformation[Scalar], v: Vector[3, Scalar]) -> Vector[
739
759
  @over
740
760
  def transform_vector(m: Matrix[4, 4, Scalar], v: Vector[3, Scalar]) -> Vector[3, Scalar]:
741
761
  """
742
- Apply the transform to a vector ``v`` treating the homogenous coordinate as w=0. The transformation is applied treating ``v`` as a column vector, e.g.: ``y = M*v``
743
- note this is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = v^T*M^T``. If the transform is coming from a library that uses row-vectors
744
- then users should transpose the transformation matrix before calling this method.
762
+ Apply the transform to a vector ``v`` treating the homogenous coordinate as w=0.
763
+ The transformation is applied treating ``v`` as a column vector, e.g.: ``y = M*v``
764
+ note this is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = v^T*M^T``.
765
+ If the transform is coming from a library that uses row-vectors, then users should transpose the transformation
766
+ matrix before calling this method.
745
767
  """
746
768
  ...
747
769
 
@@ -749,7 +771,7 @@ def transform_vector(m: Matrix[4, 4, Scalar], v: Vector[3, Scalar]) -> Vector[3,
749
771
  @over
750
772
  def transform_inverse(t: Transformation[Float]) -> Transformation[Float]:
751
773
  """
752
- Compute the inverse of the transform.
774
+ Compute the inverse of the transformation ``t``.
753
775
  """
754
776
  ...
755
777
 
@@ -757,7 +779,7 @@ def transform_inverse(t: Transformation[Float]) -> Transformation[Float]:
757
779
  @over
758
780
  def spatial_dot(a: Vector[6, Float], b: Vector[6, Float]) -> Scalar:
759
781
  """
760
- Compute the dot product of two 6d screw vectors.
782
+ Compute the dot product of two 6D screw vectors.
761
783
  """
762
784
  ...
763
785
 
@@ -765,7 +787,7 @@ def spatial_dot(a: Vector[6, Float], b: Vector[6, Float]) -> Scalar:
765
787
  @over
766
788
  def spatial_cross(a: Vector[6, Float], b: Vector[6, Float]) -> Vector[6, Float]:
767
789
  """
768
- Compute the cross-product of two 6d screw vectors.
790
+ Compute the cross product of two 6D screw vectors.
769
791
  """
770
792
  ...
771
793
 
@@ -773,7 +795,7 @@ def spatial_cross(a: Vector[6, Float], b: Vector[6, Float]) -> Vector[6, Float]:
773
795
  @over
774
796
  def spatial_cross_dual(a: Vector[6, Float], b: Vector[6, Float]) -> Vector[6, Float]:
775
797
  """
776
- Compute the dual cross-product of two 6d screw vectors.
798
+ Compute the dual cross product of two 6D screw vectors.
777
799
  """
778
800
  ...
779
801
 
@@ -781,7 +803,7 @@ def spatial_cross_dual(a: Vector[6, Float], b: Vector[6, Float]) -> Vector[6, Fl
781
803
  @over
782
804
  def spatial_top(a: Vector[6, Float]):
783
805
  """
784
- Return the top (first) part of a 6d screw vector.
806
+ Return the top (first) part of a 6D screw vector.
785
807
  """
786
808
  ...
787
809
 
@@ -789,7 +811,7 @@ def spatial_top(a: Vector[6, Float]):
789
811
  @over
790
812
  def spatial_bottom(a: Vector[6, Float]):
791
813
  """
792
- Return the bottom (second) part of a 6d screw vector.
814
+ Return the bottom (second) part of a 6D screw vector.
793
815
  """
794
816
  ...
795
817
 
@@ -831,11 +853,13 @@ def mlp(
831
853
  :param weights: A layer's network weights with dimensions ``(m, n)``.
832
854
  :param bias: An array with dimensions ``(n)``.
833
855
  :param activation: A ``wp.func`` function that takes a single scalar float as input and returns a scalar float as output
834
- :param index: The batch item to process, typically each thread will process 1 item in the batch, in this case index should be ``wp.tid()``
856
+ :param index: The batch item to process, typically each thread will process one item in the batch, in which case
857
+ index should be ``wp.tid()``
835
858
  :param x: The feature matrix with dimensions ``(n, b)``
836
859
  :param out: The network output with dimensions ``(m, b)``
837
860
 
838
- :note: Feature and output matrices are transposed compared to some other frameworks such as PyTorch. All matrices are assumed to be stored in flattened row-major memory layout (NumPy default).
861
+ :note: Feature and output matrices are transposed compared to some other frameworks such as PyTorch.
862
+ All matrices are assumed to be stored in flattened row-major memory layout (NumPy default).
839
863
  """
840
864
  ...
841
865
 
@@ -843,12 +867,12 @@ def mlp(
843
867
  @over
844
868
  def bvh_query_aabb(id: uint64, lower: vec3f, upper: vec3f) -> bvh_query_t:
845
869
  """
846
- Construct an axis-aligned bounding box query against a bvh object. This query can be used to iterate over all bounds
847
- inside a bvh. Returns an object that is used to track state during bvh traversal.
870
+ Construct an axis-aligned bounding box query against a BVH object. This query can be used to iterate over all bounds
871
+ inside a BVH.
848
872
 
849
- :param id: The bvh identifier
850
- :param lower: The lower bound of the bounding box in bvh space
851
- :param upper: The upper bound of the bounding box in bvh space
873
+ :param id: The BVH identifier
874
+ :param lower: The lower bound of the bounding box in BVH space
875
+ :param upper: The upper bound of the bounding box in BVH space
852
876
  """
853
877
  ...
854
878
 
@@ -856,12 +880,12 @@ def bvh_query_aabb(id: uint64, lower: vec3f, upper: vec3f) -> bvh_query_t:
856
880
  @over
857
881
  def bvh_query_ray(id: uint64, start: vec3f, dir: vec3f) -> bvh_query_t:
858
882
  """
859
- Construct a ray query against a bvh object. This query can be used to iterate over all bounds
860
- that intersect the ray. Returns an object that is used to track state during bvh traversal.
883
+ Construct a ray query against a BVH object. This query can be used to iterate over all bounds
884
+ that intersect the ray.
861
885
 
862
- :param id: The bvh identifier
863
- :param start: The start of the ray in bvh space
864
- :param dir: The direction of the ray in bvh space
886
+ :param id: The BVH identifier
887
+ :param start: The start of the ray in BVH space
888
+ :param dir: The direction of the ray in BVH space
865
889
  """
866
890
  ...
867
891
 
@@ -869,141 +893,105 @@ def bvh_query_ray(id: uint64, start: vec3f, dir: vec3f) -> bvh_query_t:
869
893
  @over
870
894
  def bvh_query_next(query: bvh_query_t, index: int32) -> bool:
871
895
  """
872
- Move to the next bound returned by the query. The index of the current bound is stored in ``index``, returns ``False``
873
- if there are no more overlapping bound.
896
+ Move to the next bound returned by the query.
897
+ The index of the current bound is stored in ``index``, returns ``False`` if there are no more overlapping bound.
874
898
  """
875
899
  ...
876
900
 
877
901
 
878
902
  @over
879
- def mesh_query_point(
880
- id: uint64, point: vec3f, max_dist: float32, inside: float32, face: int32, bary_u: float32, bary_v: float32
881
- ) -> bool:
903
+ def mesh_query_point(id: uint64, point: vec3f, max_dist: float32) -> mesh_query_point_t:
882
904
  """
883
- Computes the closest point on the mesh with identifier `id` to the given point in space. Returns ``True`` if a point < ``max_dist`` is found.
905
+ Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given ``point`` in space.
884
906
 
885
- Identifies the sign of the distance using additional ray-casts to determine if the point is inside or outside. This method is relatively robust, but
886
- does increase computational cost. See below for additional sign determination methods.
907
+ Identifies the sign of the distance using additional ray-casts to determine if the point is inside or outside.
908
+ This method is relatively robust, but does increase computational cost.
909
+ See below for additional sign determination methods.
887
910
 
888
911
  :param id: The mesh identifier
889
912
  :param point: The point in space to query
890
913
  :param max_dist: Mesh faces above this distance will not be considered by the query
891
- :param inside: Returns a value < 0 if query point is inside the mesh, >=0 otherwise. Note that mesh must be watertight for this to be robust
892
- :param face: Returns the index of the closest face
893
- :param bary_u: Returns the barycentric u coordinate of the closest point
894
- :param bary_v: Returns the barycentric v coordinate of the closest point
895
914
  """
896
915
  ...
897
916
 
898
917
 
899
918
  @over
900
- def mesh_query_point_no_sign(
901
- id: uint64, point: vec3f, max_dist: float32, face: int32, bary_u: float32, bary_v: float32
902
- ) -> bool:
919
+ def mesh_query_point_no_sign(id: uint64, point: vec3f, max_dist: float32) -> mesh_query_point_t:
903
920
  """
904
- Computes the closest point on the mesh with identifier `id` to the given point in space. Returns ``True`` if a point < ``max_dist`` is found.
921
+ Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given ``point`` in space.
905
922
 
906
923
  This method does not compute the sign of the point (inside/outside) which makes it faster than other point query methods.
907
924
 
908
925
  :param id: The mesh identifier
909
926
  :param point: The point in space to query
910
927
  :param max_dist: Mesh faces above this distance will not be considered by the query
911
- :param face: Returns the index of the closest face
912
- :param bary_u: Returns the barycentric u coordinate of the closest point
913
- :param bary_v: Returns the barycentric v coordinate of the closest point
914
928
  """
915
929
  ...
916
930
 
917
931
 
918
932
  @over
919
- def mesh_query_point_sign_normal(
920
- id: uint64,
921
- point: vec3f,
922
- max_dist: float32,
923
- inside: float32,
924
- face: int32,
925
- bary_u: float32,
926
- bary_v: float32,
927
- epsilon: float32,
928
- ) -> bool:
933
+ def mesh_query_furthest_point_no_sign(id: uint64, point: vec3f, min_dist: float32) -> mesh_query_point_t:
929
934
  """
930
- Computes the closest point on the mesh with identifier `id` to the given point in space. Returns ``True`` if a point < ``max_dist`` is found.
935
+ Computes the furthest point on the mesh with identifier `id` to the given point in space.
931
936
 
932
- Identifies the sign of the distance (inside/outside) using the angle-weighted pseudo normal. This approach to sign determination is robust for well conditioned meshes
933
- that are watertight and non-self intersecting, it is also comparatively fast to compute.
937
+ This method does not compute the sign of the point (inside/outside).
938
+
939
+ :param id: The mesh identifier
940
+ :param point: The point in space to query
941
+ :param min_dist: Mesh faces below this distance will not be considered by the query
942
+ """
943
+ ...
944
+
945
+
946
+ @over
947
+ def mesh_query_point_sign_normal(id: uint64, point: vec3f, max_dist: float32, epsilon: float32) -> mesh_query_point_t:
948
+ """
949
+ Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given ``point`` in space.
950
+
951
+ Identifies the sign of the distance (inside/outside) using the angle-weighted pseudo normal.
952
+ This approach to sign determination is robust for well conditioned meshes that are watertight and non-self intersecting.
953
+ It is also comparatively fast to compute.
934
954
 
935
955
  :param id: The mesh identifier
936
956
  :param point: The point in space to query
937
957
  :param max_dist: Mesh faces above this distance will not be considered by the query
938
- :param inside: Returns a value < 0 if query point is inside the mesh, >=0 otherwise. Note that mesh must be watertight for this to be robust
939
- :param face: Returns the index of the closest face
940
- :param bary_u: Returns the barycentric u coordinate of the closest point
941
- :param bary_v: Returns the barycentric v coordinate of the closest point
942
- :param epsilon: Epsilon treating distance values as equal, when locating the minimum distance vertex/face/edge, as a fraction of the average edge length, also for treating closest point as being on edge/vertex default 1e-3
958
+ :param epsilon: Epsilon treating distance values as equal, when locating the minimum distance vertex/face/edge, as a
959
+ fraction of the average edge length, also for treating closest point as being on edge/vertex default 1e-3
943
960
  """
944
961
  ...
945
962
 
946
963
 
947
964
  @over
948
965
  def mesh_query_point_sign_winding_number(
949
- id: uint64,
950
- point: vec3f,
951
- max_dist: float32,
952
- inside: float32,
953
- face: int32,
954
- bary_u: float32,
955
- bary_v: float32,
956
- accuracy: float32,
957
- threshold: float32,
958
- ) -> bool:
959
- """
960
- Computes the closest point on the mesh with identifier `id` to the given point in space. Returns ``True`` if a point < ``max_dist`` is found.
966
+ id: uint64, point: vec3f, max_dist: float32, accuracy: float32, threshold: float32
967
+ ) -> mesh_query_point_t:
968
+ """
969
+ Computes the closest point on the :class:`Mesh` with identifier ``id`` to the given point in space.
961
970
 
962
971
  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
963
972
  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
964
973
  but also the most expensive.
965
974
 
966
- Note that the Mesh object must be constructed with ``suport_winding_number=True`` for this method to return correct results.
975
+ .. note:: The :class:`Mesh` object must be constructed with ``support_winding_number=True`` for this method to return correct results.
967
976
 
968
977
  :param id: The mesh identifier
969
978
  :param point: The point in space to query
970
979
  :param max_dist: Mesh faces above this distance will not be considered by the query
971
- :param inside: Returns a value < 0 if query point is inside the mesh, >=0 otherwise. Note that mesh must be watertight for this to be robust
972
- :param face: Returns the index of the closest face
973
- :param bary_u: Returns the barycentric u coordinate of the closest point
974
- :param bary_v: Returns the barycentric v coordinate of the closest point
975
- :param accuracy: Accuracy for computing the winding number with fast winding number method utilizing second order dipole approximation, default 2.0
980
+ :param accuracy: Accuracy for computing the winding number with fast winding number method utilizing second-order dipole approximation, default 2.0
976
981
  :param threshold: The threshold of the winding number to be considered inside, default 0.5
977
982
  """
978
983
  ...
979
984
 
980
985
 
981
986
  @over
982
- def mesh_query_ray(
983
- id: uint64,
984
- start: vec3f,
985
- dir: vec3f,
986
- max_t: float32,
987
- t: float32,
988
- bary_u: float32,
989
- bary_v: float32,
990
- sign: float32,
991
- normal: vec3f,
992
- face: int32,
993
- ) -> bool:
987
+ def mesh_query_ray(id: uint64, start: vec3f, dir: vec3f, max_t: float32) -> mesh_query_ray_t:
994
988
  """
995
- Computes the closest ray hit on the mesh with identifier `id`, returns ``True`` if a point < ``max_t`` is found.
989
+ Computes the closest ray hit on the :class:`Mesh` with identifier ``id``.
996
990
 
997
991
  :param id: The mesh identifier
998
992
  :param start: The start point of the ray
999
993
  :param dir: The ray direction (should be normalized)
1000
994
  :param max_t: The maximum distance along the ray to check for intersections
1001
- :param t: Returns the distance of the closest hit along the ray
1002
- :param bary_u: Returns the barycentric u coordinate of the closest hit
1003
- :param bary_v: Returns the barycentric v coordinate of the closest hit
1004
- :param sign: Returns a value > 0 if the hit ray hit front of the face, returns < 0 otherwise
1005
- :param normal: Returns the face normal
1006
- :param face: Returns the index of the hit face
1007
995
  """
1008
996
  ...
1009
997
 
@@ -1011,8 +999,8 @@ def mesh_query_ray(
1011
999
  @over
1012
1000
  def mesh_query_aabb(id: uint64, lower: vec3f, upper: vec3f) -> mesh_query_aabb_t:
1013
1001
  """
1014
- Construct an axis-aligned bounding box query against a mesh object. This query can be used to iterate over all triangles
1015
- inside a volume. Returns an object that is used to track state during mesh traversal.
1002
+ Construct an axis-aligned bounding box query against a :class:`Mesh`.
1003
+ This query can be used to iterate over all triangles inside a volume.
1016
1004
 
1017
1005
  :param id: The mesh identifier
1018
1006
  :param lower: The lower bound of the bounding box in mesh space
@@ -1024,8 +1012,8 @@ def mesh_query_aabb(id: uint64, lower: vec3f, upper: vec3f) -> mesh_query_aabb_t
1024
1012
  @over
1025
1013
  def mesh_query_aabb_next(query: mesh_query_aabb_t, index: int32) -> bool:
1026
1014
  """
1027
- Move to the next triangle overlapping the query bounding box. The index of the current face is stored in ``index``, returns ``False``
1028
- if there are no more overlapping triangles.
1015
+ Move to the next triangle overlapping the query bounding box.
1016
+ The index of the current face is stored in ``index``, returns ``False`` if there are no more overlapping triangles.
1029
1017
  """
1030
1018
  ...
1031
1019
 
@@ -1033,7 +1021,7 @@ def mesh_query_aabb_next(query: mesh_query_aabb_t, index: int32) -> bool:
1033
1021
  @over
1034
1022
  def mesh_eval_position(id: uint64, face: int32, bary_u: float32, bary_v: float32) -> vec3f:
1035
1023
  """
1036
- Evaluates the position on the mesh given a face index, and barycentric coordinates.
1024
+ Evaluates the position on the :class:`Mesh` given a face index and barycentric coordinates.
1037
1025
  """
1038
1026
  ...
1039
1027
 
@@ -1041,7 +1029,7 @@ def mesh_eval_position(id: uint64, face: int32, bary_u: float32, bary_v: float32
1041
1029
  @over
1042
1030
  def mesh_eval_velocity(id: uint64, face: int32, bary_u: float32, bary_v: float32) -> vec3f:
1043
1031
  """
1044
- Evaluates the velocity on the mesh given a face index, and barycentric coordinates.
1032
+ Evaluates the velocity on the :class:`Mesh` given a face index and barycentric coordinates.
1045
1033
  """
1046
1034
  ...
1047
1035
 
@@ -1049,8 +1037,7 @@ def mesh_eval_velocity(id: uint64, face: int32, bary_u: float32, bary_v: float32
1049
1037
  @over
1050
1038
  def hash_grid_query(id: uint64, point: vec3f, max_dist: float32) -> hash_grid_query_t:
1051
1039
  """
1052
- Construct a point query against a hash grid. This query can be used to iterate over all neighboring points withing a
1053
- fixed radius from the query point. Returns an object that is used to track state during neighbor traversal.
1040
+ Construct a point query against a :class:`HashGrid`. This query can be used to iterate over all neighboring points within a fixed radius from the query point.
1054
1041
  """
1055
1042
  ...
1056
1043
 
@@ -1067,8 +1054,10 @@ def hash_grid_query_next(query: hash_grid_query_t, index: int32) -> bool:
1067
1054
  @over
1068
1055
  def hash_grid_point_id(id: uint64, index: int32) -> int:
1069
1056
  """
1070
- Return the index of a point in the grid, this can be used to re-order threads such that grid
1057
+ Return the index of a point in the :class:`HashGrid`. This can be used to reorder threads such that grid
1071
1058
  traversal occurs in a spatially coherent order.
1059
+
1060
+ Returns -1 if the :class:`HashGrid` has not been reserved.
1072
1061
  """
1073
1062
  ...
1074
1063
 
@@ -1139,7 +1128,8 @@ def closest_point_edge_edge(p1: vec3f, q1: vec3f, p2: vec3f, q2: vec3f, epsilon:
1139
1128
  @over
1140
1129
  def volume_sample_f(id: uint64, uvw: vec3f, sampling_mode: int32) -> float:
1141
1130
  """
1142
- Sample the volume given by ``id`` at the volume local-space point ``uvw``. Interpolation should be ``wp.Volume.CLOSEST``, or ``wp.Volume.LINEAR.``
1131
+ Sample the volume given by ``id`` at the volume local-space point ``uvw``.
1132
+ Interpolation should be :attr:`warp.Volume.CLOSEST` or :attr:`wp.Volume.LINEAR.`
1143
1133
  """
1144
1134
  ...
1145
1135
 
@@ -1147,7 +1137,8 @@ def volume_sample_f(id: uint64, uvw: vec3f, sampling_mode: int32) -> float:
1147
1137
  @over
1148
1138
  def volume_sample_grad_f(id: uint64, uvw: vec3f, sampling_mode: int32, grad: vec3f) -> float:
1149
1139
  """
1150
- Sample the volume and its gradient given by ``id`` at the volume local-space point ``uvw``. Interpolation should be ``wp.Volume.CLOSEST``, or ``wp.Volume.LINEAR.``
1140
+ Sample the volume and its gradient given by ``id`` at the volume local-space point ``uvw``.
1141
+ Interpolation should be :attr:`warp.Volume.CLOSEST` or :attr:`wp.Volume.LINEAR.`
1151
1142
  """
1152
1143
  ...
1153
1144
 
@@ -1155,7 +1146,8 @@ def volume_sample_grad_f(id: uint64, uvw: vec3f, sampling_mode: int32, grad: vec
1155
1146
  @over
1156
1147
  def volume_lookup_f(id: uint64, i: int32, j: int32, k: int32) -> float:
1157
1148
  """
1158
- Returns the value of voxel with coordinates ``i``, ``j``, ``k``, if the voxel at this index does not exist this function returns the background value
1149
+ Returns the value of voxel with coordinates ``i``, ``j``, ``k``.
1150
+ If the voxel at this index does not exist, this function returns the background value
1159
1151
  """
1160
1152
  ...
1161
1153
 
@@ -1163,7 +1155,7 @@ def volume_lookup_f(id: uint64, i: int32, j: int32, k: int32) -> float:
1163
1155
  @over
1164
1156
  def volume_store_f(id: uint64, i: int32, j: int32, k: int32, value: float32):
1165
1157
  """
1166
- Store the value at voxel with coordinates ``i``, ``j``, ``k``.
1158
+ Store ``value`` at the voxel with coordinates ``i``, ``j``, ``k``.
1167
1159
  """
1168
1160
  ...
1169
1161
 
@@ -1171,7 +1163,8 @@ def volume_store_f(id: uint64, i: int32, j: int32, k: int32, value: float32):
1171
1163
  @over
1172
1164
  def volume_sample_v(id: uint64, uvw: vec3f, sampling_mode: int32) -> vec3f:
1173
1165
  """
1174
- Sample the vector volume given by ``id`` at the volume local-space point ``uvw``. Interpolation should be ``wp.Volume.CLOSEST``, or ``wp.Volume.LINEAR.``
1166
+ Sample the vector volume given by ``id`` at the volume local-space point ``uvw``.
1167
+ Interpolation should be :attr:`warp.Volume.CLOSEST` or :attr:`wp.Volume.LINEAR.`
1175
1168
  """
1176
1169
  ...
1177
1170
 
@@ -1179,7 +1172,8 @@ def volume_sample_v(id: uint64, uvw: vec3f, sampling_mode: int32) -> vec3f:
1179
1172
  @over
1180
1173
  def volume_lookup_v(id: uint64, i: int32, j: int32, k: int32) -> vec3f:
1181
1174
  """
1182
- Returns the vector value of voxel with coordinates ``i``, ``j``, ``k``, if the voxel at this index does not exist this function returns the background value
1175
+ Returns the vector value of voxel with coordinates ``i``, ``j``, ``k``.
1176
+ If the voxel at this index does not exist, this function returns the background value.
1183
1177
  """
1184
1178
  ...
1185
1179
 
@@ -1187,7 +1181,7 @@ def volume_lookup_v(id: uint64, i: int32, j: int32, k: int32) -> vec3f:
1187
1181
  @over
1188
1182
  def volume_store_v(id: uint64, i: int32, j: int32, k: int32, value: vec3f):
1189
1183
  """
1190
- Store the value at voxel with coordinates ``i``, ``j``, ``k``.
1184
+ Store ``value`` at the voxel with coordinates ``i``, ``j``, ``k``.
1191
1185
  """
1192
1186
  ...
1193
1187
 
@@ -1195,7 +1189,7 @@ def volume_store_v(id: uint64, i: int32, j: int32, k: int32, value: vec3f):
1195
1189
  @over
1196
1190
  def volume_sample_i(id: uint64, uvw: vec3f) -> int:
1197
1191
  """
1198
- Sample the int32 volume given by ``id`` at the volume local-space point ``uvw``.
1192
+ Sample the :class:`int32` volume given by ``id`` at the volume local-space point ``uvw``.
1199
1193
  """
1200
1194
  ...
1201
1195
 
@@ -1203,7 +1197,8 @@ def volume_sample_i(id: uint64, uvw: vec3f) -> int:
1203
1197
  @over
1204
1198
  def volume_lookup_i(id: uint64, i: int32, j: int32, k: int32) -> int:
1205
1199
  """
1206
- Returns the int32 value of voxel with coordinates ``i``, ``j``, ``k``, if the voxel at this index does not exist this function returns the background value
1200
+ Returns the :class:`int32` value of voxel with coordinates ``i``, ``j``, ``k``.
1201
+ If the voxel at this index does not exist, this function returns the background value.
1207
1202
  """
1208
1203
  ...
1209
1204
 
@@ -1211,7 +1206,7 @@ def volume_lookup_i(id: uint64, i: int32, j: int32, k: int32) -> int:
1211
1206
  @over
1212
1207
  def volume_store_i(id: uint64, i: int32, j: int32, k: int32, value: int32):
1213
1208
  """
1214
- Store the value at voxel with coordinates ``i``, ``j``, ``k``.
1209
+ Store ``value`` at the voxel with coordinates ``i``, ``j``, ``k``.
1215
1210
  """
1216
1211
  ...
1217
1212
 
@@ -1219,7 +1214,7 @@ def volume_store_i(id: uint64, i: int32, j: int32, k: int32, value: int32):
1219
1214
  @over
1220
1215
  def volume_index_to_world(id: uint64, uvw: vec3f) -> vec3f:
1221
1216
  """
1222
- Transform a point defined in volume index space to world space given the volume's intrinsic affine transformation.
1217
+ Transform a point ``uvw`` defined in volume index space to world space given the volume's intrinsic affine transformation.
1223
1218
  """
1224
1219
  ...
1225
1220
 
@@ -1227,7 +1222,7 @@ def volume_index_to_world(id: uint64, uvw: vec3f) -> vec3f:
1227
1222
  @over
1228
1223
  def volume_world_to_index(id: uint64, xyz: vec3f) -> vec3f:
1229
1224
  """
1230
- Transform a point defined in volume world space to the volume's index space, given the volume's intrinsic affine transformation.
1225
+ Transform a point ``xyz`` defined in volume world space to the volume's index space given the volume's intrinsic affine transformation.
1231
1226
  """
1232
1227
  ...
1233
1228
 
@@ -1235,7 +1230,7 @@ def volume_world_to_index(id: uint64, xyz: vec3f) -> vec3f:
1235
1230
  @over
1236
1231
  def volume_index_to_world_dir(id: uint64, uvw: vec3f) -> vec3f:
1237
1232
  """
1238
- Transform a direction defined in volume index space to world space given the volume's intrinsic affine transformation.
1233
+ Transform a direction ``uvw`` defined in volume index space to world space given the volume's intrinsic affine transformation.
1239
1234
  """
1240
1235
  ...
1241
1236
 
@@ -1243,7 +1238,7 @@ def volume_index_to_world_dir(id: uint64, uvw: vec3f) -> vec3f:
1243
1238
  @over
1244
1239
  def volume_world_to_index_dir(id: uint64, xyz: vec3f) -> vec3f:
1245
1240
  """
1246
- Transform a direction defined in volume world space to the volume's index space, given the volume's intrinsic affine transformation.
1241
+ Transform a direction ``xyz`` defined in volume world space to the volume's index space given the volume's intrinsic affine transformation.
1247
1242
  """
1248
1243
  ...
1249
1244
 
@@ -1269,7 +1264,7 @@ def rand_init(seed: int32, offset: int32) -> uint32:
1269
1264
  @over
1270
1265
  def randi(state: uint32) -> int:
1271
1266
  """
1272
- Return a random integer between [0, 2^32)
1267
+ Return a random integer in the range [0, 2^32).
1273
1268
  """
1274
1269
  ...
1275
1270
 
@@ -1277,7 +1272,7 @@ def randi(state: uint32) -> int:
1277
1272
  @over
1278
1273
  def randi(state: uint32, min: int32, max: int32) -> int:
1279
1274
  """
1280
- Return a random integer between [min, max)
1275
+ Return a random integer between [min, max).
1281
1276
  """
1282
1277
  ...
1283
1278
 
@@ -1285,7 +1280,7 @@ def randi(state: uint32, min: int32, max: int32) -> int:
1285
1280
  @over
1286
1281
  def randf(state: uint32) -> float:
1287
1282
  """
1288
- Return a random float between [0.0, 1.0)
1283
+ Return a random float between [0.0, 1.0).
1289
1284
  """
1290
1285
  ...
1291
1286
 
@@ -1293,7 +1288,7 @@ def randf(state: uint32) -> float:
1293
1288
  @over
1294
1289
  def randf(state: uint32, min: float32, max: float32) -> float:
1295
1290
  """
1296
- Return a random float between [min, max)
1291
+ Return a random float between [min, max).
1297
1292
  """
1298
1293
  ...
1299
1294
 
@@ -1301,7 +1296,7 @@ def randf(state: uint32, min: float32, max: float32) -> float:
1301
1296
  @over
1302
1297
  def randn(state: uint32) -> float:
1303
1298
  """
1304
- Sample a normal distribution
1299
+ Sample a normal distribution.
1305
1300
  """
1306
1301
  ...
1307
1302
 
@@ -1309,7 +1304,7 @@ def randn(state: uint32) -> float:
1309
1304
  @over
1310
1305
  def sample_cdf(state: uint32, cdf: Array[float32]) -> int:
1311
1306
  """
1312
- Inverse transform sample a cumulative distribution function
1307
+ Inverse-transform sample a cumulative distribution function.
1313
1308
  """
1314
1309
  ...
1315
1310
 
@@ -1317,7 +1312,7 @@ def sample_cdf(state: uint32, cdf: Array[float32]) -> int:
1317
1312
  @over
1318
1313
  def sample_triangle(state: uint32) -> vec2f:
1319
1314
  """
1320
- Uniformly sample a triangle. Returns sample barycentric coordinates
1315
+ Uniformly sample a triangle. Returns sample barycentric coordinates.
1321
1316
  """
1322
1317
  ...
1323
1318
 
@@ -1325,7 +1320,7 @@ def sample_triangle(state: uint32) -> vec2f:
1325
1320
  @over
1326
1321
  def sample_unit_ring(state: uint32) -> vec2f:
1327
1322
  """
1328
- Uniformly sample a ring in the xy plane
1323
+ Uniformly sample a ring in the xy plane.
1329
1324
  """
1330
1325
  ...
1331
1326
 
@@ -1333,7 +1328,7 @@ def sample_unit_ring(state: uint32) -> vec2f:
1333
1328
  @over
1334
1329
  def sample_unit_disk(state: uint32) -> vec2f:
1335
1330
  """
1336
- Uniformly sample a disk in the xy plane
1331
+ Uniformly sample a disk in the xy plane.
1337
1332
  """
1338
1333
  ...
1339
1334
 
@@ -1341,7 +1336,7 @@ def sample_unit_disk(state: uint32) -> vec2f:
1341
1336
  @over
1342
1337
  def sample_unit_sphere_surface(state: uint32) -> vec3f:
1343
1338
  """
1344
- Uniformly sample a unit sphere surface
1339
+ Uniformly sample a unit sphere surface.
1345
1340
  """
1346
1341
  ...
1347
1342
 
@@ -1349,7 +1344,7 @@ def sample_unit_sphere_surface(state: uint32) -> vec3f:
1349
1344
  @over
1350
1345
  def sample_unit_sphere(state: uint32) -> vec3f:
1351
1346
  """
1352
- Uniformly sample a unit sphere
1347
+ Uniformly sample a unit sphere.
1353
1348
  """
1354
1349
  ...
1355
1350
 
@@ -1357,7 +1352,7 @@ def sample_unit_sphere(state: uint32) -> vec3f:
1357
1352
  @over
1358
1353
  def sample_unit_hemisphere_surface(state: uint32) -> vec3f:
1359
1354
  """
1360
- Uniformly sample a unit hemisphere surface
1355
+ Uniformly sample a unit hemisphere surface.
1361
1356
  """
1362
1357
  ...
1363
1358
 
@@ -1365,7 +1360,7 @@ def sample_unit_hemisphere_surface(state: uint32) -> vec3f:
1365
1360
  @over
1366
1361
  def sample_unit_hemisphere(state: uint32) -> vec3f:
1367
1362
  """
1368
- Uniformly sample a unit hemisphere
1363
+ Uniformly sample a unit hemisphere.
1369
1364
  """
1370
1365
  ...
1371
1366
 
@@ -1373,7 +1368,7 @@ def sample_unit_hemisphere(state: uint32) -> vec3f:
1373
1368
  @over
1374
1369
  def sample_unit_square(state: uint32) -> vec2f:
1375
1370
  """
1376
- Uniformly sample a unit square
1371
+ Uniformly sample a unit square.
1377
1372
  """
1378
1373
  ...
1379
1374
 
@@ -1381,7 +1376,7 @@ def sample_unit_square(state: uint32) -> vec2f:
1381
1376
  @over
1382
1377
  def sample_unit_cube(state: uint32) -> vec3f:
1383
1378
  """
1384
- Uniformly sample a unit cube
1379
+ Uniformly sample a unit cube.
1385
1380
  """
1386
1381
  ...
1387
1382
 
@@ -1391,8 +1386,8 @@ def poisson(state: uint32, lam: float32) -> uint32:
1391
1386
  """
1392
1387
  Generate a random sample from a Poisson distribution.
1393
1388
 
1394
- :param state: RNG state
1395
- :param lam: The expected value of the distribution
1389
+ :param state: RNG state
1390
+ :param lam: The expected value of the distribution
1396
1391
  """
1397
1392
  ...
1398
1393
 
@@ -1400,7 +1395,7 @@ def poisson(state: uint32, lam: float32) -> uint32:
1400
1395
  @over
1401
1396
  def noise(state: uint32, x: float32) -> float:
1402
1397
  """
1403
- Non-periodic Perlin-style noise in 1d.
1398
+ Non-periodic Perlin-style noise in 1D.
1404
1399
  """
1405
1400
  ...
1406
1401
 
@@ -1408,7 +1403,7 @@ def noise(state: uint32, x: float32) -> float:
1408
1403
  @over
1409
1404
  def noise(state: uint32, xy: vec2f) -> float:
1410
1405
  """
1411
- Non-periodic Perlin-style noise in 2d.
1406
+ Non-periodic Perlin-style noise in 2D.
1412
1407
  """
1413
1408
  ...
1414
1409
 
@@ -1416,7 +1411,7 @@ def noise(state: uint32, xy: vec2f) -> float:
1416
1411
  @over
1417
1412
  def noise(state: uint32, xyz: vec3f) -> float:
1418
1413
  """
1419
- Non-periodic Perlin-style noise in 3d.
1414
+ Non-periodic Perlin-style noise in 3D.
1420
1415
  """
1421
1416
  ...
1422
1417
 
@@ -1424,7 +1419,7 @@ def noise(state: uint32, xyz: vec3f) -> float:
1424
1419
  @over
1425
1420
  def noise(state: uint32, xyzt: vec4f) -> float:
1426
1421
  """
1427
- Non-periodic Perlin-style noise in 4d.
1422
+ Non-periodic Perlin-style noise in 4D.
1428
1423
  """
1429
1424
  ...
1430
1425
 
@@ -1432,7 +1427,7 @@ def noise(state: uint32, xyzt: vec4f) -> float:
1432
1427
  @over
1433
1428
  def pnoise(state: uint32, x: float32, px: int32) -> float:
1434
1429
  """
1435
- Periodic Perlin-style noise in 1d.
1430
+ Periodic Perlin-style noise in 1D.
1436
1431
  """
1437
1432
  ...
1438
1433
 
@@ -1440,7 +1435,7 @@ def pnoise(state: uint32, x: float32, px: int32) -> float:
1440
1435
  @over
1441
1436
  def pnoise(state: uint32, xy: vec2f, px: int32, py: int32) -> float:
1442
1437
  """
1443
- Periodic Perlin-style noise in 2d.
1438
+ Periodic Perlin-style noise in 2D.
1444
1439
  """
1445
1440
  ...
1446
1441
 
@@ -1448,7 +1443,7 @@ def pnoise(state: uint32, xy: vec2f, px: int32, py: int32) -> float:
1448
1443
  @over
1449
1444
  def pnoise(state: uint32, xyz: vec3f, px: int32, py: int32, pz: int32) -> float:
1450
1445
  """
1451
- Periodic Perlin-style noise in 3d.
1446
+ Periodic Perlin-style noise in 3D.
1452
1447
  """
1453
1448
  ...
1454
1449
 
@@ -1456,13 +1451,13 @@ def pnoise(state: uint32, xyz: vec3f, px: int32, py: int32, pz: int32) -> float:
1456
1451
  @over
1457
1452
  def pnoise(state: uint32, xyzt: vec4f, px: int32, py: int32, pz: int32, pt: int32) -> float:
1458
1453
  """
1459
- Periodic Perlin-style noise in 4d.
1454
+ Periodic Perlin-style noise in 4D.
1460
1455
  """
1461
1456
  ...
1462
1457
 
1463
1458
 
1464
1459
  @over
1465
- def curlnoise(state: uint32, xy: vec2f) -> vec2f:
1460
+ def curlnoise(state: uint32, xy: vec2f, octaves: uint32, lacunarity: float32, gain: float32) -> vec2f:
1466
1461
  """
1467
1462
  Divergence-free vector field based on the gradient of a Perlin noise function.
1468
1463
  """
@@ -1470,7 +1465,7 @@ def curlnoise(state: uint32, xy: vec2f) -> vec2f:
1470
1465
 
1471
1466
 
1472
1467
  @over
1473
- def curlnoise(state: uint32, xyz: vec3f) -> vec3f:
1468
+ def curlnoise(state: uint32, xyz: vec3f, octaves: uint32, lacunarity: float32, gain: float32) -> vec3f:
1474
1469
  """
1475
1470
  Divergence-free vector field based on the curl of three Perlin noise functions.
1476
1471
  """
@@ -1478,7 +1473,7 @@ def curlnoise(state: uint32, xyz: vec3f) -> vec3f:
1478
1473
 
1479
1474
 
1480
1475
  @over
1481
- def curlnoise(state: uint32, xyzt: vec4f) -> vec3f:
1476
+ def curlnoise(state: uint32, xyzt: vec4f, octaves: uint32, lacunarity: float32, gain: float32) -> vec3f:
1482
1477
  """
1483
1478
  Divergence-free vector field based on the curl of three Perlin noise functions.
1484
1479
  """
@@ -1488,16 +1483,7 @@ def curlnoise(state: uint32, xyzt: vec4f) -> vec3f:
1488
1483
  @over
1489
1484
  def printf():
1490
1485
  """
1491
- Allows printing formatted strings, using C-style format specifiers.
1492
- """
1493
- ...
1494
-
1495
-
1496
- @over
1497
- def tid() -> int:
1498
- """
1499
- Return the current thread index. Note that this is the *global* index of the thread in the range [0, dim)
1500
- where dim is the parameter passed to kernel launch.
1486
+ Allows printing formatted strings using C-style format specifiers.
1501
1487
  """
1502
1488
  ...
1503
1489
 
@@ -1505,7 +1491,8 @@ def tid() -> int:
1505
1491
  @over
1506
1492
  def tid() -> Tuple[int, int]:
1507
1493
  """
1508
- Return the current thread indices for a 2d kernel launch. Use ``i,j = wp.tid()`` syntax to retrieve the coordinates inside the kernel thread grid.
1494
+ Return the current thread indices for a 2D kernel launch. Use ``i,j = wp.tid()`` syntax to retrieve the
1495
+ coordinates inside the kernel thread grid. This function may not be called from user-defined Warp functions.
1509
1496
  """
1510
1497
  ...
1511
1498
 
@@ -1513,7 +1500,8 @@ def tid() -> Tuple[int, int]:
1513
1500
  @over
1514
1501
  def tid() -> Tuple[int, int, int]:
1515
1502
  """
1516
- Return the current thread indices for a 3d kernel launch. Use ``i,j,k = wp.tid()`` syntax to retrieve the coordinates inside the kernel thread grid.
1503
+ Return the current thread indices for a 3D kernel launch. Use ``i,j,k = wp.tid()`` syntax to retrieve the
1504
+ coordinates inside the kernel thread grid. This function may not be called from user-defined Warp functions.
1517
1505
  """
1518
1506
  ...
1519
1507
 
@@ -1521,7 +1509,8 @@ def tid() -> Tuple[int, int, int]:
1521
1509
  @over
1522
1510
  def tid() -> Tuple[int, int, int, int]:
1523
1511
  """
1524
- Return the current thread indices for a 4d kernel launch. Use ``i,j,k,l = wp.tid()`` syntax to retrieve the coordinates inside the kernel thread grid.
1512
+ Return the current thread indices for a 4D kernel launch. Use ``i,j,k,l = wp.tid()`` syntax to retrieve the
1513
+ coordinates inside the kernel thread grid. This function may not be called from user-defined Warp functions.
1525
1514
  """
1526
1515
  ...
1527
1516
 
@@ -1529,7 +1518,7 @@ def tid() -> Tuple[int, int, int, int]:
1529
1518
  @over
1530
1519
  def select(cond: bool, arg1: Any, arg2: Any):
1531
1520
  """
1532
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1521
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1533
1522
  """
1534
1523
  ...
1535
1524
 
@@ -1537,7 +1526,7 @@ def select(cond: bool, arg1: Any, arg2: Any):
1537
1526
  @over
1538
1527
  def select(cond: bool, arg1: Any, arg2: Any):
1539
1528
  """
1540
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1529
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1541
1530
  """
1542
1531
  ...
1543
1532
 
@@ -1545,7 +1534,7 @@ def select(cond: bool, arg1: Any, arg2: Any):
1545
1534
  @over
1546
1535
  def select(cond: int8, arg1: Any, arg2: Any):
1547
1536
  """
1548
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1537
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1549
1538
  """
1550
1539
  ...
1551
1540
 
@@ -1553,7 +1542,7 @@ def select(cond: int8, arg1: Any, arg2: Any):
1553
1542
  @over
1554
1543
  def select(cond: uint8, arg1: Any, arg2: Any):
1555
1544
  """
1556
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1545
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1557
1546
  """
1558
1547
  ...
1559
1548
 
@@ -1561,7 +1550,7 @@ def select(cond: uint8, arg1: Any, arg2: Any):
1561
1550
  @over
1562
1551
  def select(cond: int16, arg1: Any, arg2: Any):
1563
1552
  """
1564
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1553
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1565
1554
  """
1566
1555
  ...
1567
1556
 
@@ -1569,7 +1558,7 @@ def select(cond: int16, arg1: Any, arg2: Any):
1569
1558
  @over
1570
1559
  def select(cond: uint16, arg1: Any, arg2: Any):
1571
1560
  """
1572
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1561
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1573
1562
  """
1574
1563
  ...
1575
1564
 
@@ -1577,7 +1566,7 @@ def select(cond: uint16, arg1: Any, arg2: Any):
1577
1566
  @over
1578
1567
  def select(cond: int32, arg1: Any, arg2: Any):
1579
1568
  """
1580
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1569
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1581
1570
  """
1582
1571
  ...
1583
1572
 
@@ -1585,7 +1574,7 @@ def select(cond: int32, arg1: Any, arg2: Any):
1585
1574
  @over
1586
1575
  def select(cond: uint32, arg1: Any, arg2: Any):
1587
1576
  """
1588
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1577
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1589
1578
  """
1590
1579
  ...
1591
1580
 
@@ -1593,7 +1582,7 @@ def select(cond: uint32, arg1: Any, arg2: Any):
1593
1582
  @over
1594
1583
  def select(cond: int64, arg1: Any, arg2: Any):
1595
1584
  """
1596
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1585
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1597
1586
  """
1598
1587
  ...
1599
1588
 
@@ -1601,7 +1590,7 @@ def select(cond: int64, arg1: Any, arg2: Any):
1601
1590
  @over
1602
1591
  def select(cond: uint64, arg1: Any, arg2: Any):
1603
1592
  """
1604
- Select between two arguments, if cond is false then return ``arg1``, otherwise return ``arg2``
1593
+ Select between two arguments, if ``cond`` is ``False`` then return ``arg1``, otherwise return ``arg2``
1605
1594
  """
1606
1595
  ...
1607
1596
 
@@ -1609,7 +1598,7 @@ def select(cond: uint64, arg1: Any, arg2: Any):
1609
1598
  @over
1610
1599
  def select(arr: Array[Any], arg1: Any, arg2: Any):
1611
1600
  """
1612
- Select between two arguments, if array is null then return ``arg1``, otherwise return ``arg2``
1601
+ Select between two arguments, if ``arr`` is null then return ``arg1``, otherwise return ``arg2``
1613
1602
  """
1614
1603
  ...
1615
1604
 
@@ -1617,7 +1606,7 @@ def select(arr: Array[Any], arg1: Any, arg2: Any):
1617
1606
  @over
1618
1607
  def atomic_add(a: Array[Any], i: int32, value: Any):
1619
1608
  """
1620
- Atomically add ``value`` onto the array at location given by index.
1609
+ Atomically add ``value`` onto ``a[i]``.
1621
1610
  """
1622
1611
  ...
1623
1612
 
@@ -1625,7 +1614,7 @@ def atomic_add(a: Array[Any], i: int32, value: Any):
1625
1614
  @over
1626
1615
  def atomic_add(a: Array[Any], i: int32, j: int32, value: Any):
1627
1616
  """
1628
- Atomically add ``value`` onto the array at location given by indices.
1617
+ Atomically add ``value`` onto ``a[i,j]``.
1629
1618
  """
1630
1619
  ...
1631
1620
 
@@ -1633,7 +1622,7 @@ def atomic_add(a: Array[Any], i: int32, j: int32, value: Any):
1633
1622
  @over
1634
1623
  def atomic_add(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1635
1624
  """
1636
- Atomically add ``value`` onto the array at location given by indices.
1625
+ Atomically add ``value`` onto ``a[i,j,k]``.
1637
1626
  """
1638
1627
  ...
1639
1628
 
@@ -1641,7 +1630,7 @@ def atomic_add(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1641
1630
  @over
1642
1631
  def atomic_add(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1643
1632
  """
1644
- Atomically add ``value`` onto the array at location given by indices.
1633
+ Atomically add ``value`` onto ``a[i,j,k,l]``.
1645
1634
  """
1646
1635
  ...
1647
1636
 
@@ -1649,7 +1638,7 @@ def atomic_add(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any
1649
1638
  @over
1650
1639
  def atomic_add(a: FabricArray[Any], i: int32, value: Any):
1651
1640
  """
1652
- Atomically add ``value`` onto the array at location given by index.
1641
+ Atomically add ``value`` onto ``a[i]``.
1653
1642
  """
1654
1643
  ...
1655
1644
 
@@ -1657,7 +1646,7 @@ def atomic_add(a: FabricArray[Any], i: int32, value: Any):
1657
1646
  @over
1658
1647
  def atomic_add(a: FabricArray[Any], i: int32, j: int32, value: Any):
1659
1648
  """
1660
- Atomically add ``value`` onto the array at location given by indices.
1649
+ Atomically add ``value`` onto ``a[i,j]``.
1661
1650
  """
1662
1651
  ...
1663
1652
 
@@ -1665,7 +1654,7 @@ def atomic_add(a: FabricArray[Any], i: int32, j: int32, value: Any):
1665
1654
  @over
1666
1655
  def atomic_add(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1667
1656
  """
1668
- Atomically add ``value`` onto the array at location given by indices.
1657
+ Atomically add ``value`` onto ``a[i,j,k]``.
1669
1658
  """
1670
1659
  ...
1671
1660
 
@@ -1673,7 +1662,7 @@ def atomic_add(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1673
1662
  @over
1674
1663
  def atomic_add(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1675
1664
  """
1676
- Atomically add ``value`` onto the array at location given by indices.
1665
+ Atomically add ``value`` onto ``a[i,j,k,l]``.
1677
1666
  """
1678
1667
  ...
1679
1668
 
@@ -1681,7 +1670,7 @@ def atomic_add(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, valu
1681
1670
  @over
1682
1671
  def atomic_add(a: IndexedFabricArray[Any], i: int32, value: Any):
1683
1672
  """
1684
- Atomically add ``value`` onto the array at location given by index.
1673
+ Atomically add ``value`` onto ``a[i]``.
1685
1674
  """
1686
1675
  ...
1687
1676
 
@@ -1689,7 +1678,7 @@ def atomic_add(a: IndexedFabricArray[Any], i: int32, value: Any):
1689
1678
  @over
1690
1679
  def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1691
1680
  """
1692
- Atomically add ``value`` onto the array at location given by indices.
1681
+ Atomically add ``value`` onto ``a[i,j]``.
1693
1682
  """
1694
1683
  ...
1695
1684
 
@@ -1697,7 +1686,7 @@ def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1697
1686
  @over
1698
1687
  def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1699
1688
  """
1700
- Atomically add ``value`` onto the array at location given by indices.
1689
+ Atomically add ``value`` onto ``a[i,j,k]``.
1701
1690
  """
1702
1691
  ...
1703
1692
 
@@ -1705,7 +1694,7 @@ def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value:
1705
1694
  @over
1706
1695
  def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1707
1696
  """
1708
- Atomically add ``value`` onto the array at location given by indices.
1697
+ Atomically add ``value`` onto ``a[i,j,k,l]``.
1709
1698
  """
1710
1699
  ...
1711
1700
 
@@ -1713,7 +1702,7 @@ def atomic_add(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int3
1713
1702
  @over
1714
1703
  def atomic_sub(a: Array[Any], i: int32, value: Any):
1715
1704
  """
1716
- Atomically subtract ``value`` onto the array at location given by index.
1705
+ Atomically subtract ``value`` onto ``a[i]``.
1717
1706
  """
1718
1707
  ...
1719
1708
 
@@ -1721,7 +1710,7 @@ def atomic_sub(a: Array[Any], i: int32, value: Any):
1721
1710
  @over
1722
1711
  def atomic_sub(a: Array[Any], i: int32, j: int32, value: Any):
1723
1712
  """
1724
- Atomically subtract ``value`` onto the array at location given by indices.
1713
+ Atomically subtract ``value`` onto ``a[i,j]``.
1725
1714
  """
1726
1715
  ...
1727
1716
 
@@ -1729,7 +1718,7 @@ def atomic_sub(a: Array[Any], i: int32, j: int32, value: Any):
1729
1718
  @over
1730
1719
  def atomic_sub(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1731
1720
  """
1732
- Atomically subtract ``value`` onto the array at location given by indices.
1721
+ Atomically subtract ``value`` onto ``a[i,j,k]``.
1733
1722
  """
1734
1723
  ...
1735
1724
 
@@ -1737,7 +1726,7 @@ def atomic_sub(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1737
1726
  @over
1738
1727
  def atomic_sub(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1739
1728
  """
1740
- Atomically subtract ``value`` onto the array at location given by indices.
1729
+ Atomically subtract ``value`` onto ``a[i,j,k,l]``.
1741
1730
  """
1742
1731
  ...
1743
1732
 
@@ -1745,7 +1734,7 @@ def atomic_sub(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any
1745
1734
  @over
1746
1735
  def atomic_sub(a: FabricArray[Any], i: int32, value: Any):
1747
1736
  """
1748
- Atomically subtract ``value`` onto the array at location given by index.
1737
+ Atomically subtract ``value`` onto ``a[i]``.
1749
1738
  """
1750
1739
  ...
1751
1740
 
@@ -1753,7 +1742,7 @@ def atomic_sub(a: FabricArray[Any], i: int32, value: Any):
1753
1742
  @over
1754
1743
  def atomic_sub(a: FabricArray[Any], i: int32, j: int32, value: Any):
1755
1744
  """
1756
- Atomically subtract ``value`` onto the array at location given by indices.
1745
+ Atomically subtract ``value`` onto ``a[i,j]``.
1757
1746
  """
1758
1747
  ...
1759
1748
 
@@ -1761,7 +1750,7 @@ def atomic_sub(a: FabricArray[Any], i: int32, j: int32, value: Any):
1761
1750
  @over
1762
1751
  def atomic_sub(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1763
1752
  """
1764
- Atomically subtract ``value`` onto the array at location given by indices.
1753
+ Atomically subtract ``value`` onto ``a[i,j,k]``.
1765
1754
  """
1766
1755
  ...
1767
1756
 
@@ -1769,7 +1758,7 @@ def atomic_sub(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1769
1758
  @over
1770
1759
  def atomic_sub(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1771
1760
  """
1772
- Atomically subtract ``value`` onto the array at location given by indices.
1761
+ Atomically subtract ``value`` onto ``a[i,j,k,l]``.
1773
1762
  """
1774
1763
  ...
1775
1764
 
@@ -1777,7 +1766,7 @@ def atomic_sub(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, valu
1777
1766
  @over
1778
1767
  def atomic_sub(a: IndexedFabricArray[Any], i: int32, value: Any):
1779
1768
  """
1780
- Atomically subtract ``value`` onto the array at location given by index.
1769
+ Atomically subtract ``value`` onto ``a[i]``.
1781
1770
  """
1782
1771
  ...
1783
1772
 
@@ -1785,7 +1774,7 @@ def atomic_sub(a: IndexedFabricArray[Any], i: int32, value: Any):
1785
1774
  @over
1786
1775
  def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1787
1776
  """
1788
- Atomically subtract ``value`` onto the array at location given by indices.
1777
+ Atomically subtract ``value`` onto ``a[i,j]``.
1789
1778
  """
1790
1779
  ...
1791
1780
 
@@ -1793,7 +1782,7 @@ def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1793
1782
  @over
1794
1783
  def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1795
1784
  """
1796
- Atomically subtract ``value`` onto the array at location given by indices.
1785
+ Atomically subtract ``value`` onto ``a[i,j,k]``.
1797
1786
  """
1798
1787
  ...
1799
1788
 
@@ -1801,7 +1790,7 @@ def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value:
1801
1790
  @over
1802
1791
  def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1803
1792
  """
1804
- Atomically subtract ``value`` onto the array at location given by indices.
1793
+ Atomically subtract ``value`` onto ``a[i,j,k,l]``.
1805
1794
  """
1806
1795
  ...
1807
1796
 
@@ -1809,7 +1798,9 @@ def atomic_sub(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int3
1809
1798
  @over
1810
1799
  def atomic_min(a: Array[Any], i: int32, value: Any):
1811
1800
  """
1812
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1801
+ Compute the minimum of ``value`` and ``a[i]`` and atomically update the array.
1802
+
1803
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1813
1804
  """
1814
1805
  ...
1815
1806
 
@@ -1817,7 +1808,9 @@ def atomic_min(a: Array[Any], i: int32, value: Any):
1817
1808
  @over
1818
1809
  def atomic_min(a: Array[Any], i: int32, j: int32, value: Any):
1819
1810
  """
1820
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1811
+ Compute the minimum of ``value`` and ``a[i,j]`` and atomically update the array.
1812
+
1813
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1821
1814
  """
1822
1815
  ...
1823
1816
 
@@ -1825,7 +1818,9 @@ def atomic_min(a: Array[Any], i: int32, j: int32, value: Any):
1825
1818
  @over
1826
1819
  def atomic_min(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1827
1820
  """
1828
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1821
+ Compute the minimum of ``value`` and ``a[i,j,k]`` and atomically update the array.
1822
+
1823
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1829
1824
  """
1830
1825
  ...
1831
1826
 
@@ -1833,7 +1828,9 @@ def atomic_min(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1833
1828
  @over
1834
1829
  def atomic_min(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1835
1830
  """
1836
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1831
+ Compute the minimum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
1832
+
1833
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1837
1834
  """
1838
1835
  ...
1839
1836
 
@@ -1841,7 +1838,9 @@ def atomic_min(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any
1841
1838
  @over
1842
1839
  def atomic_min(a: FabricArray[Any], i: int32, value: Any):
1843
1840
  """
1844
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1841
+ Compute the minimum of ``value`` and ``a[i]`` and atomically update the array.
1842
+
1843
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1845
1844
  """
1846
1845
  ...
1847
1846
 
@@ -1849,7 +1848,9 @@ def atomic_min(a: FabricArray[Any], i: int32, value: Any):
1849
1848
  @over
1850
1849
  def atomic_min(a: FabricArray[Any], i: int32, j: int32, value: Any):
1851
1850
  """
1852
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1851
+ Compute the minimum of ``value`` and ``a[i,j]`` and atomically update the array.
1852
+
1853
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1853
1854
  """
1854
1855
  ...
1855
1856
 
@@ -1857,7 +1858,9 @@ def atomic_min(a: FabricArray[Any], i: int32, j: int32, value: Any):
1857
1858
  @over
1858
1859
  def atomic_min(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1859
1860
  """
1860
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1861
+ Compute the minimum of ``value`` and ``a[i,j,k]`` and atomically update the array.
1862
+
1863
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1861
1864
  """
1862
1865
  ...
1863
1866
 
@@ -1865,7 +1868,9 @@ def atomic_min(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1865
1868
  @over
1866
1869
  def atomic_min(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1867
1870
  """
1868
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1871
+ Compute the minimum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
1872
+
1873
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1869
1874
  """
1870
1875
  ...
1871
1876
 
@@ -1873,7 +1878,9 @@ def atomic_min(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, valu
1873
1878
  @over
1874
1879
  def atomic_min(a: IndexedFabricArray[Any], i: int32, value: Any):
1875
1880
  """
1876
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1881
+ Compute the minimum of ``value`` and ``a[i]`` and atomically update the array.
1882
+
1883
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1877
1884
  """
1878
1885
  ...
1879
1886
 
@@ -1881,7 +1888,9 @@ def atomic_min(a: IndexedFabricArray[Any], i: int32, value: Any):
1881
1888
  @over
1882
1889
  def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1883
1890
  """
1884
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1891
+ Compute the minimum of ``value`` and ``a[i,j]`` and atomically update the array.
1892
+
1893
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1885
1894
  """
1886
1895
  ...
1887
1896
 
@@ -1889,7 +1898,9 @@ def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1889
1898
  @over
1890
1899
  def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1891
1900
  """
1892
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1901
+ Compute the minimum of ``value`` and ``a[i,j,k]`` and atomically update the array.
1902
+
1903
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1893
1904
  """
1894
1905
  ...
1895
1906
 
@@ -1897,7 +1908,9 @@ def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value:
1897
1908
  @over
1898
1909
  def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1899
1910
  """
1900
- Compute the minimum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1911
+ Compute the minimum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
1912
+
1913
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1901
1914
  """
1902
1915
  ...
1903
1916
 
@@ -1905,7 +1918,9 @@ def atomic_min(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int3
1905
1918
  @over
1906
1919
  def atomic_max(a: Array[Any], i: int32, value: Any):
1907
1920
  """
1908
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1921
+ Compute the maximum of ``value`` and ``a[i]`` and atomically update the array.
1922
+
1923
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1909
1924
  """
1910
1925
  ...
1911
1926
 
@@ -1913,7 +1928,9 @@ def atomic_max(a: Array[Any], i: int32, value: Any):
1913
1928
  @over
1914
1929
  def atomic_max(a: Array[Any], i: int32, j: int32, value: Any):
1915
1930
  """
1916
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1931
+ Compute the maximum of ``value`` and ``a[i,j]`` and atomically update the array.
1932
+
1933
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1917
1934
  """
1918
1935
  ...
1919
1936
 
@@ -1921,7 +1938,9 @@ def atomic_max(a: Array[Any], i: int32, j: int32, value: Any):
1921
1938
  @over
1922
1939
  def atomic_max(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1923
1940
  """
1924
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1941
+ Compute the maximum of ``value`` and ``a[i,j,k]`` and atomically update the array.
1942
+
1943
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1925
1944
  """
1926
1945
  ...
1927
1946
 
@@ -1929,7 +1948,9 @@ def atomic_max(a: Array[Any], i: int32, j: int32, k: int32, value: Any):
1929
1948
  @over
1930
1949
  def atomic_max(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1931
1950
  """
1932
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1951
+ Compute the maximum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
1952
+
1953
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1933
1954
  """
1934
1955
  ...
1935
1956
 
@@ -1937,7 +1958,9 @@ def atomic_max(a: Array[Any], i: int32, j: int32, k: int32, l: int32, value: Any
1937
1958
  @over
1938
1959
  def atomic_max(a: FabricArray[Any], i: int32, value: Any):
1939
1960
  """
1940
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1961
+ Compute the maximum of ``value`` and ``a[i]`` and atomically update the array.
1962
+
1963
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1941
1964
  """
1942
1965
  ...
1943
1966
 
@@ -1945,7 +1968,9 @@ def atomic_max(a: FabricArray[Any], i: int32, value: Any):
1945
1968
  @over
1946
1969
  def atomic_max(a: FabricArray[Any], i: int32, j: int32, value: Any):
1947
1970
  """
1948
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1971
+ Compute the maximum of ``value`` and ``a[i,j]`` and atomically update the array.
1972
+
1973
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1949
1974
  """
1950
1975
  ...
1951
1976
 
@@ -1953,7 +1978,9 @@ def atomic_max(a: FabricArray[Any], i: int32, j: int32, value: Any):
1953
1978
  @over
1954
1979
  def atomic_max(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1955
1980
  """
1956
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1981
+ Compute the maximum of ``value`` and ``a[i,j,k]`` and atomically update the array.
1982
+
1983
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1957
1984
  """
1958
1985
  ...
1959
1986
 
@@ -1961,7 +1988,9 @@ def atomic_max(a: FabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1961
1988
  @over
1962
1989
  def atomic_max(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1963
1990
  """
1964
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
1991
+ Compute the maximum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
1992
+
1993
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1965
1994
  """
1966
1995
  ...
1967
1996
 
@@ -1969,7 +1998,9 @@ def atomic_max(a: FabricArray[Any], i: int32, j: int32, k: int32, l: int32, valu
1969
1998
  @over
1970
1999
  def atomic_max(a: IndexedFabricArray[Any], i: int32, value: Any):
1971
2000
  """
1972
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
2001
+ Compute the maximum of ``value`` and ``a[i]`` and atomically update the array.
2002
+
2003
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1973
2004
  """
1974
2005
  ...
1975
2006
 
@@ -1977,7 +2008,9 @@ def atomic_max(a: IndexedFabricArray[Any], i: int32, value: Any):
1977
2008
  @over
1978
2009
  def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1979
2010
  """
1980
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
2011
+ Compute the maximum of ``value`` and ``a[i,j]`` and atomically update the array.
2012
+
2013
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1981
2014
  """
1982
2015
  ...
1983
2016
 
@@ -1985,7 +2018,9 @@ def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, value: Any):
1985
2018
  @over
1986
2019
  def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value: Any):
1987
2020
  """
1988
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
2021
+ Compute the maximum of ``value`` and ``a[i,j,k]`` and atomically update the array.
2022
+
2023
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1989
2024
  """
1990
2025
  ...
1991
2026
 
@@ -1993,7 +2028,9 @@ def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, value:
1993
2028
  @over
1994
2029
  def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int32, value: Any):
1995
2030
  """
1996
- Compute the maximum of ``value`` and ``array[index]`` and atomically update the array. Note that for vectors and matrices the operation is only atomic on a per-component basis.
2031
+ Compute the maximum of ``value`` and ``a[i,j,k,l]`` and atomically update the array.
2032
+
2033
+ Note that for vectors and matrices the operation is only atomic on a per-component basis.
1997
2034
  """
1998
2035
  ...
1999
2036
 
@@ -2001,7 +2038,7 @@ def atomic_max(a: IndexedFabricArray[Any], i: int32, j: int32, k: int32, l: int3
2001
2038
  @over
2002
2039
  def lerp(a: Float, b: Float, t: Float) -> Float:
2003
2040
  """
2004
- Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t``
2041
+ Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``
2005
2042
  """
2006
2043
  ...
2007
2044
 
@@ -2009,7 +2046,7 @@ def lerp(a: Float, b: Float, t: Float) -> Float:
2009
2046
  @over
2010
2047
  def lerp(a: Vector[Any, Float], b: Vector[Any, Float], t: Float) -> Vector[Any, Float]:
2011
2048
  """
2012
- Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t``
2049
+ Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``
2013
2050
  """
2014
2051
  ...
2015
2052
 
@@ -2017,7 +2054,7 @@ def lerp(a: Vector[Any, Float], b: Vector[Any, Float], t: Float) -> Vector[Any,
2017
2054
  @over
2018
2055
  def lerp(a: Matrix[Any, Any, Float], b: Matrix[Any, Any, Float], t: Float) -> Matrix[Any, Any, Float]:
2019
2056
  """
2020
- Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t``
2057
+ Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``
2021
2058
  """
2022
2059
  ...
2023
2060
 
@@ -2025,7 +2062,7 @@ def lerp(a: Matrix[Any, Any, Float], b: Matrix[Any, Any, Float], t: Float) -> Ma
2025
2062
  @over
2026
2063
  def lerp(a: Quaternion[Float], b: Quaternion[Float], t: Float) -> Quaternion[Float]:
2027
2064
  """
2028
- Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t``
2065
+ Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``
2029
2066
  """
2030
2067
  ...
2031
2068
 
@@ -2033,7 +2070,7 @@ def lerp(a: Quaternion[Float], b: Quaternion[Float], t: Float) -> Quaternion[Flo
2033
2070
  @over
2034
2071
  def lerp(a: Transformation[Float], b: Transformation[Float], t: Float) -> Transformation[Float]:
2035
2072
  """
2036
- Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t``
2073
+ Linearly interpolate two values ``a`` and ``b`` using factor ``t``, computed as ``a*(1-t) + b*t``
2037
2074
  """
2038
2075
  ...
2039
2076
 
@@ -2041,7 +2078,8 @@ def lerp(a: Transformation[Float], b: Transformation[Float], t: Float) -> Transf
2041
2078
  @over
2042
2079
  def smoothstep(edge0: Float, edge1: Float, x: Float) -> Float:
2043
2080
  """
2044
- Smoothly interpolate between two values edge0 and edge1 using a factor x, and return a result between 0 and 1 using a cubic Hermite interpolation after clamping
2081
+ Smoothly interpolate between two values ``edge0`` and ``edge1`` using a factor ``x``,
2082
+ and return a result between 0 and 1 using a cubic Hermite interpolation after clamping.
2045
2083
  """
2046
2084
  ...
2047
2085
 
@@ -2049,7 +2087,7 @@ def smoothstep(edge0: Float, edge1: Float, x: Float) -> Float:
2049
2087
  @over
2050
2088
  def expect_near(arg1: Float, arg2: Float, tolerance: Float):
2051
2089
  """
2052
- Prints an error to stdout if arg1 and arg2 are not closer than tolerance in magnitude
2090
+ Prints an error to stdout if ``arg1`` and ``arg2`` are not closer than tolerance in magnitude
2053
2091
  """
2054
2092
  ...
2055
2093
 
@@ -2057,7 +2095,7 @@ def expect_near(arg1: Float, arg2: Float, tolerance: Float):
2057
2095
  @over
2058
2096
  def expect_near(arg1: vec3f, arg2: vec3f, tolerance: float32):
2059
2097
  """
2060
- Prints an error to stdout if any element of arg1 and arg2 are not closer than tolerance in magnitude
2098
+ Prints an error to stdout if any element of ``arg1`` and ``arg2`` are not closer than tolerance in magnitude
2061
2099
  """
2062
2100
  ...
2063
2101
 
@@ -2065,7 +2103,7 @@ def expect_near(arg1: vec3f, arg2: vec3f, tolerance: float32):
2065
2103
  @over
2066
2104
  def lower_bound(arr: Array[Scalar], value: Scalar) -> int:
2067
2105
  """
2068
- Search a sorted array for the closest element greater than or equal to value.
2106
+ Search a sorted array ``arr`` for the closest element greater than or equal to ``value``.
2069
2107
  """
2070
2108
  ...
2071
2109
 
@@ -2073,7 +2111,7 @@ def lower_bound(arr: Array[Scalar], value: Scalar) -> int:
2073
2111
  @over
2074
2112
  def lower_bound(arr: Array[Scalar], arr_begin: int32, arr_end: int32, value: Scalar) -> int:
2075
2113
  """
2076
- Search a sorted array range [arr_begin, arr_end) for the closest element greater than or equal to value.
2114
+ Search a sorted array ``arr`` in the range [arr_begin, arr_end) for the closest element greater than or equal to ``value``.
2077
2115
  """
2078
2116
  ...
2079
2117
 
@@ -2342,12 +2380,6 @@ def unot(b: bool) -> bool:
2342
2380
  ...
2343
2381
 
2344
2382
 
2345
- @over
2346
- def unot(b: bool) -> bool:
2347
- """ """
2348
- ...
2349
-
2350
-
2351
2383
  @over
2352
2384
  def unot(b: int8) -> bool:
2353
2385
  """ """