Skip to content

Commit a7084d8

Browse files
Merge branch 'ccrouzet/gh-506-tuples' into 'main'
Improve Support for Tuples in Kernels and Return Constant Values From `len()` Where Possible (GH-506) See merge request omniverse/warp!1262
2 parents 35de71e + 1d52025 commit a7084d8

24 files changed

Lines changed: 857 additions & 232 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
- Warn when an incompatible data type conversion is detected when constructing an array using the
5050
`__cuda_array_interface__` ([GH-624](https://github.com/NVIDIA/warp/issues/624),
5151
[GH-670](https://github.com/NVIDIA/warp/issues/670)).
52+
- Improve support for tuples in kernels
53+
([GH-506](https://github.com/NVIDIA/warp/issues/506)).
54+
- Return a constant value from `len()` where possible.
55+
- Rename the internal function `wp.types.type_length()` to `type_size()`.
5256

5357
### Fixed
5458

docs/modules/functions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,13 @@ Utility
22022202
Return the number of rows in a tile.
22032203

22042204

2205+
.. py:function:: len(a: Tuple) -> int
2206+
:noindex:
2207+
:nocontentsentry:
2208+
2209+
Return the number of elements in a tuple.
2210+
2211+
22052212

22062213

22072214
Geometry

0 commit comments

Comments
 (0)