diff --git a/CHANGELOG.md b/CHANGELOG.md index d6cdd8762..32720f653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # CHANGELOG +## [0.3.0] - 2022-07-08 + +- Add support for FP16 storage type, see `wp.float16` +- Add support for per-dimension byte strides, see `wp.array.strides` +- Add support for passing Python classes as kernel arguments, see `@wp.struct` decorator +- Add additional bounds checks for builtin matrix types +- Add additional floating point checks, see `wp.config.verify_fp` +- Add interleaved user source with generated code to aid debugging +- Add generalized GPU marching cubes implementation, see `wp.MarchingCubes` class +- Add additional scalar*matrix vector operators +- Add support for retrieving a single row from builtin types, e.g.: `r = m33[i]` +- Add `wp.log2()` and `wp.log10()` builtins +- Add support for quickly instancing `wp.sim.ModelBuilder` objects to improve env. creation performance for RL +- Remove custom CUB version and improve compatability with CUDA 11.7 +- Fix to preserve external user-gradients when calling `wp.Tape.zero()` +- Fix to only allocate gradient of a Torch tensor if `requires_grad=True` +- Fix for ray-cast precision in edge case on GPU (watertightness issue) +- Fix for kernel hot-reload when definition changes +- Fix for NVCC warnings on Linux +- Fix for generated function names when kernels are defined as class functions +- Fix for reload of generated CPU kernel code on Linux +- Fix for example scripts to ouput USD at 60 timecodes per-second (better Kit compatability) + + ## [0.2.3] - 2022-06-13 - Fix for incorrect 4d array bounds checking diff --git a/VERSION.md b/VERSION.md index 717903969..0d91a54c7 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -0.2.3 +0.3.0 diff --git a/docs/_build/html/_sources/modules/functions.rst.txt b/docs/_build/html/_sources/modules/functions.rst.txt index 8234adf96..96270cae8 100644 --- a/docs/_build/html/_sources/modules/functions.rst.txt +++ b/docs/_build/html/_sources/modules/functions.rst.txt @@ -16,6 +16,7 @@ Scalar Types .. autoclass:: uint32 .. autoclass:: int64 .. autoclass:: uint64 +.. autoclass:: float16 .. autoclass:: float32 .. autoclass:: float64 Vector Types @@ -154,6 +155,16 @@ Scalar Math Return the natural log (base-e) of x, where x is positive. +.. function:: log2(x: float32) -> float + + Return the natural log (base-2) of x, where x is positive. + + +.. function:: log10(x: float32) -> float + + Return the natural log (base-10) of x, where x is positive. + + .. function:: exp(x: float32) -> float Return base-e exponential, e^x. @@ -733,6 +744,36 @@ Utility Atomically subtract ``value`` onto the array at location given by indices. +.. function:: index(a: vec2, i: int32) -> float + + +.. function:: index(a: vec3, i: int32) -> float + + +.. function:: index(a: vec4, i: int32) -> float + + +.. function:: index(a: quat, i: int32) -> float + + +.. function:: index(a: mat22, i: int32) -> vec2 + + +.. function:: index(a: mat22, i: int32, j: int32) -> float + + +.. function:: index(a: mat33, i: int32) -> vec3 + + +.. function:: index(a: mat33, i: int32, j: int32) -> float + + +.. function:: index(a: mat44, i: int32) -> vec4 + + +.. function:: index(a: mat44, i: int32, j: int32) -> float + + .. function:: expect_eq(arg1: int8, arg2: int8) -> None Prints an error to stdout if arg1 and arg2 are not equal @@ -773,6 +814,11 @@ Utility Prints an error to stdout if arg1 and arg2 are not equal +.. function:: expect_eq(arg1: float16, arg2: float16) -> None + + Prints an error to stdout if arg1 and arg2 are not equal + + .. function:: expect_eq(arg1: float32, arg2: float32) -> None Prints an error to stdout if arg1 and arg2 are not equal @@ -833,6 +879,11 @@ Utility Prints an error to stdout if arg1 and arg2 are not equal +.. function:: lerp(a: float16, b: float16, t: float32) -> float16 + + Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t`` + + .. function:: lerp(a: float32, b: float32, t: float32) -> float32 Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t`` @@ -1240,6 +1291,15 @@ Operators .. function:: mul(x: float32, y: quat) -> quat +.. function:: mul(x: float32, y: mat22) -> mat22 + + +.. function:: mul(x: float32, y: mat33) -> mat33 + + +.. function:: mul(x: float32, y: mat44) -> mat44 + + .. function:: mul(x: vec2, y: float32) -> vec2 diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index 4e7723421..1c0193f63 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -69,7 +69,7 @@
- 0.2.3 + 0.3.0
@@ -197,7 +197,7 @@

