warp-lang 1.4.1__py3-none-manylinux2014_x86_64.whl → 1.4.2__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.
Potentially problematic release.
This version of warp-lang might be problematic. Click here for more details.
- warp/bin/warp-clang.so +0 -0
- warp/builtins.py +67 -39
- warp/codegen.py +9 -17
- warp/config.py +1 -1
- warp/context.py +1 -0
- warp/examples/core/example_dem.py +2 -1
- warp/examples/core/example_mesh_intersect.py +3 -3
- warp/examples/optim/example_walker.py +2 -2
- warp/examples/sim/example_jacobian_ik.py +6 -2
- warp/native/array.h +40 -40
- warp/native/builtin.h +58 -17
- warp/sim/model.py +2 -2
- warp/stubs.py +82 -81
- warp/tests/test_array.py +168 -48
- warp/tests/test_closest_point_edge_edge.py +8 -8
- warp/tests/test_codegen.py +39 -0
- warp/tests/test_fabricarray.py +33 -0
- warp/tests/test_func.py +35 -1
- warp/tests/test_mesh_query_point.py +4 -3
- warp/tests/test_print.py +135 -0
- warp/tests/unittest_suites.py +4 -0
- warp/types.py +1 -1
- {warp_lang-1.4.1.dist-info → warp_lang-1.4.2.dist-info}/METADATA +4 -4
- {warp_lang-1.4.1.dist-info → warp_lang-1.4.2.dist-info}/RECORD +27 -27
- {warp_lang-1.4.1.dist-info → warp_lang-1.4.2.dist-info}/WHEEL +1 -1
- {warp_lang-1.4.1.dist-info → warp_lang-1.4.2.dist-info}/LICENSE.md +0 -0
- {warp_lang-1.4.1.dist-info → warp_lang-1.4.2.dist-info}/top_level.txt +0 -0
warp/stubs.py
CHANGED
|
@@ -785,7 +785,8 @@ def transform_point(mat: Matrix[4, 4, Float], point: Vector[3, Float]) -> Vector
|
|
|
785
785
|
"""Apply the transform to a point ``point`` treating the homogeneous coordinate as w=1.
|
|
786
786
|
|
|
787
787
|
The transformation is applied treating ``point`` as a column vector, e.g.: ``y = mat*point``.
|
|
788
|
-
|
|
788
|
+
|
|
789
|
+
This is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = point^T*mat^T``.
|
|
789
790
|
If the transform is coming from a library that uses row-vectors, then users should transpose the transformation
|
|
790
791
|
matrix before calling this method.
|
|
791
792
|
"""
|
|
@@ -802,8 +803,9 @@ def transform_vector(xform: Transformation[Float], vec: Vector[3, Float]) -> Vec
|
|
|
802
803
|
def transform_vector(mat: Matrix[4, 4, Float], vec: Vector[3, Float]) -> Vector[3, Float]:
|
|
803
804
|
"""Apply the transform to a vector ``vec`` treating the homogeneous coordinate as w=0.
|
|
804
805
|
|
|
805
|
-
The transformation is applied treating ``vec`` as a column vector, e.g.: ``y = mat*vec
|
|
806
|
-
|
|
806
|
+
The transformation is applied treating ``vec`` as a column vector, e.g.: ``y = mat*vec``.
|
|
807
|
+
|
|
808
|
+
This is in contrast to some libraries, notably USD, which applies transforms to row vectors, ``y^T = vec^T*mat^T``.
|
|
807
809
|
If the transform is coming from a library that uses row-vectors, then users should transpose the transformation
|
|
808
810
|
matrix before calling this method.
|
|
809
811
|
"""
|
|
@@ -1638,361 +1640,361 @@ def select(arr: Array[Any], value_if_false: Any, value_if_true: Any) -> Any:
|
|
|
1638
1640
|
|
|
1639
1641
|
|
|
1640
1642
|
@over
|
|
1641
|
-
def atomic_add(arr: Array[Any], i:
|
|
1643
|
+
def atomic_add(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
1642
1644
|
"""Atomically add ``value`` onto ``arr[i]`` and return the old value."""
|
|
1643
1645
|
...
|
|
1644
1646
|
|
|
1645
1647
|
|
|
1646
1648
|
@over
|
|
1647
|
-
def atomic_add(arr: Array[Any], i:
|
|
1649
|
+
def atomic_add(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1648
1650
|
"""Atomically add ``value`` onto ``arr[i,j]`` and return the old value."""
|
|
1649
1651
|
...
|
|
1650
1652
|
|
|
1651
1653
|
|
|
1652
1654
|
@over
|
|
1653
|
-
def atomic_add(arr: Array[Any], i:
|
|
1655
|
+
def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1654
1656
|
"""Atomically add ``value`` onto ``arr[i,j,k]`` and return the old value."""
|
|
1655
1657
|
...
|
|
1656
1658
|
|
|
1657
1659
|
|
|
1658
1660
|
@over
|
|
1659
|
-
def atomic_add(arr: Array[Any], i:
|
|
1661
|
+
def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1660
1662
|
"""Atomically add ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
|
|
1661
1663
|
...
|
|
1662
1664
|
|
|
1663
1665
|
|
|
1664
1666
|
@over
|
|
1665
|
-
def atomic_add(arr: FabricArray[Any], i:
|
|
1667
|
+
def atomic_add(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
1666
1668
|
"""Atomically add ``value`` onto ``arr[i]`` and return the old value."""
|
|
1667
1669
|
...
|
|
1668
1670
|
|
|
1669
1671
|
|
|
1670
1672
|
@over
|
|
1671
|
-
def atomic_add(arr: FabricArray[Any], i:
|
|
1673
|
+
def atomic_add(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1672
1674
|
"""Atomically add ``value`` onto ``arr[i,j]`` and return the old value."""
|
|
1673
1675
|
...
|
|
1674
1676
|
|
|
1675
1677
|
|
|
1676
1678
|
@over
|
|
1677
|
-
def atomic_add(arr: FabricArray[Any], i:
|
|
1679
|
+
def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1678
1680
|
"""Atomically add ``value`` onto ``arr[i,j,k]`` and return the old value."""
|
|
1679
1681
|
...
|
|
1680
1682
|
|
|
1681
1683
|
|
|
1682
1684
|
@over
|
|
1683
|
-
def atomic_add(arr: FabricArray[Any], i:
|
|
1685
|
+
def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1684
1686
|
"""Atomically add ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
|
|
1685
1687
|
...
|
|
1686
1688
|
|
|
1687
1689
|
|
|
1688
1690
|
@over
|
|
1689
|
-
def atomic_add(arr: IndexedFabricArray[Any], i:
|
|
1691
|
+
def atomic_add(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
1690
1692
|
"""Atomically add ``value`` onto ``arr[i]`` and return the old value."""
|
|
1691
1693
|
...
|
|
1692
1694
|
|
|
1693
1695
|
|
|
1694
1696
|
@over
|
|
1695
|
-
def atomic_add(arr: IndexedFabricArray[Any], i:
|
|
1697
|
+
def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1696
1698
|
"""Atomically add ``value`` onto ``arr[i,j]`` and return the old value."""
|
|
1697
1699
|
...
|
|
1698
1700
|
|
|
1699
1701
|
|
|
1700
1702
|
@over
|
|
1701
|
-
def atomic_add(arr: IndexedFabricArray[Any], i:
|
|
1703
|
+
def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1702
1704
|
"""Atomically add ``value`` onto ``arr[i,j,k]`` and return the old value."""
|
|
1703
1705
|
...
|
|
1704
1706
|
|
|
1705
1707
|
|
|
1706
1708
|
@over
|
|
1707
|
-
def atomic_add(arr: IndexedFabricArray[Any], i:
|
|
1709
|
+
def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1708
1710
|
"""Atomically add ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
|
|
1709
1711
|
...
|
|
1710
1712
|
|
|
1711
1713
|
|
|
1712
1714
|
@over
|
|
1713
|
-
def atomic_sub(arr: Array[Any], i:
|
|
1715
|
+
def atomic_sub(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
1714
1716
|
"""Atomically subtract ``value`` onto ``arr[i]`` and return the old value."""
|
|
1715
1717
|
...
|
|
1716
1718
|
|
|
1717
1719
|
|
|
1718
1720
|
@over
|
|
1719
|
-
def atomic_sub(arr: Array[Any], i:
|
|
1721
|
+
def atomic_sub(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1720
1722
|
"""Atomically subtract ``value`` onto ``arr[i,j]`` and return the old value."""
|
|
1721
1723
|
...
|
|
1722
1724
|
|
|
1723
1725
|
|
|
1724
1726
|
@over
|
|
1725
|
-
def atomic_sub(arr: Array[Any], i:
|
|
1727
|
+
def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1726
1728
|
"""Atomically subtract ``value`` onto ``arr[i,j,k]`` and return the old value."""
|
|
1727
1729
|
...
|
|
1728
1730
|
|
|
1729
1731
|
|
|
1730
1732
|
@over
|
|
1731
|
-
def atomic_sub(arr: Array[Any], i:
|
|
1733
|
+
def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1732
1734
|
"""Atomically subtract ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
|
|
1733
1735
|
...
|
|
1734
1736
|
|
|
1735
1737
|
|
|
1736
1738
|
@over
|
|
1737
|
-
def atomic_sub(arr: FabricArray[Any], i:
|
|
1739
|
+
def atomic_sub(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
1738
1740
|
"""Atomically subtract ``value`` onto ``arr[i]`` and return the old value."""
|
|
1739
1741
|
...
|
|
1740
1742
|
|
|
1741
1743
|
|
|
1742
1744
|
@over
|
|
1743
|
-
def atomic_sub(arr: FabricArray[Any], i:
|
|
1745
|
+
def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1744
1746
|
"""Atomically subtract ``value`` onto ``arr[i,j]`` and return the old value."""
|
|
1745
1747
|
...
|
|
1746
1748
|
|
|
1747
1749
|
|
|
1748
1750
|
@over
|
|
1749
|
-
def atomic_sub(arr: FabricArray[Any], i:
|
|
1751
|
+
def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1750
1752
|
"""Atomically subtract ``value`` onto ``arr[i,j,k]`` and return the old value."""
|
|
1751
1753
|
...
|
|
1752
1754
|
|
|
1753
1755
|
|
|
1754
1756
|
@over
|
|
1755
|
-
def atomic_sub(arr: FabricArray[Any], i:
|
|
1757
|
+
def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1756
1758
|
"""Atomically subtract ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
|
|
1757
1759
|
...
|
|
1758
1760
|
|
|
1759
1761
|
|
|
1760
1762
|
@over
|
|
1761
|
-
def atomic_sub(arr: IndexedFabricArray[Any], i:
|
|
1763
|
+
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
1762
1764
|
"""Atomically subtract ``value`` onto ``arr[i]`` and return the old value."""
|
|
1763
1765
|
...
|
|
1764
1766
|
|
|
1765
1767
|
|
|
1766
1768
|
@over
|
|
1767
|
-
def atomic_sub(arr: IndexedFabricArray[Any], i:
|
|
1769
|
+
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1768
1770
|
"""Atomically subtract ``value`` onto ``arr[i,j]`` and return the old value."""
|
|
1769
1771
|
...
|
|
1770
1772
|
|
|
1771
1773
|
|
|
1772
1774
|
@over
|
|
1773
|
-
def atomic_sub(arr: IndexedFabricArray[Any], i:
|
|
1775
|
+
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1774
1776
|
"""Atomically subtract ``value`` onto ``arr[i,j,k]`` and return the old value."""
|
|
1775
1777
|
...
|
|
1776
1778
|
|
|
1777
1779
|
|
|
1778
1780
|
@over
|
|
1779
|
-
def atomic_sub(arr: IndexedFabricArray[Any], i:
|
|
1781
|
+
def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1780
1782
|
"""Atomically subtract ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
|
|
1781
1783
|
...
|
|
1782
1784
|
|
|
1783
1785
|
|
|
1784
1786
|
@over
|
|
1785
|
-
def atomic_min(arr: Array[Any], i:
|
|
1787
|
+
def atomic_min(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
1786
1788
|
"""Compute the minimum of ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
1787
1789
|
|
|
1788
|
-
|
|
1790
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1789
1791
|
"""
|
|
1790
1792
|
...
|
|
1791
1793
|
|
|
1792
1794
|
|
|
1793
1795
|
@over
|
|
1794
|
-
def atomic_min(arr: Array[Any], i:
|
|
1796
|
+
def atomic_min(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1795
1797
|
"""Compute the minimum of ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
1796
1798
|
|
|
1797
|
-
|
|
1799
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1798
1800
|
"""
|
|
1799
1801
|
...
|
|
1800
1802
|
|
|
1801
1803
|
|
|
1802
1804
|
@over
|
|
1803
|
-
def atomic_min(arr: Array[Any], i:
|
|
1805
|
+
def atomic_min(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1804
1806
|
"""Compute the minimum of ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
1805
1807
|
|
|
1806
|
-
|
|
1808
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1807
1809
|
"""
|
|
1808
1810
|
...
|
|
1809
1811
|
|
|
1810
1812
|
|
|
1811
1813
|
@over
|
|
1812
|
-
def atomic_min(arr: Array[Any], i:
|
|
1814
|
+
def atomic_min(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1813
1815
|
"""Compute the minimum of ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
1814
1816
|
|
|
1815
|
-
|
|
1817
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1816
1818
|
"""
|
|
1817
1819
|
...
|
|
1818
1820
|
|
|
1819
1821
|
|
|
1820
1822
|
@over
|
|
1821
|
-
def atomic_min(arr: FabricArray[Any], i:
|
|
1823
|
+
def atomic_min(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
1822
1824
|
"""Compute the minimum of ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
1823
1825
|
|
|
1824
|
-
|
|
1826
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1825
1827
|
"""
|
|
1826
1828
|
...
|
|
1827
1829
|
|
|
1828
1830
|
|
|
1829
1831
|
@over
|
|
1830
|
-
def atomic_min(arr: FabricArray[Any], i:
|
|
1832
|
+
def atomic_min(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1831
1833
|
"""Compute the minimum of ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
1832
1834
|
|
|
1833
|
-
|
|
1835
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1834
1836
|
"""
|
|
1835
1837
|
...
|
|
1836
1838
|
|
|
1837
1839
|
|
|
1838
1840
|
@over
|
|
1839
|
-
def atomic_min(arr: FabricArray[Any], i:
|
|
1841
|
+
def atomic_min(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1840
1842
|
"""Compute the minimum of ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
1841
1843
|
|
|
1842
|
-
|
|
1844
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1843
1845
|
"""
|
|
1844
1846
|
...
|
|
1845
1847
|
|
|
1846
1848
|
|
|
1847
1849
|
@over
|
|
1848
|
-
def atomic_min(arr: FabricArray[Any], i:
|
|
1850
|
+
def atomic_min(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1849
1851
|
"""Compute the minimum of ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
1850
1852
|
|
|
1851
|
-
|
|
1853
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1852
1854
|
"""
|
|
1853
1855
|
...
|
|
1854
1856
|
|
|
1855
1857
|
|
|
1856
1858
|
@over
|
|
1857
|
-
def atomic_min(arr: IndexedFabricArray[Any], i:
|
|
1859
|
+
def atomic_min(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
1858
1860
|
"""Compute the minimum of ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
1859
1861
|
|
|
1860
|
-
|
|
1862
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1861
1863
|
"""
|
|
1862
1864
|
...
|
|
1863
1865
|
|
|
1864
1866
|
|
|
1865
1867
|
@over
|
|
1866
|
-
def atomic_min(arr: IndexedFabricArray[Any], i:
|
|
1868
|
+
def atomic_min(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1867
1869
|
"""Compute the minimum of ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
1868
1870
|
|
|
1869
|
-
|
|
1871
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1870
1872
|
"""
|
|
1871
1873
|
...
|
|
1872
1874
|
|
|
1873
1875
|
|
|
1874
1876
|
@over
|
|
1875
|
-
def atomic_min(arr: IndexedFabricArray[Any], i:
|
|
1877
|
+
def atomic_min(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1876
1878
|
"""Compute the minimum of ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
1877
1879
|
|
|
1878
|
-
|
|
1880
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1879
1881
|
"""
|
|
1880
1882
|
...
|
|
1881
1883
|
|
|
1882
1884
|
|
|
1883
1885
|
@over
|
|
1884
|
-
def atomic_min(arr: IndexedFabricArray[Any], i:
|
|
1886
|
+
def atomic_min(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1885
1887
|
"""Compute the minimum of ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
1886
1888
|
|
|
1887
|
-
|
|
1889
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1888
1890
|
"""
|
|
1889
1891
|
...
|
|
1890
1892
|
|
|
1891
1893
|
|
|
1892
1894
|
@over
|
|
1893
|
-
def atomic_max(arr: Array[Any], i:
|
|
1895
|
+
def atomic_max(arr: Array[Any], i: Int, value: Any) -> Any:
|
|
1894
1896
|
"""Compute the maximum of ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
1895
1897
|
|
|
1896
|
-
|
|
1898
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1897
1899
|
"""
|
|
1898
1900
|
...
|
|
1899
1901
|
|
|
1900
1902
|
|
|
1901
1903
|
@over
|
|
1902
|
-
def atomic_max(arr: Array[Any], i:
|
|
1904
|
+
def atomic_max(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1903
1905
|
"""Compute the maximum of ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
1904
1906
|
|
|
1905
|
-
|
|
1907
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1906
1908
|
"""
|
|
1907
1909
|
...
|
|
1908
1910
|
|
|
1909
1911
|
|
|
1910
1912
|
@over
|
|
1911
|
-
def atomic_max(arr: Array[Any], i:
|
|
1913
|
+
def atomic_max(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1912
1914
|
"""Compute the maximum of ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
1913
1915
|
|
|
1914
|
-
|
|
1916
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1915
1917
|
"""
|
|
1916
1918
|
...
|
|
1917
1919
|
|
|
1918
1920
|
|
|
1919
1921
|
@over
|
|
1920
|
-
def atomic_max(arr: Array[Any], i:
|
|
1922
|
+
def atomic_max(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1921
1923
|
"""Compute the maximum of ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
1922
1924
|
|
|
1923
|
-
|
|
1925
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1924
1926
|
"""
|
|
1925
1927
|
...
|
|
1926
1928
|
|
|
1927
1929
|
|
|
1928
1930
|
@over
|
|
1929
|
-
def atomic_max(arr: FabricArray[Any], i:
|
|
1931
|
+
def atomic_max(arr: FabricArray[Any], i: Int, value: Any) -> Any:
|
|
1930
1932
|
"""Compute the maximum of ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
1931
1933
|
|
|
1932
|
-
|
|
1934
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1933
1935
|
"""
|
|
1934
1936
|
...
|
|
1935
1937
|
|
|
1936
1938
|
|
|
1937
1939
|
@over
|
|
1938
|
-
def atomic_max(arr: FabricArray[Any], i:
|
|
1940
|
+
def atomic_max(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1939
1941
|
"""Compute the maximum of ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
1940
1942
|
|
|
1941
|
-
|
|
1943
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1942
1944
|
"""
|
|
1943
1945
|
...
|
|
1944
1946
|
|
|
1945
1947
|
|
|
1946
1948
|
@over
|
|
1947
|
-
def atomic_max(arr: FabricArray[Any], i:
|
|
1949
|
+
def atomic_max(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1948
1950
|
"""Compute the maximum of ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
1949
1951
|
|
|
1950
|
-
|
|
1952
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1951
1953
|
"""
|
|
1952
1954
|
...
|
|
1953
1955
|
|
|
1954
1956
|
|
|
1955
1957
|
@over
|
|
1956
|
-
def atomic_max(arr: FabricArray[Any], i:
|
|
1958
|
+
def atomic_max(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1957
1959
|
"""Compute the maximum of ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
1958
1960
|
|
|
1959
|
-
|
|
1961
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1960
1962
|
"""
|
|
1961
1963
|
...
|
|
1962
1964
|
|
|
1963
1965
|
|
|
1964
1966
|
@over
|
|
1965
|
-
def atomic_max(arr: IndexedFabricArray[Any], i:
|
|
1967
|
+
def atomic_max(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
|
|
1966
1968
|
"""Compute the maximum of ``value`` and ``arr[i]``, atomically update the array, and return the old value.
|
|
1967
1969
|
|
|
1968
|
-
|
|
1970
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1969
1971
|
"""
|
|
1970
1972
|
...
|
|
1971
1973
|
|
|
1972
1974
|
|
|
1973
1975
|
@over
|
|
1974
|
-
def atomic_max(arr: IndexedFabricArray[Any], i:
|
|
1976
|
+
def atomic_max(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
|
|
1975
1977
|
"""Compute the maximum of ``value`` and ``arr[i,j]``, atomically update the array, and return the old value.
|
|
1976
1978
|
|
|
1977
|
-
|
|
1979
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1978
1980
|
"""
|
|
1979
1981
|
...
|
|
1980
1982
|
|
|
1981
1983
|
|
|
1982
1984
|
@over
|
|
1983
|
-
def atomic_max(arr: IndexedFabricArray[Any], i:
|
|
1985
|
+
def atomic_max(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
|
|
1984
1986
|
"""Compute the maximum of ``value`` and ``arr[i,j,k]``, atomically update the array, and return the old value.
|
|
1985
1987
|
|
|
1986
|
-
|
|
1988
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1987
1989
|
"""
|
|
1988
1990
|
...
|
|
1989
1991
|
|
|
1990
1992
|
|
|
1991
1993
|
@over
|
|
1992
|
-
def atomic_max(arr: IndexedFabricArray[Any], i:
|
|
1994
|
+
def atomic_max(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
|
|
1993
1995
|
"""Compute the maximum of ``value`` and ``arr[i,j,k,l]``, atomically update the array, and return the old value.
|
|
1994
1996
|
|
|
1995
|
-
|
|
1997
|
+
The operation is only atomic on a per-component basis for vectors and matrices.
|
|
1996
1998
|
"""
|
|
1997
1999
|
...
|
|
1998
2000
|
|
|
@@ -2411,12 +2413,11 @@ def unot(a: Array[Any]) -> bool:
|
|
|
2411
2413
|
def static(expr: Any) -> Any:
|
|
2412
2414
|
"""Evaluates a static Python expression and replaces it with its result.
|
|
2413
2415
|
|
|
2414
|
-
See the
|
|
2416
|
+
See the :ref:`code generation guide <static_expressions>` for more details.
|
|
2415
2417
|
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
(excluding Warp arrays since they cannot be created in a Warp kernel at the moment).
|
|
2418
|
+
The inner expression must only reference variables that are available from the current scope where the Warp kernel or function containing the expression is defined,
|
|
2419
|
+
which includes constant variables and variables captured in the current closure in which the function or kernel is implemented.
|
|
2420
|
+
The return type of the expression must be either a Warp function, a string, or a type that is supported inside Warp kernels and functions
|
|
2421
|
+
(excluding Warp arrays since they cannot be created in a Warp kernel at the moment).
|
|
2421
2422
|
"""
|
|
2422
2423
|
...
|