A

  • acos() (in module warp)
  • -
  • add() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9], [10] +
  • add() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9], [10]
  • array (class in warp)
  • @@ -249,7 +249,7 @@

    C

  • cross() (in module warp)
  • -
  • curlnoise() (in module warp), [1], [2] +
  • curlnoise() (in module warp), [1], [2]
  • cw_div() (in module warp), [1], [2]
  • @@ -273,7 +273,7 @@

    D

    -
  • int16 (class in warp) +
  • index() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9]
  • -
  • int32 (class in warp) +
  • int16 (class in warp)
  • @@ -419,9 +427,9 @@

    M

  • mlp() (in module warp)
  • -
  • mod() (in module warp), [1] +
  • mod() (in module warp), [1]
  • -
  • mul() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23] +
  • mul() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], [25], [26]
  • @@ -429,9 +437,9 @@

    M

    N

      @@ -453,7 +461,7 @@

      O

      P

        -
      • pnoise() (in module warp), [1], [2], [3] +
      • pnoise() (in module warp), [1], [2], [3]
      • pow() (in module warp)
      • @@ -497,11 +505,11 @@

        Q

        R

          @@ -559,7 +567,7 @@

          S

        • step() (in module warp)
        • -
        • sub() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9] +
        • sub() (in module warp), [1], [2], [3], [4], [5], [6], [7], [8], [9]
        • svd3() (in module warp)
        • diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index f61cad043..86355afa1 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -70,7 +70,7 @@
          - 0.2.3 + 0.3.0
          diff --git a/docs/_build/html/modules/functions.html b/docs/_build/html/modules/functions.html index d34b71b25..73d1a7133 100644 --- a/docs/_build/html/modules/functions.html +++ b/docs/_build/html/modules/functions.html @@ -70,7 +70,7 @@
          - 0.2.3 + 0.3.0
          @@ -225,6 +225,11 @@

          Scalar Typesclass warp.uint64(x=0)
          +
          +
          +class warp.float16(x=0.0)
          +
          +
          class warp.float32(x=0.0)
          @@ -435,6 +440,18 @@

          Scalar Math +
          +warp.log2(x: float32) float
          +

          Return the natural log (base-2) of x, where x is positive.

          +

          + +
          +
          +warp.log10(x: float32) float
          +

          Return the natural log (base-10) of x, where x is positive.

          +
          +
          warp.exp(x: float32) float
          @@ -1125,6 +1142,56 @@

          Utilityvalue onto the array at location given by indices.

          +
          +
          +warp.index(a: vec2, i: int32) float
          +
          + +
          +
          +warp.index(a: vec3, i: int32) float
          +
          + +
          +
          +warp.index(a: vec4, i: int32) float
          +
          + +
          +
          +warp.index(a: quat, i: int32) float
          +
          + +
          +
          +warp.index(a: mat22, i: int32) vec2
          +
          + +
          +
          +warp.index(a: mat22, i: int32, j: int32) float
          +
          + +
          +
          +warp.index(a: mat33, i: int32) vec3
          +
          + +
          +
          +warp.index(a: mat33, i: int32, j: int32) float
          +
          + +
          +
          +warp.index(a: mat44, i: int32) vec4
          +
          + +
          +
          +warp.index(a: mat44, i: int32, j: int32) float
          +
          +
          warp.expect_eq(arg1: int8, arg2: int8) None
          @@ -1132,188 +1199,200 @@

          Utility -
          -warp.expect_eq(arg1: uint8, arg2: uint8) None
          +
          +warp.expect_eq(arg1: uint8, arg2: uint8) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: int16, arg2: int16) None
          +
          +warp.expect_eq(arg1: int16, arg2: int16) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: uint16, arg2: uint16) None
          +
          +warp.expect_eq(arg1: uint16, arg2: uint16) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: int32, arg2: int32) None
          +
          +warp.expect_eq(arg1: int32, arg2: int32) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: uint32, arg2: uint32) None
          +
          +warp.expect_eq(arg1: uint32, arg2: uint32) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: int64, arg2: int64) None
          +
          +warp.expect_eq(arg1: int64, arg2: int64) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: uint64, arg2: uint64) None
          +
          +warp.expect_eq(arg1: uint64, arg2: uint64) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: float32, arg2: float32) None
          +
          +warp.expect_eq(arg1: float16, arg2: float16) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: float64, arg2: float64) None
          +
          +warp.expect_eq(arg1: float32, arg2: float32) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: vec2, arg2: vec2) None
          +
          +warp.expect_eq(arg1: float64, arg2: float64) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: vec3, arg2: vec3) None
          +
          +warp.expect_eq(arg1: vec2, arg2: vec2) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: vec4, arg2: vec4) None
          +
          +warp.expect_eq(arg1: vec3, arg2: vec3) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: mat22, arg2: mat22) None
          +
          +warp.expect_eq(arg1: vec4, arg2: vec4) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: mat33, arg2: mat33) None
          +
          +warp.expect_eq(arg1: mat22, arg2: mat22) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: mat44, arg2: mat44) None
          +
          +warp.expect_eq(arg1: mat33, arg2: mat33) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: quat, arg2: quat) None
          +
          +warp.expect_eq(arg1: mat44, arg2: mat44) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: transform, arg2: transform) None
          +
          +warp.expect_eq(arg1: quat, arg2: quat) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: spatial_vector, arg2: spatial_vector) None
          +
          +warp.expect_eq(arg1: transform, arg2: transform) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -
          -warp.expect_eq(arg1: spatial_matrix, arg2: spatial_matrix) None
          +
          +warp.expect_eq(arg1: spatial_vector, arg2: spatial_vector) None
          +

          Prints an error to stdout if arg1 and arg2 are not equal

          +
          + +
          +
          +warp.expect_eq(arg1: spatial_matrix, arg2: spatial_matrix) None

          Prints an error to stdout if arg1 and arg2 are not equal

          -warp.lerp(a: float32, b: float32, t: float32) float32
          +warp.lerp(a: float16, b: float16, t: float32) float16

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: float64, b: float64, t: float32) float64
          +
          +warp.lerp(a: float32, b: float32, t: float32) float32

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: vec2, b: vec2, t: float32) vec2
          +
          +warp.lerp(a: float64, b: float64, t: float32) float64

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: vec3, b: vec3, t: float32) vec3
          +
          +warp.lerp(a: vec2, b: vec2, t: float32) vec2

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: vec4, b: vec4, t: float32) vec4
          +
          +warp.lerp(a: vec3, b: vec3, t: float32) vec3

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: mat22, b: mat22, t: float32) mat22
          +
          +warp.lerp(a: vec4, b: vec4, t: float32) vec4

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: mat33, b: mat33, t: float32) mat33
          +
          +warp.lerp(a: mat22, b: mat22, t: float32) mat22

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: mat44, b: mat44, t: float32) mat44
          +
          +warp.lerp(a: mat33, b: mat33, t: float32) mat33

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: quat, b: quat, t: float32) quat
          +
          +warp.lerp(a: mat44, b: mat44, t: float32) mat44

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: transform, b: transform, t: float32) transform
          +
          +warp.lerp(a: quat, b: quat, t: float32) quat

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: spatial_vector, b: spatial_vector, t: float32) spatial_vector
          +
          +warp.lerp(a: transform, b: transform, t: float32) transform

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          -
          -warp.lerp(a: spatial_matrix, b: spatial_matrix, t: float32) spatial_matrix
          +
          +warp.lerp(a: spatial_vector, b: spatial_vector, t: float32) spatial_vector
          +

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          +
          + +
          +
          +warp.lerp(a: spatial_matrix, b: spatial_matrix, t: float32) spatial_matrix

          Linearly interpolate two values a and b using factor t, computed as a*(1-t) + b*t

          @@ -1324,8 +1403,8 @@

          Utility -
          -warp.expect_near(arg1: vec3, arg2: vec3, tolerance: float32) None
          +
          +warp.expect_near(arg1: vec3, arg2: vec3, tolerance: float32) None

          Prints an error to stdout if any element of arg1 and arg2 are not closer than tolerance in magnitude

          @@ -1532,8 +1611,8 @@

          Random -
          -warp.rand_init(seed: int32, offset: int32) uint32
          +
          +warp.rand_init(seed: int32, offset: int32) uint32

          Initialize a new random number generator given a user-defined seed and an offset. This alternative constructor can be useful in parallel programs, where a kernel as a whole should share a seed, but each thread should generate uncorrelated values. In this case usage should be r = rand_init(seed, tid)

          @@ -1546,8 +1625,8 @@

          Random -
          -warp.randi(state: uint32, min: int32, max: int32) int
          +
          +warp.randi(state: uint32, min: int32, max: int32) int

          Return a random integer between [min, max)

          @@ -1558,8 +1637,8 @@

          Random -
          -warp.randf(state: uint32, min: float32, max: float32) float
          +
          +warp.randf(state: uint32, min: float32, max: float32) float

          Return a random float between [min, max)

          @@ -1576,20 +1655,20 @@

          Random -
          -warp.noise(state: uint32, xy: vec2) float
          +
          +warp.noise(state: uint32, xy: vec2) float

          Non-periodic Perlin-style noise in 2d.

          -
          -warp.noise(state: uint32, xyz: vec3) float
          +
          +warp.noise(state: uint32, xyz: vec3) float

          Non-periodic Perlin-style noise in 3d.

          -
          -warp.noise(state: uint32, xyzt: vec4) float
          +
          +warp.noise(state: uint32, xyzt: vec4) float

          Non-periodic Perlin-style noise in 4d.

          @@ -1600,20 +1679,20 @@

          Random -
          -warp.pnoise(state: uint32, xy: vec2, px: int32, py: int32) float
          +
          +warp.pnoise(state: uint32, xy: vec2, px: int32, py: int32) float

          Periodic Perlin-style noise in 2d.

          -
          -warp.pnoise(state: uint32, xyz: vec3, px: int32, py: int32, pz: int32) float
          +
          +warp.pnoise(state: uint32, xyz: vec3, px: int32, py: int32, pz: int32) float

          Periodic Perlin-style noise in 3d.

          -
          -warp.pnoise(state: uint32, xyzt: vec4, px: int32, py: int32, pz: int32, pt: int32) float
          +
          +warp.pnoise(state: uint32, xyzt: vec4, px: int32, py: int32, pz: int32, pt: int32) float

          Periodic Perlin-style noise in 4d.

          @@ -1624,14 +1703,14 @@

          Random -
          -warp.curlnoise(state: uint32, xyz: vec3) vec3
          +
          +warp.curlnoise(state: uint32, xyz: vec3) vec3

          Divergence-free vector field based on the curl of three Perlin noise functions.

          -
          -warp.curlnoise(state: uint32, xyzt: vec4) vec3
          +
          +warp.curlnoise(state: uint32, xyzt: vec4) vec3

          Divergence-free vector field based on the curl of three Perlin noise functions.

          @@ -1644,53 +1723,53 @@

          Operators -
          -warp.add(x: float32, y: float32) float
          +
          +warp.add(x: float32, y: float32) float
          -
          -warp.add(x: vec2, y: vec2) vec2
          +
          +warp.add(x: vec2, y: vec2) vec2
          -
          -warp.add(x: vec3, y: vec3) vec3
          +
          +warp.add(x: vec3, y: vec3) vec3
          -
          -warp.add(x: vec4, y: vec4) vec4
          +
          +warp.add(x: vec4, y: vec4) vec4
          -
          -warp.add(x: quat, y: quat) quat
          +
          +warp.add(x: quat, y: quat) quat
          -
          -warp.add(x: mat22, y: mat22) mat22
          +
          +warp.add(x: mat22, y: mat22) mat22
          -
          -warp.add(x: mat33, y: mat33) mat33
          +
          +warp.add(x: mat33, y: mat33) mat33
          -
          -warp.add(x: mat44, y: mat44) mat44
          +
          +warp.add(x: mat44, y: mat44) mat44
          -
          -warp.add(x: spatial_vector, y: spatial_vector) spatial_vector
          +
          +warp.add(x: spatial_vector, y: spatial_vector) spatial_vector
          -
          -warp.add(x: spatial_matrix, y: spatial_matrix) spatial_matrix
          +
          +warp.add(x: spatial_matrix, y: spatial_matrix) spatial_matrix
          @@ -1699,48 +1778,48 @@

          Operators -
          -warp.sub(x: float32, y: float32) float
          +
          +warp.sub(x: float32, y: float32) float

          -
          -warp.sub(x: vec2, y: vec2) vec2
          +
          +warp.sub(x: vec2, y: vec2) vec2
          -
          -warp.sub(x: vec3, y: vec3) vec3
          +
          +warp.sub(x: vec3, y: vec3) vec3
          -
          -warp.sub(x: vec4, y: vec4) vec4
          +
          +warp.sub(x: vec4, y: vec4) vec4
          -
          -warp.sub(x: mat22, y: mat22) mat22
          +
          +warp.sub(x: mat22, y: mat22) mat22
          -
          -warp.sub(x: mat33, y: mat33) mat33
          +
          +warp.sub(x: mat33, y: mat33) mat33
          -
          -warp.sub(x: mat44, y: mat44) mat44
          +
          +warp.sub(x: mat44, y: mat44) mat44
          -
          -warp.sub(x: spatial_vector, y: spatial_vector) spatial_vector
          +
          +warp.sub(x: spatial_vector, y: spatial_vector) spatial_vector
          -
          -warp.sub(x: spatial_matrix, y: spatial_matrix) spatial_matrix
          +
          +warp.sub(x: spatial_matrix, y: spatial_matrix) spatial_matrix
          @@ -1749,118 +1828,133 @@

          Operators -
          -warp.mul(x: float32, y: float32) float
          +
          +warp.mul(x: float32, y: float32) float

          -
          -warp.mul(x: float32, y: vec2) vec2
          +
          +warp.mul(x: float32, y: vec2) vec2
          -
          -warp.mul(x: float32, y: vec3) vec3
          +
          +warp.mul(x: float32, y: vec3) vec3
          -
          -warp.mul(x: float32, y: vec4) vec4
          +
          +warp.mul(x: float32, y: vec4) vec4
          -
          -warp.mul(x: float32, y: quat) quat
          +
          +warp.mul(x: float32, y: quat) quat
          -
          -warp.mul(x: vec2, y: float32) vec2
          +
          +warp.mul(x: float32, y: mat22) mat22
          -
          -warp.mul(x: vec3, y: float32) vec3
          +
          +warp.mul(x: float32, y: mat33) mat33
          -
          -warp.mul(x: vec4, y: float32) vec4
          +
          +warp.mul(x: float32, y: mat44) mat44
          -
          -warp.mul(x: quat, y: float32) quat
          +
          +warp.mul(x: vec2, y: float32) vec2
          -
          -warp.mul(x: quat, y: quat) quat
          +
          +warp.mul(x: vec3, y: float32) vec3
          -
          -warp.mul(x: mat22, y: float32) mat22
          +
          +warp.mul(x: vec4, y: float32) vec4
          -
          -warp.mul(x: mat22, y: vec2) vec2
          +
          +warp.mul(x: quat, y: float32) quat
          -
          -warp.mul(x: mat22, y: mat22) mat22
          +
          +warp.mul(x: quat, y: quat) quat
          -
          -warp.mul(x: mat33, y: float32) mat33
          +
          +warp.mul(x: mat22, y: float32) mat22
          -
          -warp.mul(x: mat33, y: vec3) vec3
          +
          +warp.mul(x: mat22, y: vec2) vec2
          -
          -warp.mul(x: mat33, y: mat33) mat33
          +
          +warp.mul(x: mat22, y: mat22) mat22
          -
          -warp.mul(x: mat44, y: float32) mat44
          +
          +warp.mul(x: mat33, y: float32) mat33
          -
          -warp.mul(x: mat44, y: vec4) vec4
          +
          +warp.mul(x: mat33, y: vec3) vec3
          -
          -warp.mul(x: mat44, y: mat44) mat44
          +
          +warp.mul(x: mat33, y: mat33) mat33
          -
          -warp.mul(x: spatial_vector, y: float32) spatial_vector
          +
          +warp.mul(x: mat44, y: float32) mat44
          -
          -warp.mul(x: spatial_matrix, y: spatial_matrix) spatial_matrix
          +
          +warp.mul(x: mat44, y: vec4) vec4
          -
          -warp.mul(x: spatial_matrix, y: spatial_vector) spatial_vector
          +
          +warp.mul(x: mat44, y: mat44) mat44
          -
          -warp.mul(x: transform, y: transform) transform
          +
          +warp.mul(x: spatial_vector, y: float32) spatial_vector
          +
          + +
          +
          +warp.mul(x: spatial_matrix, y: spatial_matrix) spatial_matrix
          +
          + +
          +
          +warp.mul(x: spatial_matrix, y: spatial_vector) spatial_vector
          +
          + +
          +
          +warp.mul(x: transform, y: transform) transform
          @@ -1869,8 +1963,8 @@

          Operators -
          -warp.mod(x: float32, y: float32) float
          +
          +warp.mod(x: float32, y: float32) float

          @@ -1879,23 +1973,23 @@

          Operators -
          -warp.div(x: float32, y: float32) float
          +
          +warp.div(x: float32, y: float32) float

          -
          -warp.div(x: vec2, y: float32) vec2
          +
          +warp.div(x: vec2, y: float32) vec2
          -
          -warp.div(x: vec3, y: float32) vec3
          +
          +warp.div(x: vec3, y: float32) vec3
          -
          -warp.div(x: vec4, y: float32) vec4
          +
          +warp.div(x: vec4, y: float32) vec4
          @@ -1904,8 +1998,8 @@

          Operators -
          -warp.floordiv(x: float32, y: float32) float
          +
          +warp.floordiv(x: float32, y: float32) float

          @@ -1914,38 +2008,38 @@

          Operators -
          -warp.neg(x: float32) float
          +
          +warp.neg(x: float32) float

          -
          -warp.neg(x: vec2) vec2
          +
          +warp.neg(x: vec2) vec2
          -
          -warp.neg(x: vec3) vec3
          +
          +warp.neg(x: vec3) vec3
          -
          -warp.neg(x: vec4) vec4
          +
          +warp.neg(x: vec4) vec4
          -
          -warp.neg(x: quat) quat
          +
          +warp.neg(x: quat) quat
          -
          -warp.neg(x: mat33) mat33
          +
          +warp.neg(x: mat33) mat33
          -
          -warp.neg(x: mat44) mat44
          +
          +warp.neg(x: mat44) mat44
          diff --git a/docs/_build/html/modules/introduction.html b/docs/_build/html/modules/introduction.html index 74ea8a6e5..f90810e6d 100644 --- a/docs/_build/html/modules/introduction.html +++ b/docs/_build/html/modules/introduction.html @@ -71,7 +71,7 @@
          - 0.2.3 + 0.3.0
          diff --git a/docs/_build/html/modules/runtime.html b/docs/_build/html/modules/runtime.html index 694ad15ee..277fa1706 100644 --- a/docs/_build/html/modules/runtime.html +++ b/docs/_build/html/modules/runtime.html @@ -71,7 +71,7 @@
          - 0.2.3 + 0.3.0
          @@ -451,7 +451,7 @@

          Multi-dimensional arrays
          -class warp.array(data=None, dtype=None, shape=None, length=0, ptr=None, capacity=0, device=None, copy=True, owner=True, ndim=None, requires_grad=False)
          +class warp.array(data=None, dtype=None, shape=None, strides=None, length=0, ptr=None, capacity=0, device=None, copy=True, owner=True, ndim=None, requires_grad=False)

          Constructs a new Warp array object from existing data.

          When the data argument is a valid list, tuple, or ndarray the array will be constructed from this object’s data. For objects that are not stored sequentially in memory (e.g.: a list), then the data will first @@ -466,6 +466,7 @@

          Multi-dimensional arrayslist, tuple, ndarray]) –

        • dtype (Union) – One of the built-in types, e.g.: warp.mat33, if dtype is None and data an ndarray then it will be inferred from the array data type

        • shape (Tuple) – Dimensions of the array

        • +
        • strides (Tuple) – Number of bytes in each dimension between successive elements of the array

        • length (int) – Number of elements (rows) of the data type (deprecated, users should use shape argument)

        • ptr (uint64) – Address of an external memory address to alias (data should be None)

        • capacity (int) – Maximum size in bytes of the ptr allocation (data should be None)

        • diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index 763749083..29651712f 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index d296b31b0..77fedace9 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -72,7 +72,7 @@
          - 0.2.3 + 0.3.0
          diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index 2b30afbcf..e8a6e6eda 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index","modules/functions","modules/introduction","modules/runtime"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["index.rst","modules\\functions.rst","modules\\introduction.rst","modules\\runtime.rst"],objects:{"warp.HashGrid":[[3,1,1,"","build"],[3,2,1,"id1","device"],[3,2,1,"id0","id"]],"warp.Mesh":[[3,2,1,"","device"],[3,2,1,"","id"],[3,1,1,"","refit"]],"warp.Volume":[[3,2,1,"","CLOSEST"],[3,2,1,"","LINEAR"]],warp:[[3,0,1,"","HashGrid"],[3,0,1,"","Mesh"],[3,0,1,"","Tape"],[3,0,1,"","Volume"],[1,3,1,"id3","abs"],[1,3,1,"","acos"],[1,3,1,"id114","add"],[3,0,1,"","array"],[1,3,1,"","asin"],[1,3,1,"","atan"],[1,3,1,"","atan2"],[1,3,1,"id59","atomic_add"],[1,3,1,"id62","atomic_sub"],[3,3,1,"","capture_begin"],[3,3,1,"","capture_end"],[3,3,1,"","capture_launch"],[1,3,1,"","ceil"],[1,3,1,"id2","clamp"],[3,0,1,"","constant"],[1,3,1,"","cos"],[1,3,1,"","cosh"],[1,3,1,"","cross"],[1,3,1,"id104","curlnoise"],[1,3,1,"id26","cw_div"],[1,3,1,"id24","cw_mul"],[1,3,1,"id20","determinant"],[1,3,1,"id22","diag"],[1,3,1,"id151","div"],[1,3,1,"id7","dot"],[3,3,1,"","empty"],[3,3,1,"","empty_like"],[1,3,1,"","exp"],[1,3,1,"id81","expect_eq"],[1,3,1,"id93","expect_near"],[1,0,1,"","float32"],[1,0,1,"","float64"],[1,3,1,"","floor"],[1,3,1,"id152","floordiv"],[1,3,1,"","hash_grid_point_id"],[1,3,1,"","hash_grid_query"],[1,3,1,"","hash_grid_query_next"],[1,0,1,"","int16"],[1,0,1,"","int32"],[1,0,1,"","int64"],[1,0,1,"","int8"],[1,3,1,"","intersect_tri_tri"],[1,3,1,"id18","inverse"],[3,3,1,"","launch"],[1,3,1,"id10","length"],[1,3,1,"id92","lerp"],[1,3,1,"","log"],[1,3,1,"id37","mat22"],[1,3,1,"id39","mat33"],[1,3,1,"id42","mat44"],[1,3,1,"id1","max"],[1,3,1,"","mesh_eval_face_normal"],[1,3,1,"","mesh_eval_position"],[1,3,1,"","mesh_eval_velocity"],[1,3,1,"","mesh_get_index"],[1,3,1,"","mesh_get_point"],[1,3,1,"","mesh_get_velocity"],[1,3,1,"","mesh_query_aabb"],[1,3,1,"","mesh_query_aabb_next"],[1,3,1,"","mesh_query_point"],[1,3,1,"","mesh_query_ray"],[1,3,1,"id0","min"],[1,3,1,"","mlp"],[1,3,1,"id147","mod"],[1,3,1,"id146","mul"],[1,3,1,"id159","neg"],[1,3,1,"id99","noise"],[1,3,1,"","nonzero"],[1,3,1,"id13","normalize"],[1,3,1,"id8","outer"],[1,3,1,"id102","pnoise"],[1,3,1,"","pow"],[1,3,1,"","print"],[1,3,1,"","printf"],[1,3,1,"id45","quat"],[1,3,1,"","quat_from_axis_angle"],[1,3,1,"","quat_from_matrix"],[1,3,1,"","quat_identity"],[1,3,1,"","quat_inverse"],[1,3,1,"","quat_rotate"],[1,3,1,"","quat_rotate_inv"],[1,3,1,"","quat_rpy"],[1,3,1,"","quat_to_matrix"],[1,3,1,"id94","rand_init"],[1,3,1,"id96","randf"],[1,3,1,"id95","randi"],[1,3,1,"","randn"],[1,3,1,"","rint"],[1,3,1,"","round"],[1,3,1,"","select"],[1,3,1,"id4","sign"],[1,3,1,"","sin"],[1,3,1,"","sinh"],[1,3,1,"","skew"],[1,3,1,"","spatial_adjoint"],[1,3,1,"","spatial_bottom"],[1,3,1,"","spatial_cross"],[1,3,1,"","spatial_cross_dual"],[1,3,1,"","spatial_dot"],[1,3,1,"","spatial_jacobian"],[1,3,1,"","spatial_mass"],[1,3,1,"id53","spatial_matrix"],[1,3,1,"","spatial_top"],[1,3,1,"id52","spatial_vector"],[1,3,1,"","sqrt"],[1,3,1,"","step"],[1,3,1,"id123","sub"],[1,3,1,"","svd3"],[1,3,1,"","tan"],[1,3,1,"","tanh"],[1,3,1,"id56","tid"],[1,3,1,"id46","transform"],[1,3,1,"","transform_get_rotation"],[1,3,1,"","transform_get_translation"],[1,3,1,"","transform_identity"],[1,3,1,"","transform_inverse"],[1,3,1,"","transform_multiply"],[1,3,1,"id47","transform_point"],[1,3,1,"id48","transform_vector"],[1,3,1,"id16","transpose"],[1,3,1,"","trunc"],[1,0,1,"","uint16"],[1,0,1,"","uint32"],[1,0,1,"","uint64"],[1,0,1,"","uint8"],[1,3,1,"","unot"],[1,3,1,"id29","vec2"],[1,3,1,"id32","vec3"],[1,3,1,"id35","vec4"],[1,3,1,"","volume_index_to_world"],[1,3,1,"","volume_index_to_world_dir"],[1,3,1,"","volume_lookup_f"],[1,3,1,"","volume_lookup_i"],[1,3,1,"","volume_lookup_v"],[1,3,1,"","volume_sample_f"],[1,3,1,"","volume_sample_i"],[1,3,1,"","volume_sample_v"],[1,3,1,"","volume_world_to_index"],[1,3,1,"","volume_world_to_index_dir"],[3,3,1,"","zeros"],[3,3,1,"","zeros_like"]]},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"],"3":["py","function","Python function"]},objtypes:{"0":"py:class","1":"py:method","2":"py:attribute","3":"py:function"},terms:{"0":[1,2,3],"1":[1,2,3],"100":3,"1024":[2,3],"1024x16":3,"128":3,"128x128x3":3,"16":3,"1d":[1,3],"2":[1,2,3],"2d":[1,3],"2x2":[1,3],"3":[2,3],"32":1,"3d":[1,3],"3x3":[1,3],"4":3,"4d":[1,3],"4x4":[1,3],"5":3,"6":3,"6d":[1,3],"6x6":[1,3],"7d":3,"abstract":3,"boolean":0,"byte":3,"case":[1,3],"class":[1,2,3],"default":[1,2,3],"do":3,"enum":3,"export":3,"float":[1,2,3],"function":[0,1,2],"import":[2,3],"int":[1,3],"long":3,"new":[1,2,3],"return":[1,2,3],"short":3,"static":3,"true":[1,3],"try":3,"while":[1,3],A:[1,3],By:3,For:[2,3],If:[1,3],In:[1,3],It:[1,3],One:3,The:[1,3],These:3,To:[2,3],__array_interface__:3,__cuda_array_interface__:3,ab:1,abov:[1,3],absolut:1,acceler:3,accept:3,access:[2,3],accustom:3,achiev:2,aco:1,act:1,activ:1,add:[1,3],addit:3,addition:3,address:3,adj_input:3,adj_output:3,adjoint:3,affin:1,after:3,against:[1,3],alia:[2,3],alias:3,align:1,all:[1,2,3],alloc:[2,3],allow:[1,3],along:[1,3],alreadi:3,also:3,altern:1,although:3,alwai:3,an:[1,2,3],angl:1,ani:[1,2,3],anim:2,annot:2,anoth:3,api:3,appli:1,applic:[2,3],approach:3,appropri:[2,3],ar:[1,2,3],arcco:1,arcsin:1,arctan:1,arg1:1,arg2:1,argument:[1,2,3],arithmet:0,arithmetr:3,around:[1,3],arrai:[0,1,2],array2d:3,array3d:3,asin:1,assign:3,assum:1,asynchron:[2,3],atan2:1,atan:1,atom:1,atomic_add:[1,3],atomic_sub:1,attach:3,attribut:3,auto:3,automat:[1,2],avail:3,avoid:[2,3],awai:1,axi:[1,3],b:[1,2,3],back:[2,3],background:1,backward:3,bary_u:1,bary_v:1,barycentr:[1,3],base:[1,3],basi:1,basic:3,batch:[1,3],been:3,befor:[1,2,3],begin:3,behav:1,being:3,belong:2,below:[2,3],best:[2,3],between:[1,2,3],bia:1,bit:1,blender:3,block:[1,3],bodi:[1,3],bool:[1,3],bottom:1,bound:[0,1],box:1,breakpoint:3,bring:2,bucket:3,buffer:[2,3],bug:3,build:[2,3],built:[0,3],bvh:3,byte_arrai:3,c0:1,c1:1,c2:1,c3:1,c4:1,c:[1,2,3],cach:2,calcul:1,call:[1,3],callabl:1,can:[1,2,3],cannot:[2,3],capac:3,capsul:3,captur:3,capture_begin:3,capture_end:3,capture_launch:3,care:3,cast:[1,3],ceil:1,cell:3,chain:3,chang:3,check:[0,1],circuit:3,clamp:1,close:3,closer:1,closest:[1,3],co:1,code:[2,3],coher:1,collid:3,colloqui:1,color:3,column:1,combin:1,come:1,common:3,commonli:3,compar:[1,3],comparison:0,compat:3,compil:[0,3],complet:3,complex:3,complex_kernel:3,compon:1,compont:1,compress:3,comput:[1,2,3],compute1:3,compute2:3,concaten:3,concept:3,cond:1,condit:3,config:3,configur:3,conjug:1,consid:1,consol:3,constant:0,construct:[1,2,3],constructor:[1,2,3],contain:3,content:3,context:3,contrast:1,conveni:2,convers:0,convert:[1,2,3],coordin:[1,3],copi:[2,3],correct:3,correctli:3,correspond:3,cosh:1,cosin:1,cpu:[2,3],cpython:2,creat:3,cross:1,cube:3,cuda:[0,2],cupi:0,curl:1,curlnois:1,current:[1,3],cw_div:1,cw_mul:1,d:[1,3],data:[0,2],datastructur:3,datatyp:3,dealloc:3,debug:0,debugg:3,declar:3,decor:[2,3],def:[2,3],defin:[1,2,3],definit:[2,3],delet:3,dem:3,deprec:3,describ:3,design:2,dest:2,dest_arrai:3,detail:[0,3],detect:3,determin:1,develop:3,devic:[2,3],device_arrai:[2,3],device_array_0:2,device_array_1:2,device_array_2:2,diag:1,diagnos:3,diagon:1,dictionari:2,differ:[1,2],differenti:[0,2],difficult:3,dim:[1,2,3],dim_i:3,dim_x:3,dim_z:3,dimens:[1,3],dimension:0,dir:1,direct:[1,3],directli:3,discard:1,discret:3,disk:3,dist:3,distanc:[1,3],distribut:1,div:1,diverg:1,divis:[1,3],dlpack:3,doe:[1,3],domain:3,done:2,dot:[1,2,3],doubl:3,down:3,download:2,dtype:[2,3],dual:1,dure:[1,3],dynam:[2,3],e:[1,2,3],each:[1,3],easi:2,edg:3,effect:3,either:2,element:[1,3],empti:[2,3],empty_lik:3,enabl:3,encount:3,end:3,ensur:[2,3],equal:[1,3],equival:[1,3],error:[1,3],establish:3,etc:[2,3],eval:2,evalu:[1,2,3],even:[1,3],everi:3,exampl:[0,3],except:[2,3],execut:[2,3],exist:[1,2,3],exp:1,expect:3,expect_eq:1,expect_near:1,explicit:3,explicitli:[2,3],exponenti:[1,3],expos:[2,3],express:[2,3],extens:[2,3],extern:3,f:[1,3],face:[1,3],factor:1,fail:3,fals:[1,2,3],fast:2,faster:1,featur:[0,1],fem:3,field:[1,3],file:3,finit:3,first:[1,2,3],fix:[1,3],flatten:[1,3],float16:[],float32:[1,3],float64:[1,3],floor:[1,3],floordiv:1,flow:3,fluid:3,fold:3,folder:3,follow:[2,3],forc:3,form:[1,3],format:[1,3],forward:3,found:1,foward:3,fraction:1,framework:[1,2,3],free:[1,3],freeli:3,from:[1,2,3],from_numpi:2,from_torch:3,front:1,full:3,func:[1,3],fundament:3,futur:3,g:[1,2,3],gen:3,gener:[1,2,3],geometr:3,geometri:[0,2,3],get:[2,3],get_devic:3,give:3,given:[1,3],global:[1,2,3],good:2,got:3,gpu:[2,3],gradient:[1,3],graph:0,graphic:[2,3],greater:[1,3],grid:[0,1],ha:3,halfwai:1,handl:3,hard:3,hash:[0,1],hash_grid_point_id:1,hash_grid_queri:[1,3],hash_grid_query_next:[1,3],hash_grid_query_t:1,hashgrid:3,have:[2,3],help:3,helper:3,hierarchi:3,high:2,hint:3,hit:[1,3],homogen:1,host:2,host_arrai:[2,3],host_array_0:2,host_array_1:2,host_array_2:2,houdini:3,how:3,howev:2,hydrodynam:3,i:[1,3],i_:1,id:[1,3],ident:1,identifi:[1,3],imaginari:1,immut:0,implement:[2,3],implicit:3,impos:3,includ:[2,3],incom:3,incompat:3,incred:3,index:[0,1,2,3],indic:[1,3],individu:3,inerti:1,inertia:[1,3],infer:[2,3],init:[2,3],initi:[0,1,2],input:[1,2,3],insert:3,insid:[1,3],inspect:3,instal:0,instead:[2,3],instruct:2,int16:[1,3],int32:[1,3],int64:[1,3],int8:[1,3],integ:[1,3],interact:3,interfac:3,intermedi:3,interop:0,interpol:[1,3],interpret:3,intersect:1,intersect_tri_tri:1,intrins:1,introduc:3,introduct:0,intuit:1,invalid:2,invers:1,involv:3,issu:3,item:1,iter:[1,3],its:1,ix:1,iy:1,iz:1,j:[1,3],j_out:1,j_start:1,jax:0,jit:2,joint_count:1,joint_par:1,joint_qd_start:1,joint_start:1,k:[1,3],keep:3,kernel:[0,2],kwarg:3,l:[1,3],laid:1,lambda:2,languag:0,larg:3,largest:1,launch:[0,1,2],layer:1,layout:1,lead:3,left:1,length:[1,2,3],lerp:1,less:[1,3],level:2,librari:[1,2,3],lie:3,like:1,limit:3,line:3,linear:[1,2,3],linearli:1,list:[2,3],littl:3,live:[2,3],load:[2,3],load_from_nvdb:3,local:[1,3],locat:[1,3],log:1,lookup:3,loop:3,loss:3,low:3,lower:1,m00:1,m01:1,m02:1,m03:1,m10:1,m11:1,m12:1,m13:1,m20:1,m21:1,m22:1,m23:1,m30:1,m31:1,m32:1,m33:1,m:1,m_start:1,magnitud:1,mai:[1,2,3],main:2,maintain:3,major:1,make:[2,3],manag:[2,3],mani:3,manual:2,map:3,mark:3,mat22:[1,2,3],mat33:[1,2,3],mat44:[1,2,3],match:3,math:[0,2,3],matric:[1,3],matrix33:2,matrix:[1,3],max:[1,3],max_dist:1,max_t:1,maximum:[1,3],md:2,mean:3,mechan:3,memori:[0,1,3],mesh:[0,1],mesh_eval_face_norm:1,mesh_eval_posit:1,mesh_eval_veloc:1,mesh_get_index:1,mesh_get_point:1,mesh_get_veloc:1,mesh_query_aabb:1,mesh_query_aabb_next:1,mesh_query_aabb_t:1,mesh_query_point:1,mesh_query_rai:[1,3],method:[1,3],min:1,minimum:1,mlp:1,mod:1,mode:3,model:[0,3],modifi:3,modul:[0,2,3],modulu:3,moller:1,more:[1,3],most:[1,3],move:[1,3],mul:1,multi:[0,1],multipl:[2,3],multipli:1,must:[1,2,3],mutat:[2,3],mygrid:3,n:[1,2,3],name:3,nanovdb:3,narrow:3,nativ:3,natur:1,ndarrai:3,ndim:3,nearest:[1,3],need:2,neg:1,neighbor:[1,3],network:1,next:1,nois:1,non:[1,3],none:[1,3],nonzero:1,normal:[1,3],notabl:1,notat:2,note:[1,2,3],np:3,numba:0,number:[1,2,3],numer:3,numpi:[0,1,2],nvdb:3,object:[1,3],occur:[1,3],offset:1,often:[2,3],onc:3,one:[2,3],onli:[1,3],onto:[1,2,3],open:3,openvdb:3,oper:[0,2],option:[1,3],order:[1,3],origin:3,other:[1,3],otherwis:[1,3],out:[1,3],outer:1,output:[1,2,3],outsid:3,over:[1,3],overhead:3,overlap:1,overwrit:3,own:3,owner:3,p:[1,3],packag:[2,3],page:0,parallel:[1,3],paramet:[1,2,3],part:[1,3],particip:3,particl:3,particularli:3,pass:[1,3],path:3,pattern:2,perceptron:1,perform:[2,3],period:1,perlin:1,physic:[2,3],pitch:1,pleas:[2,3],pnois:1,po:1,point:[1,3],poorli:3,posit:[1,3],possibl:[2,3],pow:1,power:1,pre:2,precis:3,preserv:1,previous:3,print:[0,1],print_launch:3,printf:[1,3],problem:3,problemat:3,procedur:2,process:[1,2,3],product:[1,2,3],program:[1,2,3],propag:3,protocol:3,provid:3,pt:1,ptr:3,ptx:2,put:3,px:1,py:1,python:[2,3],pytorch:[0,1,2],pz:1,q:[1,2,3],quarternion:1,quat:[1,2,3],quat_from_axis_angl:1,quat_from_matrix:1,quat_ident:1,quat_invers:1,quat_rot:1,quat_rotate_inv:1,quat_rpi:1,quat_to_matrix:1,quaternion:[0,2,3],queri:[1,3],queu:2,r:[1,2,3],radian:1,radiu:[1,3],rai:[1,3],rais:[1,3],rand:3,rand_init:1,randf:1,randi:1,randn:1,random:[0,3],rang:[1,3],rather:2,ray_dir:3,ray_hit:3,ray_origin:3,raycast:3,rb:3,re:[1,3],read:[2,3],readm:2,real:[1,3],rebuild:3,record:3,recurs:2,refer:[0,2],refit:3,regard:3,regist:2,replai:3,repres:[1,3],requir:3,requires_grad:3,resid:3,respect:3,respons:3,restart:2,restrict:3,result:[1,2,3],retriev:[1,3],retrun:1,reus:3,revers:3,right:1,rigid:[1,3],rint:1,rng:1,robust:1,roll:1,rot:1,rotat:1,round:1,row:[1,3],run:3,runtim:[0,2],s:[1,3],safe:3,same:[1,2,3],sampl:[1,3],sample_grid:3,sampling_mod:1,scalar:0,scale:[1,3],scene:3,screw:1,sdf:3,search:0,second:[1,3],secondari:3,see:[2,3],seed:1,select:1,semant:2,sens:[1,3],separ:3,sequenc:2,sequenti:3,seri:3,serial:3,set:[1,2,3],shade:2,shape:3,share:[1,2,3],should:[1,2,3],show:3,shown:3,side:3,sigma:1,sign:[1,3],signatur:[2,3],signific:3,silent:3,sim:3,similar:[1,2],simpl:3,simple_kernel:[2,3],simpli:3,simul:[0,2],sin:1,sinc:3,sine:1,singl:[1,3],singular:1,sinh:1,size:3,skew:1,slice:[2,3],slower:1,smallest:1,smooth:3,so:[2,3],some:[1,2,3],sourc:[2,3],space:[1,3],spars:3,spatial:[0,3],spatial_adjoint:1,spatial_bottom:[1,3],spatial_cross:1,spatial_cross_du:1,spatial_dot:1,spatial_jacobian:1,spatial_mass:1,spatial_matrix:[1,3],spatial_top:[1,3],spatial_vector:[1,3],specif:3,specifi:[1,2,3],sph:3,sphere:3,sqrt:1,squar:3,src:[2,3],src_arrai:3,standard:3,start:[1,3],startup:2,state:[1,2,3],stdout:1,step:[0,1],still:3,storag:3,store:[1,2,3],str:3,strict:3,strictli:3,string:[1,3],strong:0,strongli:2,structur:[2,3],studio:3,style:[1,3],sub:1,subject:3,subsequ:3,subtract:[1,3],suit:3,sum:3,support:[2,3],surpris:3,suspect:3,svd3:1,svd:1,symbol:3,symmetr:1,synchron:[2,3],syntax:[1,2,3],t:[1,3],take:[1,3],tan:1,tangent:1,tanh:1,tape:3,target:3,templat:3,temporari:[2,3],tensor:3,test:[1,3],than:[1,2,3],thei:3,them:3,therefor:3,thi:[1,2,3],thread:[1,2,3],three:1,through:0,tid:[1,2,3],time:[2,3],titl:[],to_torch:3,togeth:[1,2],toler:1,tool:3,top:1,topolog:3,torch:3,tr:1,track:[1,3],tranform:1,transfer:[2,3],transform:[0,3],transform_get_rot:1,transform_get_transl:1,transform_ident:1,transform_invers:1,transform_multipli:1,transform_point:1,transform_vector:1,translat:1,transpos:1,travers:1,treat:[1,3],triangl:[1,3],trigger:2,trilinear:3,trunc:1,tupl:[1,2,3],twist:[1,3],two:[1,2,3],type:0,type_capsul:3,type_cub:3,type_spher:3,typic:[1,3],u0:1,u1:1,u2:1,u:[1,3],uint16:[1,3],uint32:[1,3],uint64:[1,3],uint8:[1,3],uncompress:3,uncorrel:1,under:3,underli:[2,3],understand:3,uniniti:3,uninitiz:2,union:3,uniqu:3,unlik:2,unot:1,unrol:3,unsign:3,unsupport:0,updat:3,upper:1,us:[1,2,3],usag:[0,1,3],usd:1,user:[0,1,2],util:0,uvw:1,v0:1,v1:1,v2:1,v:[1,2,3],valid:[2,3],valu:[0,1,2],variabl:[1,2,3],variou:3,vdb:3,vec2:[1,2,3],vec3:[1,2,3],vec4:[1,2,3],vector:[0,2],veloc:[1,3],velocit:1,veri:3,verif:0,verifi:3,verify_cuda:3,version:3,vertex:[1,3],via:[2,3],view:[2,3],violat:3,visibl:2,visual:3,volum:0,volume_index_to_world:1,volume_index_to_world_dir:1,volume_lookup_f:1,volume_lookup_i:1,volume_lookup_v:1,volume_sample_f:[1,3],volume_sample_i:1,volume_sample_v:1,volume_world_to_index:[1,3],volume_world_to_index_dir:1,volumetr:3,voxel:[1,3],w:[1,3],wai:[1,3],warp:[1,2,3],watertight:1,we:[2,3],weight:1,well:3,what:3,when:[1,3],where:[1,2,3],whether:3,which:[1,2,3],whole:1,width:3,wise:1,within:3,withing:1,word:1,work:3,world:[1,3],wp:[1,2,3],wrap:2,wrapper:3,wrench:1,write:[2,3],written:3,x:[1,2,3],xy:1,xyz:1,xyzt:1,y:[1,2,3],yaw:1,you:3,z:[1,3],zero:[1,2,3],zeros_lik:3,zip:3},titles:["NVIDIA Warp Documentation","Kernel Reference","Introduction","Runtime Reference"],titleterms:{"boolean":3,"function":3,arithmet:3,arrai:3,bound:3,built:2,check:3,comparison:3,compil:2,constant:3,content:0,convers:3,cuda:3,cupi:3,data:3,debug:3,detail:2,differenti:3,dimension:3,document:0,exampl:2,featur:2,geometri:1,graph:3,grid:3,hash:3,immut:2,indic:0,initi:3,instal:2,interop:3,introduct:2,jax:3,kernel:[1,3],languag:2,launch:3,math:1,memori:2,mesh:3,model:2,multi:3,numba:3,numpi:3,nvidia:0,oper:[1,3],print:3,pytorch:3,quaternion:1,random:1,refer:[1,3],runtim:3,scalar:[1,3],simul:3,spatial:1,step:3,strong:2,tabl:0,through:3,transform:1,type:[1,2,3],unsupport:2,usag:2,user:3,util:1,valu:3,vector:[1,3],verif:3,volum:[1,3],warp:0}}) \ No newline at end of file +Search.setIndex({docnames:["index","modules/functions","modules/introduction","modules/runtime"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["index.rst","modules\\functions.rst","modules\\introduction.rst","modules\\runtime.rst"],objects:{"warp.HashGrid":[[3,1,1,"","build"],[3,2,1,"id1","device"],[3,2,1,"id0","id"]],"warp.Mesh":[[3,2,1,"","device"],[3,2,1,"","id"],[3,1,1,"","refit"]],"warp.Volume":[[3,2,1,"","CLOSEST"],[3,2,1,"","LINEAR"]],warp:[[3,0,1,"","HashGrid"],[3,0,1,"","Mesh"],[3,0,1,"","Tape"],[3,0,1,"","Volume"],[1,3,1,"id3","abs"],[1,3,1,"","acos"],[1,3,1,"id125","add"],[3,0,1,"","array"],[1,3,1,"","asin"],[1,3,1,"","atan"],[1,3,1,"","atan2"],[1,3,1,"id59","atomic_add"],[1,3,1,"id62","atomic_sub"],[3,3,1,"","capture_begin"],[3,3,1,"","capture_end"],[3,3,1,"","capture_launch"],[1,3,1,"","ceil"],[1,3,1,"id2","clamp"],[3,0,1,"","constant"],[1,3,1,"","cos"],[1,3,1,"","cosh"],[1,3,1,"","cross"],[1,3,1,"id115","curlnoise"],[1,3,1,"id26","cw_div"],[1,3,1,"id24","cw_mul"],[1,3,1,"id20","determinant"],[1,3,1,"id22","diag"],[1,3,1,"id165","div"],[1,3,1,"id7","dot"],[3,3,1,"","empty"],[3,3,1,"","empty_like"],[1,3,1,"","exp"],[1,3,1,"id91","expect_eq"],[1,3,1,"id104","expect_near"],[1,0,1,"","float16"],[1,0,1,"","float32"],[1,0,1,"","float64"],[1,3,1,"","floor"],[1,3,1,"id166","floordiv"],[1,3,1,"","hash_grid_point_id"],[1,3,1,"","hash_grid_query"],[1,3,1,"","hash_grid_query_next"],[1,3,1,"id71","index"],[1,0,1,"","int16"],[1,0,1,"","int32"],[1,0,1,"","int64"],[1,0,1,"","int8"],[1,3,1,"","intersect_tri_tri"],[1,3,1,"id18","inverse"],[3,3,1,"","launch"],[1,3,1,"id10","length"],[1,3,1,"id103","lerp"],[1,3,1,"","log"],[1,3,1,"","log10"],[1,3,1,"","log2"],[1,3,1,"id37","mat22"],[1,3,1,"id39","mat33"],[1,3,1,"id42","mat44"],[1,3,1,"id1","max"],[1,3,1,"","mesh_eval_face_normal"],[1,3,1,"","mesh_eval_position"],[1,3,1,"","mesh_eval_velocity"],[1,3,1,"","mesh_get_index"],[1,3,1,"","mesh_get_point"],[1,3,1,"","mesh_get_velocity"],[1,3,1,"","mesh_query_aabb"],[1,3,1,"","mesh_query_aabb_next"],[1,3,1,"","mesh_query_point"],[1,3,1,"","mesh_query_ray"],[1,3,1,"id0","min"],[1,3,1,"","mlp"],[1,3,1,"id161","mod"],[1,3,1,"id160","mul"],[1,3,1,"id173","neg"],[1,3,1,"id110","noise"],[1,3,1,"","nonzero"],[1,3,1,"id13","normalize"],[1,3,1,"id8","outer"],[1,3,1,"id113","pnoise"],[1,3,1,"","pow"],[1,3,1,"","print"],[1,3,1,"","printf"],[1,3,1,"id45","quat"],[1,3,1,"","quat_from_axis_angle"],[1,3,1,"","quat_from_matrix"],[1,3,1,"","quat_identity"],[1,3,1,"","quat_inverse"],[1,3,1,"","quat_rotate"],[1,3,1,"","quat_rotate_inv"],[1,3,1,"","quat_rpy"],[1,3,1,"","quat_to_matrix"],[1,3,1,"id105","rand_init"],[1,3,1,"id107","randf"],[1,3,1,"id106","randi"],[1,3,1,"","randn"],[1,3,1,"","rint"],[1,3,1,"","round"],[1,3,1,"","select"],[1,3,1,"id4","sign"],[1,3,1,"","sin"],[1,3,1,"","sinh"],[1,3,1,"","skew"],[1,3,1,"","spatial_adjoint"],[1,3,1,"","spatial_bottom"],[1,3,1,"","spatial_cross"],[1,3,1,"","spatial_cross_dual"],[1,3,1,"","spatial_dot"],[1,3,1,"","spatial_jacobian"],[1,3,1,"","spatial_mass"],[1,3,1,"id53","spatial_matrix"],[1,3,1,"","spatial_top"],[1,3,1,"id52","spatial_vector"],[1,3,1,"","sqrt"],[1,3,1,"","step"],[1,3,1,"id134","sub"],[1,3,1,"","svd3"],[1,3,1,"","tan"],[1,3,1,"","tanh"],[1,3,1,"id56","tid"],[1,3,1,"id46","transform"],[1,3,1,"","transform_get_rotation"],[1,3,1,"","transform_get_translation"],[1,3,1,"","transform_identity"],[1,3,1,"","transform_inverse"],[1,3,1,"","transform_multiply"],[1,3,1,"id47","transform_point"],[1,3,1,"id48","transform_vector"],[1,3,1,"id16","transpose"],[1,3,1,"","trunc"],[1,0,1,"","uint16"],[1,0,1,"","uint32"],[1,0,1,"","uint64"],[1,0,1,"","uint8"],[1,3,1,"","unot"],[1,3,1,"id29","vec2"],[1,3,1,"id32","vec3"],[1,3,1,"id35","vec4"],[1,3,1,"","volume_index_to_world"],[1,3,1,"","volume_index_to_world_dir"],[1,3,1,"","volume_lookup_f"],[1,3,1,"","volume_lookup_i"],[1,3,1,"","volume_lookup_v"],[1,3,1,"","volume_sample_f"],[1,3,1,"","volume_sample_i"],[1,3,1,"","volume_sample_v"],[1,3,1,"","volume_world_to_index"],[1,3,1,"","volume_world_to_index_dir"],[3,3,1,"","zeros"],[3,3,1,"","zeros_like"]]},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"],"3":["py","function","Python function"]},objtypes:{"0":"py:class","1":"py:method","2":"py:attribute","3":"py:function"},terms:{"0":[1,2,3],"1":[1,2,3],"10":1,"100":3,"1024":[2,3],"1024x16":3,"128":3,"128x128x3":3,"16":3,"1d":[1,3],"2":[1,2,3],"2d":[1,3],"2x2":[1,3],"3":[2,3],"32":1,"3d":[1,3],"3x3":[1,3],"4":3,"4d":[1,3],"4x4":[1,3],"5":3,"6":3,"6d":[1,3],"6x6":[1,3],"7d":3,"abstract":3,"boolean":0,"byte":3,"case":[1,3],"class":[1,2,3],"default":[1,2,3],"do":3,"enum":3,"export":3,"float":[1,2,3],"function":[0,1,2],"import":[2,3],"int":[1,3],"long":3,"new":[1,2,3],"return":[1,2,3],"short":3,"static":3,"true":[1,3],"try":3,"while":[1,3],A:[1,3],By:3,For:[2,3],If:[1,3],In:[1,3],It:[1,3],One:3,The:[1,3],These:3,To:[2,3],__array_interface__:3,__cuda_array_interface__:3,ab:1,abov:[1,3],absolut:1,acceler:3,accept:3,access:[2,3],accustom:3,achiev:2,aco:1,act:1,activ:1,add:[1,3],addit:3,addition:3,address:3,adj_input:3,adj_output:3,adjoint:3,affin:1,after:3,against:[1,3],alia:[2,3],alias:3,align:1,all:[1,2,3],alloc:[2,3],allow:[1,3],along:[1,3],alreadi:3,also:3,altern:1,although:3,alwai:3,an:[1,2,3],angl:1,ani:[1,2,3],anim:2,annot:2,anoth:3,api:3,appli:1,applic:[2,3],approach:3,appropri:[2,3],ar:[1,2,3],arcco:1,arcsin:1,arctan:1,arg1:1,arg2:1,argument:[1,2,3],arithmet:0,arithmetr:3,around:[1,3],arrai:[0,1,2],array2d:3,array3d:3,asin:1,assign:3,assum:1,asynchron:[2,3],atan2:1,atan:1,atom:1,atomic_add:[1,3],atomic_sub:1,attach:3,attribut:3,auto:3,automat:[1,2],avail:3,avoid:[2,3],awai:1,axi:[1,3],b:[1,2,3],back:[2,3],background:1,backward:3,bary_u:1,bary_v:1,barycentr:[1,3],base:[1,3],basi:1,basic:3,batch:[1,3],been:3,befor:[1,2,3],begin:3,behav:1,being:3,belong:2,below:[2,3],best:[2,3],between:[1,2,3],bia:1,bit:1,blender:3,block:[1,3],bodi:[1,3],bool:[1,3],bottom:1,bound:[0,1],box:1,breakpoint:3,bring:2,bucket:3,buffer:[2,3],bug:3,build:[2,3],built:[0,3],bvh:3,byte_arrai:3,c0:1,c1:1,c2:1,c3:1,c4:1,c:[1,2,3],cach:2,calcul:1,call:[1,3],callabl:1,can:[1,2,3],cannot:[2,3],capac:3,capsul:3,captur:3,capture_begin:3,capture_end:3,capture_launch:3,care:3,cast:[1,3],ceil:1,cell:3,chain:3,chang:3,check:[0,1],circuit:3,clamp:1,close:3,closer:1,closest:[1,3],co:1,code:[2,3],coher:1,collid:3,colloqui:1,color:3,column:1,combin:1,come:1,common:3,commonli:3,compar:[1,3],comparison:0,compat:3,compil:[0,3],complet:3,complex:3,complex_kernel:3,compon:1,compont:1,compress:3,comput:[1,2,3],compute1:3,compute2:3,concaten:3,concept:3,cond:1,condit:3,config:3,configur:3,conjug:1,consid:1,consol:3,constant:0,construct:[1,2,3],constructor:[1,2,3],contain:3,content:3,context:3,contrast:1,conveni:2,convers:0,convert:[1,2,3],coordin:[1,3],copi:[2,3],correct:3,correctli:3,correspond:3,cosh:1,cosin:1,cpu:[2,3],cpython:2,creat:3,cross:1,cube:3,cuda:[0,2],cupi:0,curl:1,curlnois:1,current:[1,3],cw_div:1,cw_mul:1,d:[1,3],data:[0,2],datastructur:3,datatyp:3,dealloc:3,debug:0,debugg:3,declar:3,decor:[2,3],def:[2,3],defin:[1,2,3],definit:[2,3],delet:3,dem:3,deprec:3,describ:3,design:2,dest:2,dest_arrai:3,detail:[0,3],detect:3,determin:1,develop:3,devic:[2,3],device_arrai:[2,3],device_array_0:2,device_array_1:2,device_array_2:2,diag:1,diagnos:3,diagon:1,dictionari:2,differ:[1,2],differenti:[0,2],difficult:3,dim:[1,2,3],dim_i:3,dim_x:3,dim_z:3,dimens:[1,3],dimension:0,dir:1,direct:[1,3],directli:3,discard:1,discret:3,disk:3,dist:3,distanc:[1,3],distribut:1,div:1,diverg:1,divis:[1,3],dlpack:3,doe:[1,3],domain:3,done:2,dot:[1,2,3],doubl:3,down:3,download:2,dtype:[2,3],dual:1,dure:[1,3],dynam:[2,3],e:[1,2,3],each:[1,3],easi:2,edg:3,effect:3,either:2,element:[1,3],empti:[2,3],empty_lik:3,enabl:3,encount:3,end:3,ensur:[2,3],equal:[1,3],equival:[1,3],error:[1,3],establish:3,etc:[2,3],eval:2,evalu:[1,2,3],even:[1,3],everi:3,exampl:[0,3],except:[2,3],execut:[2,3],exist:[1,2,3],exp:1,expect:3,expect_eq:1,expect_near:1,explicit:3,explicitli:[2,3],exponenti:[1,3],expos:[2,3],express:[2,3],extens:[2,3],extern:3,f:[1,3],face:[1,3],factor:1,fail:3,fals:[1,2,3],fast:2,faster:1,featur:[0,1],fem:3,field:[1,3],file:3,finit:3,first:[1,2,3],fix:[1,3],flatten:[1,3],float16:1,float32:[1,3],float64:[1,3],floor:[1,3],floordiv:1,flow:3,fluid:3,fold:3,folder:3,follow:[2,3],forc:3,form:[1,3],format:[1,3],forward:3,found:1,foward:3,fraction:1,framework:[1,2,3],free:[1,3],freeli:3,from:[1,2,3],from_numpi:2,from_torch:3,front:1,full:3,func:[1,3],fundament:3,futur:3,g:[1,2,3],gen:3,gener:[1,2,3],geometr:3,geometri:[0,2,3],get:[2,3],get_devic:3,give:3,given:[1,3],global:[1,2,3],good:2,got:3,gpu:[2,3],gradient:[1,3],graph:0,graphic:[2,3],greater:[1,3],grid:[0,1],ha:3,halfwai:1,handl:3,hard:3,hash:[0,1],hash_grid_point_id:1,hash_grid_queri:[1,3],hash_grid_query_next:[1,3],hash_grid_query_t:1,hashgrid:3,have:[2,3],help:3,helper:3,hierarchi:3,high:2,hint:3,hit:[1,3],homogen:1,host:2,host_arrai:[2,3],host_array_0:2,host_array_1:2,host_array_2:2,houdini:3,how:3,howev:2,hydrodynam:3,i:[1,3],i_:1,id:[1,3],ident:1,identifi:[1,3],imaginari:1,immut:0,implement:[2,3],implicit:3,impos:3,includ:[2,3],incom:3,incompat:3,incred:3,index:[0,1,2,3],indic:[1,3],individu:3,inerti:1,inertia:[1,3],infer:[2,3],init:[2,3],initi:[0,1,2],input:[1,2,3],insert:3,insid:[1,3],inspect:3,instal:0,instead:[2,3],instruct:2,int16:[1,3],int32:[1,3],int64:[1,3],int8:[1,3],integ:[1,3],interact:3,interfac:3,intermedi:3,interop:0,interpol:[1,3],interpret:3,intersect:1,intersect_tri_tri:1,intrins:1,introduc:3,introduct:0,intuit:1,invalid:2,invers:1,involv:3,issu:3,item:1,iter:[1,3],its:1,ix:1,iy:1,iz:1,j:[1,3],j_out:1,j_start:1,jax:0,jit:2,joint_count:1,joint_par:1,joint_qd_start:1,joint_start:1,k:[1,3],keep:3,kernel:[0,2],kwarg:3,l:[1,3],laid:1,lambda:2,languag:0,larg:3,largest:1,launch:[0,1,2],layer:1,layout:1,lead:3,left:1,length:[1,2,3],lerp:1,less:[1,3],level:2,librari:[1,2,3],lie:3,like:1,limit:3,line:3,linear:[1,2,3],linearli:1,list:[2,3],littl:3,live:[2,3],load:[2,3],load_from_nvdb:3,local:[1,3],locat:[1,3],log10:1,log2:1,log:1,lookup:3,loop:3,loss:3,low:3,lower:1,m00:1,m01:1,m02:1,m03:1,m10:1,m11:1,m12:1,m13:1,m20:1,m21:1,m22:1,m23:1,m30:1,m31:1,m32:1,m33:1,m:1,m_start:1,magnitud:1,mai:[1,2,3],main:2,maintain:3,major:1,make:[2,3],manag:[2,3],mani:3,manual:2,map:3,mark:3,mat22:[1,2,3],mat33:[1,2,3],mat44:[1,2,3],match:3,math:[0,2,3],matric:[1,3],matrix33:2,matrix:[1,3],max:[1,3],max_dist:1,max_t:1,maximum:[1,3],md:2,mean:3,mechan:3,memori:[0,1,3],mesh:[0,1],mesh_eval_face_norm:1,mesh_eval_posit:1,mesh_eval_veloc:1,mesh_get_index:1,mesh_get_point:1,mesh_get_veloc:1,mesh_query_aabb:1,mesh_query_aabb_next:1,mesh_query_aabb_t:1,mesh_query_point:1,mesh_query_rai:[1,3],method:[1,3],min:1,minimum:1,mlp:1,mod:1,mode:3,model:[0,3],modifi:3,modul:[0,2,3],modulu:3,moller:1,more:[1,3],most:[1,3],move:[1,3],mul:1,multi:[0,1],multipl:[2,3],multipli:1,must:[1,2,3],mutat:[2,3],mygrid:3,n:[1,2,3],name:3,nanovdb:3,narrow:3,nativ:3,natur:1,ndarrai:3,ndim:3,nearest:[1,3],need:2,neg:1,neighbor:[1,3],network:1,next:1,nois:1,non:[1,3],none:[1,3],nonzero:1,normal:[1,3],notabl:1,notat:2,note:[1,2,3],np:3,numba:0,number:[1,2,3],numer:3,numpi:[0,1,2],nvdb:3,object:[1,3],occur:[1,3],offset:1,often:[2,3],onc:3,one:[2,3],onli:[1,3],onto:[1,2,3],open:3,openvdb:3,oper:[0,2],option:[1,3],order:[1,3],origin:3,other:[1,3],otherwis:[1,3],out:[1,3],outer:1,output:[1,2,3],outsid:3,over:[1,3],overhead:3,overlap:1,overwrit:3,own:3,owner:3,p:[1,3],packag:[2,3],page:0,parallel:[1,3],paramet:[1,2,3],part:[1,3],particip:3,particl:3,particularli:3,pass:[1,3],path:3,pattern:2,perceptron:1,perform:[2,3],period:1,perlin:1,physic:[2,3],pitch:1,pleas:[2,3],pnois:1,po:1,point:[1,3],poorli:3,posit:[1,3],possibl:[2,3],pow:1,power:1,pre:2,precis:3,preserv:1,previous:3,print:[0,1],print_launch:3,printf:[1,3],problem:3,problemat:3,procedur:2,process:[1,2,3],product:[1,2,3],program:[1,2,3],propag:3,protocol:3,provid:3,pt:1,ptr:3,ptx:2,put:3,px:1,py:1,python:[2,3],pytorch:[0,1,2],pz:1,q:[1,2,3],quarternion:1,quat:[1,2,3],quat_from_axis_angl:1,quat_from_matrix:1,quat_ident:1,quat_invers:1,quat_rot:1,quat_rotate_inv:1,quat_rpi:1,quat_to_matrix:1,quaternion:[0,2,3],queri:[1,3],queu:2,r:[1,2,3],radian:1,radiu:[1,3],rai:[1,3],rais:[1,3],rand:3,rand_init:1,randf:1,randi:1,randn:1,random:[0,3],rang:[1,3],rather:2,ray_dir:3,ray_hit:3,ray_origin:3,raycast:3,rb:3,re:[1,3],read:[2,3],readm:2,real:[1,3],rebuild:3,record:3,recurs:2,refer:[0,2],refit:3,regard:3,regist:2,replai:3,repres:[1,3],requir:3,requires_grad:3,resid:3,respect:3,respons:3,restart:2,restrict:3,result:[1,2,3],retriev:[1,3],retrun:1,reus:3,revers:3,right:1,rigid:[1,3],rint:1,rng:1,robust:1,roll:1,rot:1,rotat:1,round:1,row:[1,3],run:3,runtim:[0,2],s:[1,3],safe:3,same:[1,2,3],sampl:[1,3],sample_grid:3,sampling_mod:1,scalar:0,scale:[1,3],scene:3,screw:1,sdf:3,search:0,second:[1,3],secondari:3,see:[2,3],seed:1,select:1,semant:2,sens:[1,3],separ:3,sequenc:2,sequenti:3,seri:3,serial:3,set:[1,2,3],shade:2,shape:3,share:[1,2,3],should:[1,2,3],show:3,shown:3,side:3,sigma:1,sign:[1,3],signatur:[2,3],signific:3,silent:3,sim:3,similar:[1,2],simpl:3,simple_kernel:[2,3],simpli:3,simul:[0,2],sin:1,sinc:3,sine:1,singl:[1,3],singular:1,sinh:1,size:3,skew:1,slice:[2,3],slower:1,smallest:1,smooth:3,so:[2,3],some:[1,2,3],sourc:[2,3],space:[1,3],spars:3,spatial:[0,3],spatial_adjoint:1,spatial_bottom:[1,3],spatial_cross:1,spatial_cross_du:1,spatial_dot:1,spatial_jacobian:1,spatial_mass:1,spatial_matrix:[1,3],spatial_top:[1,3],spatial_vector:[1,3],specif:3,specifi:[1,2,3],sph:3,sphere:3,sqrt:1,squar:3,src:[2,3],src_arrai:3,standard:3,start:[1,3],startup:2,state:[1,2,3],stdout:1,step:[0,1],still:3,storag:3,store:[1,2,3],str:3,strict:3,strictli:3,stride:3,string:[1,3],strong:0,strongli:2,structur:[2,3],studio:3,style:[1,3],sub:1,subject:3,subsequ:3,subtract:[1,3],success:3,suit:3,sum:3,support:[2,3],surpris:3,suspect:3,svd3:1,svd:1,symbol:3,symmetr:1,synchron:[2,3],syntax:[1,2,3],t:[1,3],take:[1,3],tan:1,tangent:1,tanh:1,tape:3,target:3,templat:3,temporari:[2,3],tensor:3,test:[1,3],than:[1,2,3],thei:3,them:3,therefor:3,thi:[1,2,3],thread:[1,2,3],three:1,through:0,tid:[1,2,3],time:[2,3],titl:[],to_torch:3,togeth:[1,2],toler:1,tool:3,top:1,topolog:3,torch:3,tr:1,track:[1,3],tranform:1,transfer:[2,3],transform:[0,3],transform_get_rot:1,transform_get_transl:1,transform_ident:1,transform_invers:1,transform_multipli:1,transform_point:1,transform_vector:1,translat:1,transpos:1,travers:1,treat:[1,3],triangl:[1,3],trigger:2,trilinear:3,trunc:1,tupl:[1,2,3],twist:[1,3],two:[1,2,3],type:0,type_capsul:3,type_cub:3,type_spher:3,typic:[1,3],u0:1,u1:1,u2:1,u:[1,3],uint16:[1,3],uint32:[1,3],uint64:[1,3],uint8:[1,3],uncompress:3,uncorrel:1,under:3,underli:[2,3],understand:3,uniniti:3,uninitiz:2,union:3,uniqu:3,unlik:2,unot:1,unrol:3,unsign:3,unsupport:0,updat:3,upper:1,us:[1,2,3],usag:[0,1,3],usd:1,user:[0,1,2],util:0,uvw:1,v0:1,v1:1,v2:1,v:[1,2,3],valid:[2,3],valu:[0,1,2],variabl:[1,2,3],variou:3,vdb:3,vec2:[1,2,3],vec3:[1,2,3],vec4:[1,2,3],vector:[0,2],veloc:[1,3],velocit:1,veri:3,verif:0,verifi:3,verify_cuda:3,version:3,vertex:[1,3],via:[2,3],view:[2,3],violat:3,visibl:2,visual:3,volum:0,volume_index_to_world:1,volume_index_to_world_dir:1,volume_lookup_f:1,volume_lookup_i:1,volume_lookup_v:1,volume_sample_f:[1,3],volume_sample_i:1,volume_sample_v:1,volume_world_to_index:[1,3],volume_world_to_index_dir:1,volumetr:3,voxel:[1,3],w:[1,3],wai:[1,3],warp:[1,2,3],watertight:1,we:[2,3],weight:1,well:3,what:3,when:[1,3],where:[1,2,3],whether:3,which:[1,2,3],whole:1,width:3,wise:1,within:3,withing:1,word:1,work:3,world:[1,3],wp:[1,2,3],wrap:2,wrapper:3,wrench:1,write:[2,3],written:3,x:[1,2,3],xy:1,xyz:1,xyzt:1,y:[1,2,3],yaw:1,you:3,z:[1,3],zero:[1,2,3],zeros_lik:3,zip:3},titles:["NVIDIA Warp Documentation","Kernel Reference","Introduction","Runtime Reference"],titleterms:{"boolean":3,"function":3,arithmet:3,arrai:3,bound:3,built:2,check:3,comparison:3,compil:2,constant:3,content:0,convers:3,cuda:3,cupi:3,data:3,debug:3,detail:2,differenti:3,dimension:3,document:0,exampl:2,featur:2,geometri:1,graph:3,grid:3,hash:3,immut:2,indic:0,initi:3,instal:2,interop:3,introduct:2,jax:3,kernel:[1,3],languag:2,launch:3,math:1,memori:2,mesh:3,model:2,multi:3,numba:3,numpi:3,nvidia:0,oper:[1,3],print:3,pytorch:3,quaternion:1,random:1,refer:[1,3],runtim:3,scalar:[1,3],simul:3,spatial:1,step:3,strong:2,tabl:0,through:3,transform:1,type:[1,2,3],unsupport:2,usag:2,user:3,util:1,valu:3,vector:[1,3],verif:3,volum:[1,3],warp:0}}) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index d01ab9e0e..34fc0233a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,7 @@ copyright = '2022, NVIDIA' author = 'NVIDIA' -version = '0.2.3' +version = '0.3.0' # -- General configuration --------------------------------------------------- diff --git a/docs/modules/functions.rst b/docs/modules/functions.rst index 8234adf96..96270cae8 100644 --- a/docs/modules/functions.rst +++ b/docs/modules/functions.rst @@ -16,6 +16,7 @@ Scalar Types .. autoclass:: uint32 .. autoclass:: int64 .. autoclass:: uint64 +.. autoclass:: float16 .. autoclass:: float32 .. autoclass:: float64 Vector Types @@ -154,6 +155,16 @@ Scalar Math Return the natural log (base-e) of x, where x is positive. +.. function:: log2(x: float32) -> float + + Return the natural log (base-2) of x, where x is positive. + + +.. function:: log10(x: float32) -> float + + Return the natural log (base-10) of x, where x is positive. + + .. function:: exp(x: float32) -> float Return base-e exponential, e^x. @@ -733,6 +744,36 @@ Utility Atomically subtract ``value`` onto the array at location given by indices. +.. function:: index(a: vec2, i: int32) -> float + + +.. function:: index(a: vec3, i: int32) -> float + + +.. function:: index(a: vec4, i: int32) -> float + + +.. function:: index(a: quat, i: int32) -> float + + +.. function:: index(a: mat22, i: int32) -> vec2 + + +.. function:: index(a: mat22, i: int32, j: int32) -> float + + +.. function:: index(a: mat33, i: int32) -> vec3 + + +.. function:: index(a: mat33, i: int32, j: int32) -> float + + +.. function:: index(a: mat44, i: int32) -> vec4 + + +.. function:: index(a: mat44, i: int32, j: int32) -> float + + .. function:: expect_eq(arg1: int8, arg2: int8) -> None Prints an error to stdout if arg1 and arg2 are not equal @@ -773,6 +814,11 @@ Utility Prints an error to stdout if arg1 and arg2 are not equal +.. function:: expect_eq(arg1: float16, arg2: float16) -> None + + Prints an error to stdout if arg1 and arg2 are not equal + + .. function:: expect_eq(arg1: float32, arg2: float32) -> None Prints an error to stdout if arg1 and arg2 are not equal @@ -833,6 +879,11 @@ Utility Prints an error to stdout if arg1 and arg2 are not equal +.. function:: lerp(a: float16, b: float16, t: float32) -> float16 + + Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t`` + + .. function:: lerp(a: float32, b: float32, t: float32) -> float32 Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t`` @@ -1240,6 +1291,15 @@ Operators .. function:: mul(x: float32, y: quat) -> quat +.. function:: mul(x: float32, y: mat22) -> mat22 + + +.. function:: mul(x: float32, y: mat33) -> mat33 + + +.. function:: mul(x: float32, y: mat44) -> mat44 + + .. function:: mul(x: vec2, y: float32) -> vec2 diff --git a/exts/omni.warp/config/extension.toml b/exts/omni.warp/config/extension.toml index 2fb0a18b1..bd5caa61f 100644 --- a/exts/omni.warp/config/extension.toml +++ b/exts/omni.warp/config/extension.toml @@ -1,7 +1,7 @@ [package] # Semantic Versioning is used: https://semver.org/ -version = "0.2.3" +version = "0.3.0" authors = ["Miles Macklin"] title = "Warp" description="A Python framework for high-performance simulation and graphics programming" diff --git a/exts/omni.warp/docs/CHANGELOG.md b/exts/omni.warp/docs/CHANGELOG.md index d6cdd8762..32720f653 100644 --- a/exts/omni.warp/docs/CHANGELOG.md +++ b/exts/omni.warp/docs/CHANGELOG.md @@ -1,5 +1,29 @@ # CHANGELOG +## [0.3.0] - 2022-07-08 + +- Add support for FP16 storage type, see `wp.float16` +- Add support for per-dimension byte strides, see `wp.array.strides` +- Add support for passing Python classes as kernel arguments, see `@wp.struct` decorator +- Add additional bounds checks for builtin matrix types +- Add additional floating point checks, see `wp.config.verify_fp` +- Add interleaved user source with generated code to aid debugging +- Add generalized GPU marching cubes implementation, see `wp.MarchingCubes` class +- Add additional scalar*matrix vector operators +- Add support for retrieving a single row from builtin types, e.g.: `r = m33[i]` +- Add `wp.log2()` and `wp.log10()` builtins +- Add support for quickly instancing `wp.sim.ModelBuilder` objects to improve env. creation performance for RL +- Remove custom CUB version and improve compatability with CUDA 11.7 +- Fix to preserve external user-gradients when calling `wp.Tape.zero()` +- Fix to only allocate gradient of a Torch tensor if `requires_grad=True` +- Fix for ray-cast precision in edge case on GPU (watertightness issue) +- Fix for kernel hot-reload when definition changes +- Fix for NVCC warnings on Linux +- Fix for generated function names when kernels are defined as class functions +- Fix for reload of generated CPU kernel code on Linux +- Fix for example scripts to ouput USD at 60 timecodes per-second (better Kit compatability) + + ## [0.2.3] - 2022-06-13 - Fix for incorrect 4d array bounds checking diff --git a/setup.py b/setup.py index 5361b6d76..3e1f31db4 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="warp-lang", - version="0.2.3", + version="0.3.0", author="NVIDIA", author_email="mmacklin@nvidia.com", description="A Python framework for high-performance simulation and graphics programming", diff --git a/warp/config.py b/warp/config.py index c00c9d1e0..7a9f7e37b 100644 --- a/warp/config.py +++ b/warp/config.py @@ -7,7 +7,7 @@ import os -version = "0.2.3" +version = "0.3.0" cuda_path = None # path to local CUDA toolchain, if None at init time warp will attempt to find the SDK using CUDA_PATH env var diff --git a/warp/native/builtin.h b/warp/native/builtin.h index 8af5c8a75..e188ba7e0 100644 --- a/warp/native/builtin.h +++ b/warp/native/builtin.h @@ -960,6 +960,13 @@ CUDA_CALLABLE inline T lerp(const T& a, const T& b, float t) return a*(1.0-t) + b*t; } +template <> +CUDA_CALLABLE inline float16 lerp(const float16& a, const float16& b, float t) +{ + return float(a)*(1.0-t) + float(b)*t; +} + + template CUDA_CALLABLE inline void adj_lerp(const T& a, const T& b, float t, T& adj_a, T& adj_b, float& adj_t, const T& adj_ret) { diff --git a/warp/stubs.py b/warp/stubs.py index 096a593df..30cfeb8fc 100644 --- a/warp/stubs.py +++ b/warp/stubs.py @@ -5,7 +5,7 @@ from typing import Callable from typing import overload from warp.types import array, array2d, array3d, array4d, constant -from warp.types import int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64 +from warp.types import int8, uint8, int16, uint16, int32, uint32, int64, uint64, float16, float32, float64 from warp.types import vec2, vec3, vec4, mat22, mat33, mat44, quat, transform, spatial_vector, spatial_matrix from warp.types import mesh_query_aabb_t, hash_grid_query_t @@ -178,6 +178,20 @@ def log(x: float32) -> float: """ ... +@overload +def log2(x: float32) -> float: + """ + Return the natural log (base-2) of x, where x is positive. + """ + ... + +@overload +def log10(x: float32) -> float: + """ + Return the natural log (base-10) of x, where x is positive. + """ + ... + @overload def exp(x: float32) -> float: """ @@ -1091,6 +1105,76 @@ def atomic_sub(a: array[Any], i: int32, j: int32, k: int32, l: int32, value: Any """ ... +@overload +def index(a: vec2, i: int32) -> float: + """ + + """ + ... + +@overload +def index(a: vec3, i: int32) -> float: + """ + + """ + ... + +@overload +def index(a: vec4, i: int32) -> float: + """ + + """ + ... + +@overload +def index(a: quat, i: int32) -> float: + """ + + """ + ... + +@overload +def index(a: mat22, i: int32) -> vec2: + """ + + """ + ... + +@overload +def index(a: mat22, i: int32, j: int32) -> float: + """ + + """ + ... + +@overload +def index(a: mat33, i: int32) -> vec3: + """ + + """ + ... + +@overload +def index(a: mat33, i: int32, j: int32) -> float: + """ + + """ + ... + +@overload +def index(a: mat44, i: int32) -> vec4: + """ + + """ + ... + +@overload +def index(a: mat44, i: int32, j: int32) -> float: + """ + + """ + ... + @overload def expect_eq(arg1: int8, arg2: int8): """ @@ -1147,6 +1231,13 @@ def expect_eq(arg1: uint64, arg2: uint64): """ ... +@overload +def expect_eq(arg1: float16, arg2: float16): + """ + Prints an error to stdout if arg1 and arg2 are not equal + """ + ... + @overload def expect_eq(arg1: float32, arg2: float32): """ @@ -1231,6 +1322,13 @@ def expect_eq(arg1: spatial_matrix, arg2: spatial_matrix): """ ... +@overload +def lerp(a: float16, b: float16, t: float32) -> float16: + """ + Linearly interpolate two values a and b using factor t, computed as ``a*(1-t) + b*t`` + """ + ... + @overload def lerp(a: float32, b: float32, t: float32) -> float32: """ @@ -1518,6 +1616,27 @@ def mul(x: float32, y: quat) -> quat: """ ... +@overload +def mul(x: float32, y: mat22) -> mat22: + """ + + """ + ... + +@overload +def mul(x: float32, y: mat33) -> mat33: + """ + + """ + ... + +@overload +def mul(x: float32, y: mat44) -> mat44: + """ + + """ + ... + @overload def mul(x: vec2, y: float32) -> vec2: """