hyperlux 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (794) hide show
  1. hyperdrone/__init__.py +53 -0
  2. hyperdrone/_cuda/__init__.py +76 -0
  3. hyperdrone/_dlpack.py +30 -0
  4. hyperdrone/_jit/__init__.py +131 -0
  5. hyperdrone/_jit/_build.py +113 -0
  6. hyperdrone/_jit/_lock.py +23 -0
  7. hyperdrone/_jit/_patches.py +99 -0
  8. hyperdrone/_jit/_toolchain.py +17 -0
  9. hyperdrone/_jit/_workspace.py +94 -0
  10. hyperdrone/_native/cmake/hyperdrone_jit.cmake +65 -0
  11. hyperdrone/_native/common/bindings.h +39 -0
  12. hyperdrone/_native/common/cuda_staging.h +80 -0
  13. hyperdrone/_native/common/jit_host.h +69 -0
  14. hyperdrone/_native/common/models.h +26 -0
  15. hyperdrone/_native/common/verbosity.h +52 -0
  16. hyperdrone/_native/dynamics/CMakeLists.txt +63 -0
  17. hyperdrone/_native/dynamics/host.cpp +188 -0
  18. hyperdrone/_native/dynamics/iface.h +71 -0
  19. hyperdrone/_native/dynamics/impl.cpp +638 -0
  20. hyperdrone/_native/env/CMakeLists.txt +98 -0
  21. hyperdrone/_native/env/environment.cpp +191 -0
  22. hyperdrone/_native/env/environment.h +296 -0
  23. hyperdrone/_native/env/impl.cpp +783 -0
  24. hyperdrone/_native/env/rotorcraft_bindings.cpp +53 -0
  25. hyperdrone/_native/render/CMakeLists.txt +96 -0
  26. hyperdrone/_native/render/renderer.cpp +970 -0
  27. hyperdrone/_native/render/rig_bindings.h +152 -0
  28. hyperdrone/_native/render/scene_bindings.cpp +515 -0
  29. hyperdrone/_outputs.py +32 -0
  30. hyperdrone/_parameters.py +36 -0
  31. hyperdrone/_vendor/rl-tools/CMakeLists.txt +207 -0
  32. hyperdrone/_vendor/rl-tools/LICENSE +21 -0
  33. hyperdrone/_vendor/rl-tools/cmake/autodetect/all.cmake +34 -0
  34. hyperdrone/_vendor/rl-tools/cmake/autodetect/git-diff.cmake +100 -0
  35. hyperdrone/_vendor/rl-tools/cmake/autodetect/git-hash.cmake +24 -0
  36. hyperdrone/_vendor/rl-tools/cmake/autodetect/summary.cmake +65 -0
  37. hyperdrone/_vendor/rl-tools/cmake/autodetect/tier0-compiler.cmake +18 -0
  38. hyperdrone/_vendor/rl-tools/cmake/autodetect/tier1-blas.cmake +51 -0
  39. hyperdrone/_vendor/rl-tools/cmake/autodetect/tier2-json-hdf5-zlib.cmake +82 -0
  40. hyperdrone/_vendor/rl-tools/cmake/autodetect/tier3-tensorboard.cmake +25 -0
  41. hyperdrone/_vendor/rl-tools/cmake/autodetect/tier4-cuda.cmake +42 -0
  42. hyperdrone/_vendor/rl-tools/cmake/autodetect/tier5-cli11.cmake +24 -0
  43. hyperdrone/_vendor/rl-tools/cmake/dependencies/assimp.cmake +19 -0
  44. hyperdrone/_vendor/rl-tools/cmake/legacy_flags.cmake +33 -0
  45. hyperdrone/_vendor/rl-tools/cmake/optional/assimp.cmake +30 -0
  46. hyperdrone/_vendor/rl-tools/cmake/optional/googletest.cmake +20 -0
  47. hyperdrone/_vendor/rl-tools/cmake/optional/metal.cmake +25 -0
  48. hyperdrone/_vendor/rl-tools/cmake/optional/mujoco.cmake +89 -0
  49. hyperdrone/_vendor/rl-tools/cmake/optional/optix.cmake +25 -0
  50. hyperdrone/_vendor/rl-tools/cmake/optional/raytracing.cmake +105 -0
  51. hyperdrone/_vendor/rl-tools/cmake/optional/raytracing_generic.cmake +2 -0
  52. hyperdrone/_vendor/rl-tools/cmake/optional/vulkan.cmake +4 -0
  53. hyperdrone/_vendor/rl-tools/cmake/optional/webgpu.cmake +24 -0
  54. hyperdrone/_vendor/rl-tools/cmake/scripts/embed_text.cmake +7 -0
  55. hyperdrone/_vendor/rl-tools/cmake/scripts/generate-git-snapshot.cmake +138 -0
  56. hyperdrone/_vendor/rl-tools/include/conta/conta.h +1480 -0
  57. hyperdrone/_vendor/rl-tools/include/metra/metra.h +381 -0
  58. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/matrix.h +143 -0
  59. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_arm.h +33 -0
  60. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu.h +314 -0
  61. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_accelerate.h +37 -0
  62. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_blas.h +67 -0
  63. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_mkl.h +38 -0
  64. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_openblas.h +34 -0
  65. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cuda.h +289 -0
  66. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_dummy.h +20 -0
  67. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_esp32.h +29 -0
  68. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_generic.h +944 -0
  69. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_wasm32.h +13 -0
  70. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/persist_code.h +136 -0
  71. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_arm.h +1 -0
  72. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu.h +94 -0
  73. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_accelerate.h +25 -0
  74. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_blas.h +115 -0
  75. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_mkl.h +25 -0
  76. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_openblas.h +25 -0
  77. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cuda.h +713 -0
  78. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_generic.h +1356 -0
  79. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/persist_code.h +130 -0
  80. hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/tensor.h +490 -0
  81. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/arm.h +91 -0
  82. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu.h +210 -0
  83. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_accelerate.h +23 -0
  84. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_blas.h +21 -0
  85. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_emscripten.h +20 -0
  86. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_mkl.h +45 -0
  87. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_openblas.h +56 -0
  88. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_tensorboard.h +34 -0
  89. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda.h +464 -0
  90. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda_streams.h +23 -0
  91. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/devices.h +105 -0
  92. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/dummy.h +55 -0
  93. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/esp32.h +85 -0
  94. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/generic.h +0 -0
  95. hyperdrone/_vendor/rl-tools/include/rl_tools/devices/wasm32.h +59 -0
  96. hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/model.h +218 -0
  97. hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/operations_generic.h +769 -0
  98. hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/persist.h +278 -0
  99. hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter.h +100 -0
  100. hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter_persist.h +52 -0
  101. hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/tensor_operations_generic.h +55 -0
  102. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_backend.h +117 -0
  103. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_interface.h +36 -0
  104. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/l2f.h +98 -0
  105. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_dyn.h +18 -0
  106. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_generic.h +268 -0
  107. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_backend.h +31 -0
  108. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_interface.h +12 -0
  109. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_backend.h +98 -0
  110. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_interface.h +50 -0
  111. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/executor.h +133 -0
  112. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/helper.h +109 -0
  113. hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/operations_generic.h +219 -0
  114. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arduino.h +117 -0
  115. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arm.h +56 -0
  116. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu.h +57 -0
  117. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu_tensorboard.h +151 -0
  118. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cuda.h +65 -0
  119. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_dummy.h +45 -0
  120. hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_wasm32.h +56 -0
  121. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_arm.h +98 -0
  122. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cpu.h +138 -0
  123. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cuda.h +380 -0
  124. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_dummy.h +93 -0
  125. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_esp32.h +92 -0
  126. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_generic.h +295 -0
  127. hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_wasm32.h +230 -0
  128. hyperdrone/_vendor/rl-tools/include/rl_tools/mode/mode.h +98 -0
  129. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/activation_functions.h +113 -0
  130. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/capability.h +61 -0
  131. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/persist_code.h +31 -0
  132. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/group.h +99 -0
  133. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/layer.h +122 -0
  134. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_cuda.h +64 -0
  135. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_generic.h +186 -0
  136. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/persist.h +33 -0
  137. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/layer.h +300 -0
  138. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cpu_mkl.h +590 -0
  139. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cuda.h +809 -0
  140. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_generic.h +1219 -0
  141. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist.h +99 -0
  142. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist_code.h +170 -0
  143. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/layer.h +145 -0
  144. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/dsp.h +63 -0
  145. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/opt.h +173 -0
  146. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu.h +13 -0
  147. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_accelerate.h +66 -0
  148. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_blas.h +282 -0
  149. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_mkl.h +66 -0
  150. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_openblas.h +65 -0
  151. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cuda.h +519 -0
  152. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_dummy.h +8 -0
  153. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/dsp.h +58 -0
  154. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/opt.h +167 -0
  155. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_generic.h +429 -0
  156. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist.h +62 -0
  157. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_code.h +178 -0
  158. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_common.h +59 -0
  159. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/layer.h +188 -0
  160. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_cuda.h +356 -0
  161. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_generic.h +536 -0
  162. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/persist.h +32 -0
  163. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/layer.h +119 -0
  164. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/operations_generic.h +223 -0
  165. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/persist.h +46 -0
  166. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/layer.h +121 -0
  167. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/operations_generic.h +154 -0
  168. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist.h +44 -0
  169. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist_code.h +106 -0
  170. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_cuda.h +602 -0
  171. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_generic.h +251 -0
  172. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/layer.h +206 -0
  173. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/operations_generic.h +889 -0
  174. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist.h +75 -0
  175. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist_code.h +199 -0
  176. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/layers.h +3 -0
  177. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/layer.h +143 -0
  178. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_cuda.h +80 -0
  179. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_generic.h +216 -0
  180. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/persist.h +39 -0
  181. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu.h +1 -0
  182. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_accelerate.h +1 -0
  183. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_blas.h +1 -0
  184. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_mkl.h +3 -0
  185. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_openblas.h +1 -0
  186. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cuda.h +9 -0
  187. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_dummy.h +1 -0
  188. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_generic.h +3 -0
  189. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/layer.h +223 -0
  190. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_cuda.h +138 -0
  191. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_generic.h +446 -0
  192. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/persist.h +70 -0
  193. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/layer.h +154 -0
  194. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_cuda.h +119 -0
  195. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_generic.h +502 -0
  196. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist.h +50 -0
  197. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist_code.h +173 -0
  198. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/layer.h +116 -0
  199. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_cuda.h +156 -0
  200. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_generic.h +295 -0
  201. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist.h +83 -0
  202. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist_code.h +163 -0
  203. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/layer.h +123 -0
  204. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/operations_generic.h +272 -0
  205. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist.h +17 -0
  206. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist_code.h +164 -0
  207. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/layer.h +122 -0
  208. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_cuda.h +55 -0
  209. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_generic.h +160 -0
  210. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist.h +47 -0
  211. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist_code.h +106 -0
  212. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/layer.h +132 -0
  213. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_cuda.h +141 -0
  214. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_generic.h +230 -0
  215. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/categorical_cross_entropy/operations_generic.h +102 -0
  216. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_cuda.h +97 -0
  217. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_generic.h +101 -0
  218. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/operations_generic.h +2 -0
  219. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/nn.h +14 -0
  220. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu.h +1 -0
  221. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_accelerate.h +1 -0
  222. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_blas.h +1 -0
  223. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mkl.h +1 -0
  224. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mux.h +16 -0
  225. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_openblas.h +1 -0
  226. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cuda.h +2 -0
  227. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_dummy.h +1 -0
  228. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_generic.h +15 -0
  229. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/adam.h +121 -0
  230. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_cuda.h +98 -0
  231. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_generic.h +150 -0
  232. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist.h +39 -0
  233. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist_code.h +80 -0
  234. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_cuda.h +85 -0
  235. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_generic.h +109 -0
  236. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/persist.h +25 -0
  237. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/instance/operations_generic.h +107 -0
  238. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/lamb.h +40 -0
  239. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/operations_generic.h +68 -0
  240. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/optimizers.h +3 -0
  241. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_cuda.h +85 -0
  242. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_generic.h +140 -0
  243. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist.h +37 -0
  244. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist_code.h +72 -0
  245. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_cuda.h +49 -0
  246. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_generic.h +50 -0
  247. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/sgd.h +92 -0
  248. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/update.h +54 -0
  249. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_cuda.h +0 -0
  250. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_generic.h +98 -0
  251. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/parameters.h +79 -0
  252. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist.h +34 -0
  253. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist_code.h +136 -0
  254. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist.h +2 -0
  255. hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist_code.h +27 -0
  256. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/behaviors/skip_parameter_gradients.h +65 -0
  257. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/README.md +107 -0
  258. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/model.h +19 -0
  259. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/persist_code.h +77 -0
  260. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/network.h +174 -0
  261. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_cuda.h +10 -0
  262. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_dummy.h +8 -0
  263. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_generic.h +407 -0
  264. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist.h +56 -0
  265. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist_code.h +137 -0
  266. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/network.h +55 -0
  267. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/operations_generic.h +86 -0
  268. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist.h +43 -0
  269. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist_code.h +142 -0
  270. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/models.h +3 -0
  271. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/model.h +148 -0
  272. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/operations_generic.h +288 -0
  273. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist.h +25 -0
  274. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist_code.h +71 -0
  275. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cpu.h +0 -0
  276. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cuda.h +1 -0
  277. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_dummy.h +1 -0
  278. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_generic.h +4 -0
  279. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/model.h +290 -0
  280. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_cuda.h +174 -0
  281. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_generic.h +623 -0
  282. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist.h +80 -0
  283. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist_code.h +200 -0
  284. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist.h +1 -0
  285. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist_code.h +1 -0
  286. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/model.h +43 -0
  287. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/operations_generic.h +73 -0
  288. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/resnet/resnet.h +97 -0
  289. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/model.h +270 -0
  290. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/operations_generic.h +625 -0
  291. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist.h +99 -0
  292. hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist_code.h +115 -0
  293. hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/bf16.h +28 -0
  294. hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/categories.h +22 -0
  295. hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/persist_code.h +54 -0
  296. hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/policy.h +48 -0
  297. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_1.h +18 -0
  298. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_2.h +14 -0
  299. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_3.h +14 -0
  300. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm.h +19 -0
  301. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_1.h +17 -0
  302. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_2.h +12 -0
  303. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_3.h +15 -0
  304. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu.h +19 -0
  305. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_1.h +16 -0
  306. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_2.h +12 -0
  307. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_3.h +15 -0
  308. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate.h +19 -0
  309. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_1.h +17 -0
  310. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_2.h +12 -0
  311. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_3.h +15 -0
  312. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl.h +18 -0
  313. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mux.h +158 -0
  314. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_1.h +16 -0
  315. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_2.h +12 -0
  316. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_3.h +15 -0
  317. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas.h +18 -0
  318. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_1.h +16 -0
  319. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_2.h +12 -0
  320. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_3.h +15 -0
  321. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard.h +19 -0
  322. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_1.h +18 -0
  323. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_2.h +12 -0
  324. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_3.h +12 -0
  325. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda.h +19 -0
  326. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_1.h +15 -0
  327. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_2.h +12 -0
  328. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_3.h +12 -0
  329. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy.h +19 -0
  330. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_1.h +16 -0
  331. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_2.h +12 -0
  332. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_3.h +13 -0
  333. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32.h +19 -0
  334. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_1.h +15 -0
  335. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_2.h +12 -0
  336. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_3.h +12 -0
  337. hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32.h +19 -0
  338. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/hdf5.h +54 -0
  339. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/operations_cpu.h +419 -0
  340. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/io.h +55 -0
  341. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_cpu.h +58 -0
  342. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_generic.h +620 -0
  343. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_posix.h +63 -0
  344. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/tar.h +74 -0
  345. hyperdrone/_vendor/rl-tools/include/rl_tools/persist/code.h +38 -0
  346. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_arm.h +39 -0
  347. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cpu.h +81 -0
  348. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cuda.h +172 -0
  349. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_dummy.h +72 -0
  350. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_esp32.h +45 -0
  351. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic.h +133 -0
  352. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic_array.h +73 -0
  353. hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_wasm32.h +57 -0
  354. hyperdrone/_vendor/rl-tools/include/rl_tools/random/persist.h +77 -0
  355. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/camera.h +105 -0
  356. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/cache.h +26 -0
  357. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/free_space.h +60 -0
  358. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/operations_cpu.h +411 -0
  359. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/glb.h +25 -0
  360. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/operations_cpu.h +1288 -0
  361. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/operations_cpu.h +136 -0
  362. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/catalog.h +232 -0
  363. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/conversion.h +33 -0
  364. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/operations_cpu.h +123 -0
  365. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/procthor.h +39 -0
  366. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_cpu.h +626 -0
  367. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_generic.h +1214 -0
  368. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/context.h +195 -0
  369. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/device_source.h +17 -0
  370. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/operations_cpu.h +1088 -0
  371. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device.h +215 -0
  372. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device_impl.h +1135 -0
  373. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/operations_cuda.h +1701 -0
  374. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/overlay_accel.h +64 -0
  375. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/specialization.h +35 -0
  376. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/context.h +234 -0
  377. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/device_source.h +48 -0
  378. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/operations_cpu.h +2023 -0
  379. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/bvh_sah.h +182 -0
  380. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/context.h +237 -0
  381. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/device_source.h +17 -0
  382. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/operations_cpu.h +1277 -0
  383. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_common.h +831 -0
  384. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_mux.h +32 -0
  385. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_post.h +96 -0
  386. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/outputs/operations_generic.h +225 -0
  387. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/outputs/outputs.h +228 -0
  388. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/renderer.h +388 -0
  389. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/save_cpu.h +319 -0
  390. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene.h +44 -0
  391. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/transforms_generic.h +25 -0
  392. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/types.h +45 -0
  393. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_cpu.h +96 -0
  394. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_generic.h +154 -0
  395. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/rig.h +70 -0
  396. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/scene.h +132 -0
  397. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/segmentation_cpu.h +145 -0
  398. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/transforms.h +204 -0
  399. hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/types.h +76 -0
  400. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/algorithms.h +6 -0
  401. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu.h +1 -0
  402. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu_mkl.h +1 -0
  403. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_generic.h +1 -0
  404. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/config.h +243 -0
  405. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_cuda.h +9 -0
  406. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_generic.h +205 -0
  407. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/persist.h +109 -0
  408. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/state.h +51 -0
  409. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/mixed_imitation.h +63 -0
  410. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_cuda.h +190 -0
  411. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic.h +332 -0
  412. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic_mixed_imitation.h +81 -0
  413. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/persist.h +28 -0
  414. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/ppo.h +105 -0
  415. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_gru.h +84 -0
  416. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_mlp.h +61 -0
  417. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/config.h +106 -0
  418. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/operations_generic.h +193 -0
  419. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/state.h +52 -0
  420. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu.h +9 -0
  421. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_accelerate.h +2 -0
  422. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mkl.h +2 -0
  423. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mux.h +9 -0
  424. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cuda.h +131 -0
  425. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_generic.h +580 -0
  426. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/sac.h +151 -0
  427. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_gru.h +72 -0
  428. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_mlp.h +54 -0
  429. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/config.h +107 -0
  430. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/operations_generic.h +174 -0
  431. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/state.h +46 -0
  432. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu.h +9 -0
  433. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_accelerate.h +2 -0
  434. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mkl.h +2 -0
  435. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mux.h +9 -0
  436. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cuda.h +117 -0
  437. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_generic.h +359 -0
  438. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/td3.h +141 -0
  439. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/components.h +4 -0
  440. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/off_policy_runner.h +225 -0
  441. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu.h +95 -0
  442. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_accelerate.h +21 -0
  443. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_mkl.h +21 -0
  444. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cuda.h +237 -0
  445. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic.h +498 -0
  446. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic_per_env.h +112 -0
  447. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/collection.h +57 -0
  448. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/on_policy_runner.h +122 -0
  449. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu.h +2 -0
  450. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_accelerate.h +8 -0
  451. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mkl.h +8 -0
  452. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mux.h +12 -0
  453. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cuda.h +183 -0
  454. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic.h +366 -0
  455. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic_common.h +74 -0
  456. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/persist.h +47 -0
  457. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu.h +2 -0
  458. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_accelerate.h +1 -0
  459. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_mkl.h +1 -0
  460. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_generic.h +2 -0
  461. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_cpu.h +9 -0
  462. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_generic.h +123 -0
  463. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/persist.h +57 -0
  464. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/replay_buffer.h +93 -0
  465. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/operations_generic.h +76 -0
  466. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/persist.h +31 -0
  467. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/running_normalizer.h +33 -0
  468. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/operations_generic.h +58 -0
  469. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/operations_generic.h +28 -0
  470. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/wrapper.h +26 -0
  471. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/wrappers.h +29 -0
  472. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/acrobot.h +88 -0
  473. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_cpu.h +152 -0
  474. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_generic.h +202 -0
  475. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/environment.h +40 -0
  476. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_cuda.h +204 -0
  477. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic.h +106 -0
  478. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic_common.h +26 -0
  479. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/persist.h +33 -0
  480. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/car.h +119 -0
  481. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_cpu.h +110 -0
  482. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_generic.h +206 -0
  483. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_json.h +59 -0
  484. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/track.h +23 -0
  485. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/ui.h +189 -0
  486. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/environments.h +28 -0
  487. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/environment.h +87 -0
  488. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_cpu.h +212 -0
  489. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_generic.h +215 -0
  490. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/observation.h +75 -0
  491. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cpu.h +1079 -0
  492. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cuda.h +569 -0
  493. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/pose.h +253 -0
  494. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/presets.h +154 -0
  495. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/operations_cpu.h +26 -0
  496. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/operations_generic.h +91 -0
  497. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/raptor.h +71 -0
  498. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_cpu.h +225 -0
  499. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_generic.h +62 -0
  500. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/rig.h +28 -0
  501. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_cpu.h +86 -0
  502. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_cuda.h +69 -0
  503. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_optix.h +163 -0
  504. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cpu.h +223 -0
  505. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cpu_spectator.h +194 -0
  506. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cuda.h +1 -0
  507. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cuda_spectator.h +109 -0
  508. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/spectator.h +82 -0
  509. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/spy.h +108 -0
  510. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/ui.h +30 -0
  511. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/moving_gate.h +103 -0
  512. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cpu.h +279 -0
  513. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cuda.h +242 -0
  514. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cpu.h +324 -0
  515. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cuda.h +314 -0
  516. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_generic_position_hold.h +128 -0
  517. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/position_hold.h +22 -0
  518. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/target_frame.h +94 -0
  519. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/yaw/operations_cuda.h +43 -0
  520. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/yaw/operations_generic.h +73 -0
  521. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/baseline.h +46 -0
  522. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/calibration.h +62 -0
  523. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/metrics.h +101 -0
  524. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/operations_cpu.h +374 -0
  525. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/visual_inertial_localization.h +126 -0
  526. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/world.h +326 -0
  527. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/inertial_velocity.h +27 -0
  528. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/metrics.h +266 -0
  529. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/multirotor.h +1138 -0
  530. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_cpu.h +2252 -0
  531. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/05_state_is_nan.h +148 -0
  532. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/10_sample_initial_parameters.h +228 -0
  533. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/20_initial_state.h +208 -0
  534. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/30_sample_initial_state.h +300 -0
  535. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/35_get_desired_state.h +63 -0
  536. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/40_observe.h +637 -0
  537. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/50_state_algebra.h +57 -0
  538. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/60_dynamics.h +134 -0
  539. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/70_post_integration.h +368 -0
  540. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/80_abs_diff.h +312 -0
  541. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic.h +367 -0
  542. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic_inertial_velocity.h +44 -0
  543. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_helper_generic.h +43 -0
  544. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic.h +70 -0
  545. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic_forward.h +24 -0
  546. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/default.h +209 -0
  547. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/arpl.h +112 -0
  548. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie.h +127 -0
  549. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie_brushless.h +108 -0
  550. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie_openmv.h +119 -0
  551. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/flightmare.h +111 -0
  552. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/fs.h +113 -0
  553. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/mrs.h +110 -0
  554. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/savagebee_pusher.h +108 -0
  555. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft.h +117 -0
  556. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft_rigid.h +118 -0
  557. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500.h +88 -0
  558. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_real.h +88 -0
  559. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_sim.h +114 -0
  560. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/init/default.h +56 -0
  561. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/registry.h +108 -0
  562. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/default.h +64 -0
  563. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/reward_functions.h +1 -0
  564. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/operations_generic.h +202 -0
  565. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/squared.h +52 -0
  566. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/termination/default.h +33 -0
  567. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/lissajous.h +72 -0
  568. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/trajectory.h +78 -0
  569. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist.h +21 -0
  570. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist_code.h +53 -0
  571. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/quaternion_helper.h +103 -0
  572. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/ui.h +180 -0
  573. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/environment.h +69 -0
  574. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_cpu.h +46 -0
  575. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_generic.h +78 -0
  576. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/README.MD +5 -0
  577. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ant.h +77 -0
  578. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/model.h +415 -0
  579. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/operations_cpu.h +162 -0
  580. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/persist.h +86 -0
  581. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ui.h +141 -0
  582. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/mujoco.h +1 -0
  583. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/bottleneck.h +113 -0
  584. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_cpu.h +289 -0
  585. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_generic.h +495 -0
  586. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/environments.h +16 -0
  587. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/observation.h +37 -0
  588. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_cpu.h +2 -0
  589. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_generic.h +33 -0
  590. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_cpu.h +146 -0
  591. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_generic.h +262 -0
  592. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/pendulum.h +197 -0
  593. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui.h +97 -0
  594. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui_xeus.h +124 -0
  595. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_cpu.h +426 -0
  596. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_generic.h +424 -0
  597. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/reacher.h +137 -0
  598. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/loop.h +15 -0
  599. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/config.h +28 -0
  600. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/operations_cpu.h +233 -0
  601. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/persist.h +30 -0
  602. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/state.h +21 -0
  603. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/config.h +25 -0
  604. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/operations_generic.h +47 -0
  605. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/persist.h +20 -0
  606. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/state.h +17 -0
  607. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/config.h +47 -0
  608. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/operations_generic.h +106 -0
  609. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/persist.h +40 -0
  610. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/state.h +36 -0
  611. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/config.h +22 -0
  612. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/operations_cpu.h +44 -0
  613. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/persist.h +20 -0
  614. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/state.h +26 -0
  615. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/config.h +37 -0
  616. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/operations_cpu.h +113 -0
  617. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/persist.h +20 -0
  618. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/state.h +24 -0
  619. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/config.h +43 -0
  620. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/operations_cpu.h +190 -0
  621. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/persist.h +30 -0
  622. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/state.h +37 -0
  623. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/steps.h +4 -0
  624. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/config.h +27 -0
  625. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/operations_cpu.h +52 -0
  626. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/persist.h +20 -0
  627. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/state.h +25 -0
  628. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/operations_generic.h +3 -0
  629. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/rl.h +5 -0
  630. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/evaluation.h +106 -0
  631. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_cpu.h +48 -0
  632. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_generic.h +275 -0
  633. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation.h +269 -0
  634. hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation_analysis.h +85 -0
  635. hyperdrone/_vendor/rl-tools/include/rl_tools/rl_tools.h +80 -0
  636. hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/client.h +50 -0
  637. hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_boost.h +92 -0
  638. hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_cpu.h +174 -0
  639. hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_websocket.h +208 -0
  640. hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/server.h +448 -0
  641. hyperdrone/_vendor/rl-tools/include/rl_tools/universe.h +4 -0
  642. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu.h +13 -0
  643. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu_emscripten.h +15 -0
  644. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_arm.h +29 -0
  645. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu.h +24 -0
  646. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu_emscripten.h +28 -0
  647. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cuda.h +33 -0
  648. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_dummy.h +18 -0
  649. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_esp32.h +20 -0
  650. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_generic.h +19 -0
  651. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_wasm32.h +18 -0
  652. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_cpu.h +16 -0
  653. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_generic.h +14 -0
  654. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/extrack.h +129 -0
  655. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/operations_cpu.h +588 -0
  656. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/integrators.h +103 -0
  657. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/memcpy.h +16 -0
  658. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/operations_generic.h +48 -0
  659. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/tuple.h +147 -0
  660. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/typing.h +122 -0
  661. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/vector_operations.h +172 -0
  662. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_cuda.h +53 -0
  663. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_generic.h +93 -0
  664. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/string/operations_generic.h +201 -0
  665. hyperdrone/_vendor/rl-tools/include/rl_tools/utils/zlib/operations_cpu.h +45 -0
  666. hyperdrone/_vendor/rl-tools/include/rl_tools/version.h +28 -0
  667. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/CMakeLists.txt +15 -0
  668. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/README.md +261 -0
  669. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/CMakeLists.txt +11 -0
  670. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/CMakeLists.txt +17 -0
  671. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/freestanding_check.cpp +125 -0
  672. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/CMakeLists.txt +31 -0
  673. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/device.metal +1053 -0
  674. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/metal_cpp_impl.cpp +6 -0
  675. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/CMakeLists.txt +51 -0
  676. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/device.cu +1 -0
  677. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/overlay_accel.cu +310 -0
  678. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/CMakeLists.txt +37 -0
  679. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device.comp +1088 -0
  680. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device_spirv.cpp +44 -0
  681. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/CMakeLists.txt +31 -0
  682. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/device.wgsl +1538 -0
  683. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/CMakeLists.txt +129 -0
  684. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/README.md +131 -0
  685. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark.cpp +184 -0
  686. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark_dynamic.cpp +497 -0
  687. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/download_paper_scene.py +74 -0
  688. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/CMakeLists.txt +104 -0
  689. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/Info.plist +36 -0
  690. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/Sources/BenchmarkApp.swift +172 -0
  691. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/benchmark.h +10 -0
  692. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/benchmark.mm +46 -0
  693. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/build.sh +17 -0
  694. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/rig.cpp +119 -0
  695. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.cpp +1384 -0
  696. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.h +5 -0
  697. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_config.h.in +25 -0
  698. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_identity.cmake +11 -0
  699. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_main.cpp +5 -0
  700. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.cu +125 -0
  701. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.h +58 -0
  702. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics_contract.h +179 -0
  703. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics_cpu.cpp +77 -0
  704. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/camera_orbit.h +51 -0
  705. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/CMakeLists.txt +199 -0
  706. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/antialiasing.cpp +215 -0
  707. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone.cpp +321 -0
  708. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone_device.cu +359 -0
  709. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/environment.h +92 -0
  710. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/operations_cpu.h +263 -0
  711. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/example.cpp +274 -0
  712. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/fixed_pose.cpp +223 -0
  713. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/flow.cpp +120 -0
  714. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/interactive.cpp +1021 -0
  715. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal.cpp +84 -0
  716. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal_overlay.cpp +139 -0
  717. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/motion_blur.cpp +233 -0
  718. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace.cpp +1829 -0
  719. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace_motion_blur.cpp +648 -0
  720. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/CMakeLists.txt +147 -0
  721. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/README.md +15 -0
  722. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/job.sbatch +28 -0
  723. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model.h +260 -0
  724. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_config.h +24 -0
  725. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_forward_cuda.h +397 -0
  726. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_operations.h +418 -0
  727. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_persist.h +45 -0
  728. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_student.h +70 -0
  729. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.cpp +223 -0
  730. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.h +68 -0
  731. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/.gitignore +5 -0
  732. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/CMakeLists.txt +4 -0
  733. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info.plist +24 -0
  734. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info_ios.plist +36 -0
  735. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/CameraManager.swift +120 -0
  736. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/ContentView.swift +703 -0
  737. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/DatasetRecorder.swift +285 -0
  738. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/YawPredictorApp.swift +25 -0
  739. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/YawPredictor.entitlements +8 -0
  740. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build.sh +66 -0
  741. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build_ios.sh +133 -0
  742. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/generate.sh +6 -0
  743. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/h5_to_tar.cpp +82 -0
  744. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.cpp +166 -0
  745. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.h +26 -0
  746. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/project.yml +30 -0
  747. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/test_tar_vs_hdf5.cpp +173 -0
  748. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_cuda.cu +699 -0
  749. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_dataset_overlay.cpp +475 -0
  750. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_distill_cuda.cu +995 -0
  751. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_eval.cu +457 -0
  752. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_real_world_eval.cpp +660 -0
  753. hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_viewer.cu +443 -0
  754. hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/CMakeLists.txt +63 -0
  755. hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/example.cpp +102 -0
  756. hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/ui.cpp +380 -0
  757. hyperdrone/dynamics/__init__.py +5 -0
  758. hyperdrone/dynamics/_component.py +31 -0
  759. hyperdrone/dynamics/_config.py +48 -0
  760. hyperdrone/dynamics/_sim.py +166 -0
  761. hyperdrone/env/__init__.py +23 -0
  762. hyperdrone/env/_multi_environment.py +570 -0
  763. hyperdrone/env/_rotorcraft.py +29 -0
  764. hyperdrone/env/_spy.py +39 -0
  765. hyperdrone/examples/.gitignore +3 -0
  766. hyperdrone/examples/Benchmark.ipynb +113 -0
  767. hyperdrone/examples/HyperDrone.ipynb +597 -0
  768. hyperdrone/examples/Orbiter.ipynb +497 -0
  769. hyperdrone/examples/Overview.ipynb +380 -0
  770. hyperdrone/examples/Renderer.ipynb +218 -0
  771. hyperdrone/examples/__init__.py +16 -0
  772. hyperdrone/examples/articulation.py +55 -0
  773. hyperdrone/examples/benchmark.py +236 -0
  774. hyperdrone/examples/benchmark_minimal.py +65 -0
  775. hyperdrone/examples/data.py +56 -0
  776. hyperdrone/examples/drone_flythrough.py +169 -0
  777. hyperdrone/examples/hyperdrone_videos/my_world_preview.h +17 -0
  778. hyperdrone/examples/my_world.h +17 -0
  779. hyperdrone/examples/render_procthor.py +40 -0
  780. hyperdrone/examples/shots.py +108 -0
  781. hyperdrone/examples/spy.py +40 -0
  782. hyperdrone/examples/visual_inertial_localization.py +158 -0
  783. hyperdrone/gym/__init__.py +67 -0
  784. hyperdrone/render/__init__.py +57 -0
  785. hyperdrone/render/_component.py +51 -0
  786. hyperdrone/render/_config.py +76 -0
  787. hyperdrone/render/_renderer.py +498 -0
  788. hyperdrone/render/_rig.py +136 -0
  789. hyperdrone/render/_sampling.py +72 -0
  790. hyperdrone/render/_scene.py +38 -0
  791. hyperdrone/render/datasets.py +15 -0
  792. hyperlux-0.0.1.dist-info/METADATA +518 -0
  793. hyperlux-0.0.1.dist-info/RECORD +794 -0
  794. hyperlux-0.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,970 @@
1
+ #ifndef HYPERDRONE_RENDER_NUM_PROBES
2
+ #define HYPERDRONE_RENDER_NUM_PROBES 1
3
+ #endif
4
+ #include "verbosity.h"
5
+ #include <rl_tools/operations/cpu_mux.h>
6
+ #include <rl_tools/rendering/raytracing/operations_cpu_mux.h>
7
+ #include <rl_tools/rendering/datasets/operations_cpu.h>
8
+ #include <rendering/raytracing/camera_orbit.h>
9
+
10
+ #include "bindings.h"
11
+ #include <nanobind/stl/array.h>
12
+ #include <nanobind/stl/string.h>
13
+
14
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
15
+ #include "cuda_staging.h"
16
+ #endif
17
+
18
+ #include <cstdint>
19
+ #include <cstring>
20
+ #include <initializer_list>
21
+ #include <type_traits>
22
+ #include <stdexcept>
23
+ #include <vector>
24
+
25
+ #ifndef HYPERDRONE_RENDER_WIDTH
26
+ #error "HYPERDRONE_RENDER_WIDTH must be defined"
27
+ #endif
28
+ #ifndef HYPERDRONE_RENDER_HEIGHT
29
+ #error "HYPERDRONE_RENDER_HEIGHT must be defined"
30
+ #endif
31
+ #ifndef HYPERDRONE_RENDER_NUM_CAMERAS
32
+ #error "HYPERDRONE_RENDER_NUM_CAMERAS must be defined"
33
+ #endif
34
+ #ifndef HYPERDRONE_RENDER_OUTPUT_RGB
35
+ #error "HYPERDRONE_RENDER_OUTPUT_RGB must be defined"
36
+ #endif
37
+ #ifndef HYPERDRONE_RENDER_OUTPUT_DEPTH
38
+ #error "HYPERDRONE_RENDER_OUTPUT_DEPTH must be defined"
39
+ #endif
40
+ #ifndef HYPERDRONE_RENDER_OUTPUT_SEGMENTATION
41
+ #error "HYPERDRONE_RENDER_OUTPUT_SEGMENTATION must be defined"
42
+ #endif
43
+ #ifndef HYPERDRONE_RENDER_OUTPUT_NORMALS
44
+ #error "HYPERDRONE_RENDER_OUTPUT_NORMALS must be defined"
45
+ #endif
46
+ #ifndef HYPERDRONE_RENDER_OUTPUT_FLOW
47
+ #error "HYPERDRONE_RENDER_OUTPUT_FLOW must be defined"
48
+ #endif
49
+ #ifndef HYPERDRONE_RENDER_SHADING
50
+ #define HYPERDRONE_RENDER_SHADING 2
51
+ #endif
52
+ #ifndef HYPERDRONE_RENDER_MB_SAMPLES
53
+ #define HYPERDRONE_RENDER_MB_SAMPLES 1
54
+ #endif
55
+ #ifndef HYPERDRONE_RENDER_AA_GRID
56
+ #define HYPERDRONE_RENDER_AA_GRID 1
57
+ #endif
58
+ #ifndef HYPERDRONE_RENDER_NUM_OVERLAYS
59
+ #define HYPERDRONE_RENDER_NUM_OVERLAYS 0
60
+ #endif
61
+ #ifndef HYPERDRONE_RENDER_MAX_OVERLAY_INSTANCES
62
+ #define HYPERDRONE_RENDER_MAX_OVERLAY_INSTANCES 0
63
+ #endif
64
+ #ifndef HYPERDRONE_RENDER_MAX_OVERLAYS_PER_CAMERA
65
+ #define HYPERDRONE_RENDER_MAX_OVERLAYS_PER_CAMERA 0
66
+ #endif
67
+ #ifndef HYPERDRONE_RENDER_SEMANTIC_SEGMENTATION
68
+ #define HYPERDRONE_RENDER_SEMANTIC_SEGMENTATION 0
69
+ #endif
70
+ #ifndef HYPERDRONE_RENDER_DYNAMIC_MB
71
+ #define HYPERDRONE_RENDER_DYNAMIC_MB 0
72
+ #endif
73
+
74
+ namespace rlt = rl_tools;
75
+ namespace rro = rlt::rendering::raytracing::outputs;
76
+ namespace rrt = rl_tools::rendering::raytracing;
77
+ using hyperdrone::FloatArray;
78
+ using rl_tools::data;
79
+ using rl_tools::output;
80
+
81
+
82
+ // Each configuration needs a distinct C++ type in nanobind's shared type registry.
83
+ namespace HYPERDRONE_MODULE_NAME {
84
+ using DEVICE = rlt::devices::DEVICE_FACTORY<hyperdrone::CPUSpecification>;
85
+ using T = float;
86
+ using TI = typename DEVICE::index_t;
87
+
88
+ template <int SHADING_ID> struct ShadingSelector;
89
+ template <> struct ShadingSelector<0> { using type = rrt::Low; };
90
+ template <> struct ShadingSelector<1> { using type = rrt::Medium; };
91
+ template <> struct ShadingSelector<2> { using type = rrt::High; };
92
+ template <> struct ShadingSelector<3> { using type = rrt::VeryHigh; };
93
+
94
+ static constexpr bool PROBES_ENABLED = HYPERDRONE_RENDER_NUM_PROBES > 0;
95
+
96
+ using SEGMENTATION_LABELS = rl_tools::utils::typing::conditional_t<(HYPERDRONE_RENDER_SEMANTIC_SEGMENTATION != 0), rro::labels::Semantic, rro::labels::Instance>;
97
+ using SEGMENTATION_OUTPUT = rro::Segmentation<rro::format::UInt32, SEGMENTATION_LABELS>;
98
+
99
+ struct RendererConfiguration: rrt::config::Default<T, TI>{
100
+ static constexpr TI CAM_WIDTH = HYPERDRONE_RENDER_WIDTH;
101
+ static constexpr TI CAM_HEIGHT = HYPERDRONE_RENDER_HEIGHT;
102
+ static constexpr TI NUM_CAMERAS = HYPERDRONE_RENDER_NUM_CAMERAS;
103
+ static constexpr TI NUM_PROBES = HYPERDRONE_RENDER_NUM_PROBES;
104
+ using SHADING = typename ShadingSelector<HYPERDRONE_RENDER_SHADING>::type;
105
+ using OUTPUTS = typename rro::Concat<
106
+ rro::If<(HYPERDRONE_RENDER_OUTPUT_RGB != 0), rro::RGB<>>,
107
+ rro::If<(HYPERDRONE_RENDER_OUTPUT_DEPTH != 0), rro::Depth<>>,
108
+ rro::If<(HYPERDRONE_RENDER_OUTPUT_SEGMENTATION != 0), SEGMENTATION_OUTPUT>,
109
+ rro::If<(HYPERDRONE_RENDER_OUTPUT_NORMALS != 0), rro::Normals<>>,
110
+ rro::If<(HYPERDRONE_RENDER_OUTPUT_FLOW != 0), rro::Flow<>>,
111
+ rro::If<(HYPERDRONE_RENDER_OUTPUT_FLOW != 0), rro::FlowStatus<>>,
112
+ rro::If<(PROBES_ENABLED), rro::Probes>
113
+ >::type;
114
+ static constexpr bool ENABLE_MOTION_BLUR = HYPERDRONE_RENDER_MB_SAMPLES > 1;
115
+ static constexpr TI MOTION_BLUR_SAMPLES = HYPERDRONE_RENDER_MB_SAMPLES;
116
+ static constexpr bool ENABLE_ANTI_ALIASING = HYPERDRONE_RENDER_AA_GRID > 1;
117
+ static constexpr TI ANTI_ALIASING_GRID_SIZE = HYPERDRONE_RENDER_AA_GRID;
118
+ static constexpr TI NUM_OVERLAYS = HYPERDRONE_RENDER_NUM_OVERLAYS;
119
+ static constexpr TI MAX_OVERLAY_INSTANCES = HYPERDRONE_RENDER_MAX_OVERLAY_INSTANCES;
120
+ static constexpr TI MAX_OVERLAYS_PER_CAMERA = HYPERDRONE_RENDER_MAX_OVERLAYS_PER_CAMERA;
121
+ static constexpr bool ENABLE_DYNAMIC_MOTION_BLUR = HYPERDRONE_RENDER_DYNAMIC_MB != 0;
122
+ };
123
+
124
+ using RENDERER_SPEC = rrt::Specification<RendererConfiguration>;
125
+
126
+ // template so if-constexpr branches on the spec's feature flags are discarded without
127
+ // being instantiated on configs that lack the corresponding storage/operations
128
+ template <typename T_SPEC>
129
+ struct Renderer {
130
+ using SPEC = T_SPEC;
131
+ using RENDERER = rrt::Renderer<SPEC>;
132
+ using BACKEND = typename RENDERER::BACKEND;
133
+ DEVICE device;
134
+ RENDERER renderer;
135
+ rlt::rendering::SceneMetadata<T> scene_metadata;
136
+ bool initialized = false;
137
+ bool flow_initialized = false;
138
+ int device_id = 0;
139
+
140
+ // alias tensors shaped like the renderer tensor let the raw pointers of the arrays
141
+ // cross the memory-domain copy without intermediate staging
142
+ template <typename TENSOR, typename VALUE>
143
+ void copy_in(const VALUE* source, TENSOR& tensor){
144
+ using TENSOR_SPEC = typename TENSOR::SPEC;
145
+ static_assert(std::is_same<VALUE, typename TENSOR_SPEC::T>::value);
146
+ rlt::Tensor<rlt::tensor::Specification<VALUE, typename TENSOR_SPEC::TI, typename TENSOR_SPEC::SHAPE, true, rlt::tensor::RowMajorStride<typename TENSOR_SPEC::SHAPE>, true>> alias;
147
+ alias._data = source;
148
+ rlt::copy(device, renderer.device, alias, tensor);
149
+ }
150
+ template <typename TENSOR, typename VALUE>
151
+ void copy_out(const TENSOR& tensor, VALUE* destination){
152
+ using TENSOR_SPEC = typename TENSOR::SPEC;
153
+ static_assert(std::is_same<VALUE, typename TENSOR_SPEC::T>::value);
154
+ rlt::Tensor<rlt::tensor::Specification<VALUE, typename TENSOR_SPEC::TI, typename TENSOR_SPEC::SHAPE>> alias;
155
+ alias._data = destination;
156
+ rlt::copy(renderer.device, device, tensor, alias);
157
+ }
158
+ std::vector<rrt::CollisionResult> host_collisions;
159
+
160
+ Renderer(){
161
+ rlt::init(device);
162
+ rlt::malloc(device, renderer);
163
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
164
+ cudaPointerAttributes attributes{};
165
+ if(cudaPointerGetAttributes(&attributes, rlt::data(rlt::cameras(device, renderer))) != cudaSuccess){
166
+ rlt::free(device, renderer);
167
+ throw std::runtime_error("hyperdrone: unable to determine renderer CUDA device");
168
+ }
169
+ device_id = attributes.device;
170
+ #endif
171
+ }
172
+ ~Renderer(){
173
+ rlt::free(device, renderer);
174
+ }
175
+
176
+ const char* backend() const {
177
+ return rrt::backends::name<BACKEND>();
178
+ }
179
+
180
+ void init(rlt::rendering::Bundle<T>* bundle, const rrt::AssetPool* pool) {
181
+ if(initialized){
182
+ throw std::runtime_error("hyperdrone: renderer is already initialized; create a new Renderer for a different scene");
183
+ }
184
+ // the bundle may have been composed via add() (no loader-filled metadata) or
185
+ // extended after load; recomputing is deterministic and idempotent for pure loads
186
+ rlt::rendering::datasets::compute_bounds(device, *bundle);
187
+ scene_metadata = bundle->metadata;
188
+ if(pool != nullptr){
189
+ if constexpr (SPEC::ENABLE_OVERLAYS){
190
+ for(const auto& assembly : pool->assemblies){
191
+ if(assembly.parts.empty() || assembly.parts.size() > SPEC::MAX_OVERLAY_INSTANCES){
192
+ throw std::invalid_argument("hyperdrone: asset part count must be between 1 and max_overlay_instances");
193
+ }
194
+ }
195
+ rlt::init(device, renderer, *bundle, *pool);
196
+ }
197
+ else {
198
+ throw std::runtime_error("hyperdrone: an asset pool requires overlays (num_overlays/max_overlay_instances/max_overlays_per_camera > 0)");
199
+ }
200
+ }
201
+ else {
202
+ rlt::init(device, renderer, *bundle);
203
+ }
204
+ initialized = true;
205
+ }
206
+
207
+ void check_image_shape(size_t ndim, const size_t* shape) const {
208
+ if(ndim != 3 || shape[0] != SPEC::NUM_CAMERAS || shape[1] != SPEC::CAM_HEIGHT || shape[2] != SPEC::CAM_WIDTH){
209
+ throw std::invalid_argument("hyperdrone: output array must have shape (num_cameras, height, width)");
210
+ }
211
+ }
212
+ void check_cameras_dims(size_t ndim, const int64_t* dims) const {
213
+ const bool flat = ndim == 2 && dims[0] == SPEC::NUM_CAMERAS && dims[1] == 12;
214
+ const bool structured = ndim == 3 && dims[0] == SPEC::NUM_CAMERAS && dims[1] == 4 && dims[2] == 3;
215
+ if(!flat && !structured){
216
+ throw std::invalid_argument("hyperdrone: cameras must have shape (num_cameras, 12) or (num_cameras, 4, 3) and dtype float32");
217
+ }
218
+ }
219
+ void check_cameras_shape(const FloatArray& cameras) const {
220
+ int64_t dims[3] = {0, 0, 0};
221
+ for(size_t dimension = 0; dimension < cameras.ndim() && dimension < 3; dimension++){
222
+ dims[dimension] = (int64_t)cameras.shape(dimension);
223
+ }
224
+ check_cameras_dims(cameras.ndim(), dims);
225
+ }
226
+
227
+ template <typename ARRAY>
228
+ void check_rows(const ARRAY& values, std::initializer_list<size_t> leading, const char* expected) const {
229
+ bool valid = values.ndim() == leading.size() + 2;
230
+ size_t dimension = 0;
231
+ for(size_t extent : leading){
232
+ valid = valid && dimension < values.ndim() && values.shape(dimension) == extent;
233
+ dimension++;
234
+ }
235
+ valid = valid && values.shape(dimension) == 3 && values.shape(dimension + 1) == 4;
236
+ if(!valid){
237
+ throw std::invalid_argument(std::string("hyperdrone: transforms must have shape ") + expected + " and dtype float32");
238
+ }
239
+ }
240
+
241
+ void require_init() const {
242
+ if(!initialized){
243
+ throw std::runtime_error("hyperdrone: renderer is not initialized (call init(scene) first)");
244
+ }
245
+ }
246
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
247
+ void await_producer(unsigned long long producer_stream, cudaStream_t render_stream){
248
+ rlt::devices::cuda::order_after(renderer.backend->ordering_event, (cudaStream_t)producer_stream, render_stream);
249
+ }
250
+ #endif
251
+
252
+ void update() {
253
+ if constexpr (SPEC::ENABLE_OVERLAYS){
254
+ require_init();
255
+ rlt::update(device, renderer);
256
+ }
257
+ else {
258
+ throw std::runtime_error("hyperdrone: update() requires overlays to be enabled");
259
+ }
260
+ }
261
+
262
+ void synchronize() {
263
+ rlt::synchronize(device, renderer);
264
+ }
265
+
266
+ // camera input is a renderer-owned tensor written in place; under motion blur both
267
+ // shutter poses must be written every step, so a blur-free update writes both
268
+ void set_cameras(const float* cameras) {
269
+ require_init();
270
+ const rrt::Camera<T>* source = (const rrt::Camera<T>*)cameras;
271
+ copy_in(source, rlt::cameras(device, renderer));
272
+ if constexpr (SPEC::ENABLE_MOTION_BLUR){
273
+ copy_in(source, rlt::cameras_open(device, renderer));
274
+ }
275
+ }
276
+
277
+ void set_cameras_device(const float* cameras, unsigned long long producer_stream) {
278
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
279
+ require_init();
280
+ // enqueued on the render stream: orders after the previous launch (no overwrite
281
+ // hazard) and before the next one; a foreign producer stream is awaited via an
282
+ // event, never a host sync
283
+ cudaStream_t render_stream = rlt::stream(device, renderer);
284
+ rlt::devices::cuda::order_after(renderer.backend->ordering_event, rlt::collision_stream(device, renderer), render_stream);
285
+ await_producer(producer_stream, render_stream);
286
+ const size_t bytes = sizeof(rrt::Camera<T>) * SPEC::NUM_CAMERAS;
287
+ cudaMemcpyAsync(rlt::data(rlt::cameras(device, renderer)), cameras, bytes, cudaMemcpyDeviceToDevice, render_stream);
288
+ if constexpr (SPEC::ENABLE_MOTION_BLUR){
289
+ cudaMemcpyAsync(rlt::data(rlt::cameras_open(device, renderer)), cameras, bytes, cudaMemcpyDeviceToDevice, render_stream);
290
+ }
291
+ rlt::devices::cuda::order_after(renderer.backend->ordering_event, render_stream, rlt::collision_stream(device, renderer));
292
+ #else
293
+ (void)cameras; (void)producer_stream;
294
+ throw std::runtime_error("hyperdrone: device-resident camera input is only supported on the OptiX backend");
295
+ #endif
296
+ }
297
+
298
+ void set_motion_blur_cameras(const float* cameras_open, const float* cameras_close) {
299
+ require_init();
300
+ if constexpr (SPEC::ENABLE_MOTION_BLUR){
301
+ copy_in((const rrt::Camera<T>*)cameras_open, rlt::cameras_open(device, renderer));
302
+ copy_in((const rrt::Camera<T>*)cameras_close, rlt::cameras_close(device, renderer));
303
+ }
304
+ else {
305
+ throw std::runtime_error("hyperdrone: this renderer was compiled without motion blur (motion_blur_samples <= 1)");
306
+ }
307
+ }
308
+
309
+ void generate_cameras(const float center[3], float radius, const float up[3], float fov) {
310
+ require_init();
311
+ camera_orbit::write(device, renderer, center, radius, up, fov);
312
+ }
313
+
314
+ void generate_probe_directions() {
315
+ if constexpr (PROBES_ENABLED){
316
+ rlt::generate_probe_directions(device, renderer);
317
+ }
318
+ else {
319
+ throw std::runtime_error("hyperdrone: this renderer was compiled without collision probes (num_probes=0)");
320
+ }
321
+ }
322
+
323
+ void advance_flow() {
324
+ require_init();
325
+ if constexpr (SPEC::HAS_FLOW){
326
+ using rl_tools::advance_flow;
327
+ advance_flow(device, renderer);
328
+ flow_initialized = true;
329
+ }
330
+ else {
331
+ throw std::runtime_error("hyperdrone: this renderer has no flow output");
332
+ }
333
+ }
334
+
335
+ void prepare_flow() {
336
+ if constexpr (SPEC::HAS_FLOW){
337
+ if(!flow_initialized){
338
+ advance_flow();
339
+ if constexpr (SPEC::ENABLE_OVERLAYS){
340
+ using rl_tools::update;
341
+ update(device, renderer);
342
+ }
343
+ }
344
+ }
345
+ }
346
+
347
+ void render() {
348
+ render_launch();
349
+ render_sync();
350
+ }
351
+
352
+ void render_launch() {
353
+ require_init();
354
+ prepare_flow();
355
+ rlt::render_launch(device, renderer);
356
+ }
357
+
358
+ void render_sync() {
359
+ require_init();
360
+ rlt::render_sync(device, renderer);
361
+ }
362
+
363
+ void probe() {
364
+ require_init();
365
+ if constexpr (PROBES_ENABLED){
366
+ rlt::probe(device, renderer);
367
+ }
368
+ else {
369
+ throw std::runtime_error("hyperdrone: this renderer was compiled without collision probes (num_probes=0)");
370
+ }
371
+ }
372
+
373
+ void probe_launch() {
374
+ require_init();
375
+ if constexpr (PROBES_ENABLED){
376
+ rlt::probe_launch(device, renderer);
377
+ }
378
+ else {
379
+ throw std::runtime_error("hyperdrone: this renderer was compiled without collision probes (num_probes=0)");
380
+ }
381
+ }
382
+
383
+ void probe_sync() {
384
+ require_init();
385
+ if constexpr (PROBES_ENABLED){
386
+ rlt::probe_sync(device, renderer);
387
+ }
388
+ else {
389
+ throw std::runtime_error("hyperdrone: this renderer was compiled without collision probes (num_probes=0)");
390
+ }
391
+ }
392
+
393
+ void read_frame_buffer(uint32_t* dst) {
394
+ if constexpr (SPEC::HAS_RGB){
395
+ require_init();
396
+ copy_out(rlt::output(device, renderer, rro::RGB<>{}), dst);
397
+ }
398
+ else {
399
+ throw std::runtime_error("hyperdrone: this renderer has no RGB output");
400
+ }
401
+ }
402
+
403
+ void read_depth_buffer(float* dst) {
404
+ if constexpr (SPEC::HAS_DEPTH){
405
+ require_init();
406
+ copy_out(rlt::output(device, renderer, rro::Depth<>{}), dst);
407
+ }
408
+ else {
409
+ throw std::runtime_error("hyperdrone: this renderer has no depth output");
410
+ }
411
+ }
412
+
413
+ void read_collision_results(float* distances, int32_t* hits) {
414
+ if constexpr (PROBES_ENABLED){
415
+ require_init();
416
+ constexpr TI count = SPEC::NUM_CAMERAS * SPEC::NUM_PROBES;
417
+ host_collisions.resize(count);
418
+ copy_out(rlt::output(device, renderer, rro::Probes{}), host_collisions.data());
419
+ for(TI i = 0; i < count; i++){
420
+ distances[i] = host_collisions[i].distance;
421
+ hits[i] = host_collisions[i].hit;
422
+ }
423
+ }
424
+ else {
425
+ throw std::runtime_error("hyperdrone: this renderer was compiled without collision probes (num_probes=0)");
426
+ }
427
+ }
428
+
429
+ uint32_t* framebuffer_device_ptr() {
430
+ if constexpr (SPEC::HAS_RGB){
431
+ require_init();
432
+ return rlt::data(rlt::output(device, renderer, rro::RGB<>{}));
433
+ }
434
+ else {
435
+ throw std::runtime_error("hyperdrone: this renderer has no RGB output");
436
+ }
437
+ }
438
+
439
+ float* depthbuffer_device_ptr() {
440
+ if constexpr (SPEC::HAS_DEPTH){
441
+ require_init();
442
+ return rlt::data(rlt::output(device, renderer, rro::Depth<>{}));
443
+ }
444
+ else {
445
+ throw std::runtime_error("hyperdrone: this renderer has no depth output");
446
+ }
447
+ }
448
+
449
+ int buffer_device_type() const {
450
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
451
+ return 2;
452
+ #else
453
+ return 1;
454
+ #endif
455
+ }
456
+
457
+ uint32_t* frame_buffer_live() {
458
+ return framebuffer_device_ptr();
459
+ }
460
+
461
+ float* depth_buffer_live() {
462
+ return depthbuffer_device_ptr();
463
+ }
464
+
465
+ void scene_bounds(float center[3], float half_extent[3], float& camera_radius) const {
466
+ for(int i = 0; i < 3; i++){
467
+ center[i] = scene_metadata.center[i];
468
+ half_extent[i] = scene_metadata.half_extent[i];
469
+ }
470
+ camera_radius = scene_metadata.max_ray_length / 2;
471
+ }
472
+
473
+ bool can_attach(size_t camera, size_t overlay) {
474
+ if constexpr (SPEC::ENABLE_OVERLAYS){
475
+ require_init();
476
+ return rlt::can_attach(device, renderer, (TI)camera, rrt::OverlayIndex{overlay});
477
+ }
478
+ else {
479
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
480
+ }
481
+ }
482
+ void attach(size_t camera, size_t overlay) {
483
+ if constexpr (SPEC::ENABLE_OVERLAYS){
484
+ require_init();
485
+ if(camera >= SPEC::NUM_CAMERAS || overlay >= SPEC::NUM_OVERLAYS){
486
+ throw std::invalid_argument("hyperdrone: camera or overlay index out of range");
487
+ }
488
+ if(!can_attach(camera, overlay)){
489
+ throw std::runtime_error("hyperdrone: camera overlay capacity exceeded");
490
+ }
491
+ rlt::attach(device, renderer, (TI)camera, rrt::OverlayIndex{overlay});
492
+ }
493
+ else {
494
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
495
+ }
496
+ }
497
+ void detach(size_t camera, size_t overlay) {
498
+ if constexpr (SPEC::ENABLE_OVERLAYS){
499
+ require_init();
500
+ if(camera >= SPEC::NUM_CAMERAS || overlay >= SPEC::NUM_OVERLAYS){
501
+ throw std::invalid_argument("hyperdrone: camera or overlay index out of range");
502
+ }
503
+ rlt::detach(device, renderer, (TI)camera, rrt::OverlayIndex{overlay});
504
+ }
505
+ else {
506
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
507
+ }
508
+ }
509
+ bool can_spawn(size_t overlay, size_t asset) {
510
+ if constexpr (SPEC::ENABLE_OVERLAYS){
511
+ require_init();
512
+ return rlt::can_spawn(device, renderer, rrt::OverlayIndex{overlay}, rrt::AssetHandle{asset});
513
+ }
514
+ else {
515
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
516
+ }
517
+ }
518
+ rrt::OverlayPlacement spawn(size_t overlay, size_t asset, const float transform[12]) {
519
+ if constexpr (SPEC::ENABLE_OVERLAYS){
520
+ require_init();
521
+ if(overlay >= SPEC::NUM_OVERLAYS || asset >= renderer.assets.size()){
522
+ throw std::invalid_argument("hyperdrone: overlay or asset index out of range");
523
+ }
524
+ if(!can_spawn(overlay, asset)){
525
+ throw std::runtime_error("hyperdrone: overlay capacity exceeded");
526
+ }
527
+ return rlt::spawn(device, renderer, rrt::OverlayIndex{overlay}, rrt::AssetHandle{asset}, transform);
528
+ }
529
+ else {
530
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
531
+ }
532
+ }
533
+ void despawn(size_t overlay, const rrt::OverlayPlacement& placement) {
534
+ if constexpr (SPEC::ENABLE_OVERLAYS){
535
+ require_init();
536
+ rlt::despawn(device, renderer, rrt::OverlayIndex{overlay}, checked_placement(overlay, placement));
537
+ }
538
+ else {
539
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
540
+ }
541
+ }
542
+ // the core verbs fail fast on a placement that is not spawned; a binding throws instead
543
+ rrt::OverlayPlacement checked_placement(size_t overlay, const rrt::OverlayPlacement& placement) const {
544
+ require_init();
545
+ if constexpr (SPEC::ENABLE_OVERLAYS){
546
+ if(!rrt::detail::placement_valid(renderer, rrt::OverlayIndex{overlay}, placement)){
547
+ throw std::invalid_argument("hyperdrone: placement out of range or not spawned");
548
+ }
549
+ }
550
+ return rrt::OverlayPlacement{placement.first_slot, placement.num_parts, placement.first_part};
551
+ }
552
+ void set_transform(size_t overlay, const rrt::OverlayPlacement& placement, const float transform[12]) {
553
+ if constexpr (SPEC::ENABLE_OVERLAYS){
554
+ rlt::set_transform(device, renderer, rrt::OverlayIndex{overlay}, checked_placement(overlay, placement), transform);
555
+ }
556
+ else {
557
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
558
+ }
559
+ }
560
+ void set_transform_pair(size_t overlay, const rrt::OverlayPlacement& placement, const float open[12], const float close[12]) {
561
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
562
+ rlt::set_transform_pair(device, renderer, rrt::OverlayIndex{overlay}, checked_placement(overlay, placement), open, close);
563
+ }
564
+ else {
565
+ throw std::runtime_error("hyperdrone: this renderer was compiled without dynamic motion blur (dynamic_motion_blur=False)");
566
+ }
567
+ }
568
+ void set_transforms(size_t overlay, const rrt::OverlayPlacement& placement, const float* poses) {
569
+ if constexpr (SPEC::ENABLE_OVERLAYS){
570
+ rlt::set_transforms(device, renderer, rrt::OverlayIndex{overlay}, checked_placement(overlay, placement), poses);
571
+ }
572
+ else {
573
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
574
+ }
575
+ }
576
+ void set_motion_transforms(size_t overlay, const rrt::OverlayPlacement& placement, const float* samples, const float* close) {
577
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
578
+ rlt::set_motion_transforms(device, renderer, rrt::OverlayIndex{overlay}, checked_placement(overlay, placement), samples, close);
579
+ }
580
+ else {
581
+ throw std::runtime_error("hyperdrone: this renderer was compiled without dynamic motion blur (dynamic_motion_blur=False)");
582
+ }
583
+ }
584
+ template <typename WRITE>
585
+ void for_each_active_slot(WRITE&& write){
586
+ for(size_t overlay = 0; overlay < SPEC::NUM_OVERLAYS; overlay++){
587
+ for(size_t slot = 0; slot < SPEC::MAX_OVERLAY_INSTANCES; slot++){
588
+ if(renderer.overlays[overlay].slots[slot].active){
589
+ write(overlay, slot, overlay * SPEC::MAX_OVERLAY_INSTANCES + slot);
590
+ }
591
+ }
592
+ }
593
+ }
594
+ void set_all_transforms(const float* poses) {
595
+ if constexpr (SPEC::ENABLE_OVERLAYS){
596
+ require_init();
597
+ for_each_active_slot([&](size_t overlay, size_t slot, size_t row){
598
+ rlt::set_transforms(device, renderer, rrt::OverlayIndex{overlay}, rrt::OverlayPlacement{slot, 1, 0}, poses + row * 12);
599
+ });
600
+ }
601
+ else {
602
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
603
+ }
604
+ }
605
+ void set_all_motion_transforms(const float* samples, const float* close) {
606
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
607
+ require_init();
608
+ constexpr size_t SLOTS = (size_t)SPEC::NUM_OVERLAYS * SPEC::MAX_OVERLAY_INSTANCES;
609
+ for_each_active_slot([&](size_t overlay, size_t slot, size_t row){
610
+ float rows[SPEC::MOTION_BLUR_SAMPLES][12];
611
+ for(size_t sample = 0; sample < SPEC::MOTION_BLUR_SAMPLES; sample++){
612
+ std::memcpy(rows[sample], samples + (sample * SLOTS + row) * 12, sizeof(rows[sample]));
613
+ }
614
+ rlt::set_motion_transforms(device, renderer, rrt::OverlayIndex{overlay}, rrt::OverlayPlacement{slot, 1, 0}, &rows[0][0], close + row * 12);
615
+ });
616
+ }
617
+ else {
618
+ throw std::runtime_error("hyperdrone: this renderer was compiled without dynamic motion blur (dynamic_motion_blur=False)");
619
+ }
620
+ }
621
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
622
+ // device-resident rows go device-to-device into the resident tensors on the render stream
623
+ // (sample_stride rows between the sample slabs of samples; null samples replicate poses);
624
+ // the rows leave the host's pending state, so a later update cannot overwrite them
625
+ void write_rows_device(size_t first_row, size_t count, const float* poses, const float* samples, size_t sample_stride, unsigned long long producer_stream){
626
+ constexpr size_t SLOTS = (size_t)SPEC::NUM_OVERLAYS * SPEC::MAX_OVERLAY_INSTANCES;
627
+ cudaStream_t render_stream = rlt::stream(device, renderer);
628
+ await_producer(producer_stream, render_stream);
629
+ cudaMemcpyAsync(rlt::data(rlt::transforms(device, renderer)) + first_row * 12, poses, count * 12 * sizeof(float), cudaMemcpyDeviceToDevice, render_stream);
630
+ for(size_t row = first_row; row < first_row + count; row++){
631
+ renderer.transforms_pending[row] = false;
632
+ }
633
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
634
+ for(size_t sample = 0; sample < SPEC::MOTION_BLUR_SAMPLES; sample++){
635
+ const float* source = samples == nullptr ? poses : samples + sample * sample_stride * 12;
636
+ cudaMemcpyAsync(rlt::data(rlt::transforms_motion(device, renderer)) + (sample * SLOTS + first_row) * 12, source, count * 12 * sizeof(float), cudaMemcpyDeviceToDevice, render_stream);
637
+ }
638
+ for(size_t row = first_row; row < first_row + count; row++){
639
+ renderer.transforms_motion_pending[row] = false;
640
+ }
641
+ }
642
+ }
643
+ #endif
644
+ void set_transforms_device(size_t overlay, const rrt::OverlayPlacement& placement, const float* poses, unsigned long long producer_stream) {
645
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
646
+ if constexpr (SPEC::ENABLE_OVERLAYS){
647
+ const auto p = checked_placement(overlay, placement);
648
+ write_rows_device(overlay * SPEC::MAX_OVERLAY_INSTANCES + p.first_slot, p.num_parts, poses, nullptr, 0, producer_stream);
649
+ return;
650
+ }
651
+ #endif
652
+ (void)overlay; (void)placement; (void)poses; (void)producer_stream;
653
+ throw std::runtime_error("hyperdrone: device-resident transform input requires the OptiX backend and overlays");
654
+ }
655
+ void set_motion_transforms_device(size_t overlay, const rrt::OverlayPlacement& placement, const float* samples, const float* close, unsigned long long producer_stream) {
656
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
657
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
658
+ const auto p = checked_placement(overlay, placement);
659
+ write_rows_device(overlay * SPEC::MAX_OVERLAY_INSTANCES + p.first_slot, p.num_parts, close, samples, p.num_parts, producer_stream);
660
+ return;
661
+ }
662
+ #endif
663
+ (void)overlay; (void)placement; (void)samples; (void)close; (void)producer_stream;
664
+ throw std::runtime_error("hyperdrone: device-resident motion input requires the OptiX backend and dynamic_motion_blur=True");
665
+ }
666
+ void set_all_transforms_device(const float* poses, unsigned long long producer_stream) {
667
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
668
+ if constexpr (SPEC::ENABLE_OVERLAYS){
669
+ require_init();
670
+ write_rows_device(0, (size_t)SPEC::NUM_OVERLAYS * SPEC::MAX_OVERLAY_INSTANCES, poses, nullptr, 0, producer_stream);
671
+ return;
672
+ }
673
+ #endif
674
+ (void)poses; (void)producer_stream;
675
+ throw std::runtime_error("hyperdrone: device-resident transform input requires the OptiX backend and overlays");
676
+ }
677
+ void set_all_motion_transforms_device(const float* samples, const float* close, unsigned long long producer_stream) {
678
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
679
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
680
+ require_init();
681
+ constexpr size_t SLOTS = (size_t)SPEC::NUM_OVERLAYS * SPEC::MAX_OVERLAY_INSTANCES;
682
+ write_rows_device(0, SLOTS, close, samples, SLOTS, producer_stream);
683
+ return;
684
+ }
685
+ #endif
686
+ (void)samples; (void)close; (void)producer_stream;
687
+ throw std::runtime_error("hyperdrone: device-resident motion input requires the OptiX backend and dynamic_motion_blur=True");
688
+ }
689
+ float* transforms_live() {
690
+ if constexpr (SPEC::ENABLE_OVERLAYS){
691
+ require_init();
692
+ return rlt::data(rlt::transforms(device, renderer));
693
+ }
694
+ else {
695
+ throw std::runtime_error("hyperdrone: this renderer was compiled without overlays");
696
+ }
697
+ }
698
+ float* transforms_motion_live() {
699
+ if constexpr (SPEC::ENABLE_DYNAMIC_MOTION_BLUR){
700
+ require_init();
701
+ return rlt::data(rlt::transforms_motion(device, renderer));
702
+ }
703
+ else {
704
+ throw std::runtime_error("hyperdrone: this renderer was compiled without dynamic motion blur (dynamic_motion_blur=False)");
705
+ }
706
+ }
707
+ unsigned long long render_stream() {
708
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
709
+ require_init();
710
+ return (unsigned long long)rlt::stream(device, renderer);
711
+ #else
712
+ return 0;
713
+ #endif
714
+ }
715
+ void set_motion_blur_cameras_device(const float* cameras_open, const float* cameras_close, unsigned long long producer_stream) {
716
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
717
+ if constexpr (SPEC::ENABLE_MOTION_BLUR){
718
+ require_init();
719
+ cudaStream_t render_stream = rlt::stream(device, renderer);
720
+ rlt::devices::cuda::order_after(renderer.backend->ordering_event, rlt::collision_stream(device, renderer), render_stream);
721
+ await_producer(producer_stream, render_stream);
722
+ const size_t bytes = sizeof(rrt::Camera<T>) * SPEC::NUM_CAMERAS;
723
+ cudaMemcpyAsync(rlt::data(rlt::cameras_open(device, renderer)), cameras_open, bytes, cudaMemcpyDeviceToDevice, render_stream);
724
+ cudaMemcpyAsync(rlt::data(rlt::cameras_close(device, renderer)), cameras_close, bytes, cudaMemcpyDeviceToDevice, render_stream);
725
+ rlt::devices::cuda::order_after(renderer.backend->ordering_event, render_stream, rlt::collision_stream(device, renderer));
726
+ }
727
+ else {
728
+ throw std::runtime_error("hyperdrone: this renderer was compiled without motion blur (motion_blur_samples <= 1)");
729
+ }
730
+ #else
731
+ (void)cameras_open; (void)cameras_close; (void)producer_stream;
732
+ throw std::runtime_error("hyperdrone: device-resident camera input is only supported on the OptiX backend");
733
+ #endif
734
+ }
735
+ };
736
+ }
737
+
738
+ namespace nb = nanobind;
739
+ using hyperdrone::Transform;
740
+ using hyperdrone::Vec3;
741
+ using hyperdrone::extract_transform;
742
+ using hyperdrone::make_owned_array;
743
+
744
+ template <bool ENABLED, typename VALUE, size_t CHANNELS, typename RENDERER, typename GET>
745
+ void bind_image_output(nb::class_<RENDERER>& cls, const char* name, GET get_buffer){
746
+ using SPEC = typename RENDERER::SPEC;
747
+ const std::string channel(name);
748
+ std::vector<size_t> shape{SPEC::NUM_CAMERAS, SPEC::CAM_HEIGHT, SPEC::CAM_WIDTH};
749
+ if constexpr (CHANNELS > 1){
750
+ shape.push_back(CHANNELS);
751
+ }
752
+ cls.def(("read_" + channel + "_buffer").c_str(), [=](RENDERER& self, nb::ndarray<VALUE, nb::c_contig, nb::device::cpu> out){
753
+ if constexpr (ENABLED){
754
+ self.require_init();
755
+ bool matches = out.ndim() == shape.size();
756
+ for(size_t axis = 0; matches && axis < shape.size(); axis++){
757
+ matches = out.shape(axis) == shape[axis];
758
+ }
759
+ if(!matches){
760
+ throw std::invalid_argument("hyperdrone: output array shape does not match " + channel);
761
+ }
762
+ nb::gil_scoped_release release;
763
+ self.copy_out(get_buffer(self), out.data());
764
+ }
765
+ else {
766
+ throw std::runtime_error("hyperdrone: this renderer has no " + channel + " output");
767
+ }
768
+ }, nb::arg("out").noconvert());
769
+ cls.def((channel + "_dlpack").c_str(), [=](RENDERER& self) -> nb::ndarray<> {
770
+ if constexpr (ENABLED){
771
+ self.require_init();
772
+ return {data(get_buffer(self)), shape.size(), shape.data(), nb::find(&self), nullptr,
773
+ nb::dtype<VALUE>(), self.buffer_device_type(), self.device_id};
774
+ }
775
+ else {
776
+ throw std::runtime_error("hyperdrone: this renderer has no " + channel + " output");
777
+ }
778
+ });
779
+ }
780
+
781
+ NB_MODULE(HYPERDRONE_MODULE_NAME, m){
782
+ m.doc() = "JIT-specialized RLtools raytracer";
783
+ m.def("_set_verbosity", &hyperdrone::set_verbosity);
784
+
785
+ using Renderer = HYPERDRONE_MODULE_NAME::Renderer<HYPERDRONE_MODULE_NAME::RENDERER_SPEC>;
786
+ using SPEC = Renderer::SPEC;
787
+ auto renderer_class = nb::class_<Renderer>(m, "Renderer");
788
+ bind_image_output<SPEC::HAS_SEGMENTATION, uint32_t, 1>(renderer_class, "segmentation",
789
+ [](auto& self) -> auto& { return output(self.device, self.renderer, HYPERDRONE_MODULE_NAME::SEGMENTATION_OUTPUT{}); });
790
+ bind_image_output<SPEC::HAS_NORMALS, float, 3>(renderer_class, "normals",
791
+ [](auto& self) -> auto& { return output(self.device, self.renderer, rro::Normals<>{}); });
792
+ bind_image_output<SPEC::HAS_FLOW, float, 2>(renderer_class, "flow",
793
+ [](auto& self) -> auto& { return output(self.device, self.renderer, rro::Flow<>{}); });
794
+ bind_image_output<SPEC::HAS_FLOW, uint32_t, 1>(renderer_class, "flow_status",
795
+ [](auto& self) -> auto& { return output(self.device, self.renderer, rro::FlowStatus<>{}); });
796
+ renderer_class
797
+ .def(nb::init<>())
798
+ .def_prop_ro("backend", [](const Renderer& self){ return std::string(self.backend()); })
799
+ .def("init", [](Renderer& self, rrt::Bundle<float>& bundle, const rrt::AssetPool* pool){
800
+ nb::gil_scoped_release release;
801
+ self.init(&bundle, pool);
802
+ }, nb::arg("scene"), nb::arg("asset_pool").none() = nb::none(), nb::keep_alive<1, 2>(), nb::keep_alive<1, 3>())
803
+ .def("update", &Renderer::update, nb::call_guard<nb::gil_scoped_release>())
804
+ .def("synchronize", &Renderer::synchronize, nb::call_guard<nb::gil_scoped_release>())
805
+ .def("set_cameras", [](Renderer& self, FloatArray cameras){
806
+ self.check_cameras_shape(cameras);
807
+ self.set_cameras(cameras.data());
808
+ }, nb::arg("cameras"))
809
+ .def("set_motion_blur_cameras", [](Renderer& self, FloatArray cameras_open, FloatArray cameras_close){
810
+ self.check_cameras_shape(cameras_open);
811
+ self.check_cameras_shape(cameras_close);
812
+ self.set_motion_blur_cameras(cameras_open.data(), cameras_close.data());
813
+ }, nb::arg("cameras_open"), nb::arg("cameras_close"))
814
+ .def("generate_cameras", [](Renderer& self, Vec3 center, float radius, Vec3 up, float fov){
815
+ self.generate_cameras(center.data(), radius, up.data(), fov);
816
+ }, nb::arg("center"), nb::arg("radius"), nb::arg("up"), nb::arg("fov"))
817
+ .def("generate_probe_directions", &Renderer::generate_probe_directions)
818
+ .def("advance_flow", &Renderer::advance_flow, nb::call_guard<nb::gil_scoped_release>())
819
+ .def("render", &Renderer::render, nb::call_guard<nb::gil_scoped_release>())
820
+ .def("render_launch", &Renderer::render_launch, nb::call_guard<nb::gil_scoped_release>())
821
+ .def("render_sync", &Renderer::render_sync, nb::call_guard<nb::gil_scoped_release>())
822
+ .def("probe", &Renderer::probe, nb::call_guard<nb::gil_scoped_release>())
823
+ .def("probe_launch", &Renderer::probe_launch, nb::call_guard<nb::gil_scoped_release>())
824
+ .def("probe_sync", &Renderer::probe_sync, nb::call_guard<nb::gil_scoped_release>())
825
+ .def("read_frame_buffer", [](Renderer& self, nb::ndarray<uint32_t, nb::c_contig, nb::device::cpu> out){
826
+ size_t shape[3] = {(size_t)out.shape(0), out.ndim() > 1 ? (size_t)out.shape(1) : 0, out.ndim() > 2 ? (size_t)out.shape(2) : 0};
827
+ self.check_image_shape(out.ndim(), shape);
828
+ nb::gil_scoped_release release;
829
+ self.read_frame_buffer(out.data());
830
+ }, nb::arg("out"))
831
+ .def("read_depth_buffer", [](Renderer& self, nb::ndarray<float, nb::c_contig, nb::device::cpu> out){
832
+ size_t shape[3] = {(size_t)out.shape(0), out.ndim() > 1 ? (size_t)out.shape(1) : 0, out.ndim() > 2 ? (size_t)out.shape(2) : 0};
833
+ self.check_image_shape(out.ndim(), shape);
834
+ nb::gil_scoped_release release;
835
+ self.read_depth_buffer(out.data());
836
+ }, nb::arg("out"))
837
+ .def("read_collision_results", [](Renderer& self, nb::ndarray<float, nb::c_contig, nb::device::cpu> distances, nb::ndarray<int32_t, nb::c_contig, nb::device::cpu> hits){
838
+ const size_t expected = (size_t)SPEC::NUM_CAMERAS * HYPERDRONE_RENDER_NUM_PROBES;
839
+ if(distances.size() != expected || hits.size() != expected){
840
+ throw std::invalid_argument("hyperdrone: collision output arrays must have num_cameras * num_probes elements");
841
+ }
842
+ nb::gil_scoped_release release;
843
+ self.read_collision_results(distances.data(), hits.data());
844
+ }, nb::arg("distances"), nb::arg("hits"))
845
+ .def("frame_dlpack", [](Renderer& self){
846
+ uint8_t* pointer = reinterpret_cast<uint8_t*>(self.frame_buffer_live());
847
+ return nb::ndarray<>(pointer, {SPEC::NUM_CAMERAS, SPEC::CAM_HEIGHT, SPEC::CAM_WIDTH, 4}, nb::find(&self), {},
848
+ nb::dtype<uint8_t>(), self.buffer_device_type(), self.device_id);
849
+ })
850
+ .def("frame_raw_dlpack", [](Renderer& self){
851
+ uint32_t* pointer = self.frame_buffer_live();
852
+ return nb::ndarray<>(pointer, {SPEC::NUM_CAMERAS, SPEC::CAM_HEIGHT, SPEC::CAM_WIDTH}, nb::find(&self), {},
853
+ nb::dtype<uint32_t>(), self.buffer_device_type(), self.device_id);
854
+ })
855
+ .def("depth_dlpack", [](Renderer& self){
856
+ float* pointer = self.depth_buffer_live();
857
+ return nb::ndarray<>(pointer, {SPEC::NUM_CAMERAS, SPEC::CAM_HEIGHT, SPEC::CAM_WIDTH}, nb::find(&self), {},
858
+ nb::dtype<float>(), self.buffer_device_type(), self.device_id);
859
+ })
860
+ .def("buffer_device_id", [](Renderer& self){ return self.device_id; })
861
+ .def("buffer_device_type", [](Renderer& self){ return self.buffer_device_type(); })
862
+ .def("scene_bounds", [](Renderer& self){
863
+ float center[3], half_extent[3], camera_radius;
864
+ self.scene_bounds(center, half_extent, camera_radius);
865
+ return nb::make_tuple(make_owned_array(center, {3}), make_owned_array(half_extent, {3}), camera_radius);
866
+ })
867
+ .def("can_attach", [](Renderer& self, size_t camera, size_t overlay){ return self.can_attach(camera, overlay); })
868
+ .def("attach", [](Renderer& self, size_t camera, size_t overlay){ self.attach(camera, overlay); })
869
+ .def("detach", [](Renderer& self, size_t camera, size_t overlay){ self.detach(camera, overlay); })
870
+ .def("can_spawn", [](Renderer& self, size_t overlay, size_t asset){ return self.can_spawn(overlay, asset); })
871
+ .def("spawn", [](Renderer& self, size_t overlay, size_t asset, Transform transform){
872
+ float values[12];
873
+ extract_transform(transform, values);
874
+ rrt::OverlayPlacement placement = self.spawn(overlay, asset, values);
875
+ return nb::make_tuple(placement.first_slot, placement.num_parts, placement.first_part);
876
+ }, nb::arg("overlay"), nb::arg("asset"), nb::arg("transform"))
877
+ .def("despawn", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement){
878
+ self.despawn(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]});
879
+ }, nb::arg("overlay"), nb::arg("placement"))
880
+ .def("set_transform", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement, Transform transform){
881
+ float values[12];
882
+ extract_transform(transform, values);
883
+ self.set_transform(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]}, values);
884
+ }, nb::arg("overlay"), nb::arg("placement"), nb::arg("transform"))
885
+ .def("set_transform_pair", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement, Transform open, Transform close){
886
+ float open_values[12], close_values[12];
887
+ extract_transform(open, open_values);
888
+ extract_transform(close, close_values);
889
+ self.set_transform_pair(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]}, open_values, close_values);
890
+ }, nb::arg("overlay"), nb::arg("placement"), nb::arg("open"), nb::arg("close"))
891
+ .def("set_transforms", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement, FloatArray poses){
892
+ self.check_rows(poses, {placement[1]}, "(num_parts, 3, 4)");
893
+ self.set_transforms(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]}, poses.data());
894
+ }, nb::arg("overlay"), nb::arg("placement"), nb::arg("poses"))
895
+ .def("set_motion_transforms", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement, FloatArray samples, FloatArray close){
896
+ self.check_rows(samples, {SPEC::MOTION_BLUR_SAMPLES, placement[1]}, "(motion_blur_samples, num_parts, 3, 4)");
897
+ self.check_rows(close, {placement[1]}, "(num_parts, 3, 4)");
898
+ self.set_motion_transforms(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]}, samples.data(), close.data());
899
+ }, nb::arg("overlay"), nb::arg("placement"), nb::arg("samples"), nb::arg("close"))
900
+ .def("set_all_transforms", [](Renderer& self, FloatArray poses){
901
+ self.check_rows(poses, {SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES}, "(num_overlays, max_overlay_instances, 3, 4)");
902
+ self.set_all_transforms(poses.data());
903
+ }, nb::arg("poses"))
904
+ .def("set_all_motion_transforms", [](Renderer& self, FloatArray samples, FloatArray close){
905
+ self.check_rows(samples, {SPEC::MOTION_BLUR_SAMPLES, SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES}, "(motion_blur_samples, num_overlays, max_overlay_instances, 3, 4)");
906
+ self.check_rows(close, {SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES}, "(num_overlays, max_overlay_instances, 3, 4)");
907
+ self.set_all_motion_transforms(samples.data(), close.data());
908
+ }, nb::arg("samples"), nb::arg("close"))
909
+ .def("transforms_dlpack", [](Renderer& self){
910
+ float* pointer = self.transforms_live();
911
+ return nb::ndarray<>(pointer, {SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES, 3, 4}, nb::find(&self), {},
912
+ nb::dtype<float>(), self.buffer_device_type(), self.device_id);
913
+ })
914
+ .def("transforms_motion_dlpack", [](Renderer& self){
915
+ float* pointer = self.transforms_motion_live();
916
+ return nb::ndarray<>(pointer, {SPEC::MOTION_BLUR_SAMPLES, SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES, 3, 4}, nb::find(&self), {},
917
+ nb::dtype<float>(), self.buffer_device_type(), self.device_id);
918
+ })
919
+ .def("render_stream", [](Renderer& self){ return (uintptr_t)self.render_stream(); });
920
+
921
+ #if defined(RL_TOOLS_RENDERING_RAYTRACING_BACKEND_OPTIX)
922
+ using CudaFloatArray = nb::ndarray<const float, nb::c_contig, nb::device::cuda>;
923
+ renderer_class
924
+ .def("set_transforms_device", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement, CudaFloatArray poses, uintptr_t stream){
925
+ self.check_rows(poses, {placement[1]}, "(num_parts, 3, 4)");
926
+ self.set_transforms_device(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]}, poses.data(), stream);
927
+ }, nb::arg("overlay"), nb::arg("placement"), nb::arg("poses"), nb::arg("stream") = 0)
928
+ .def("set_motion_transforms_device", [](Renderer& self, size_t overlay, std::array<size_t, 3> placement, CudaFloatArray samples, CudaFloatArray close, uintptr_t stream){
929
+ self.check_rows(samples, {SPEC::MOTION_BLUR_SAMPLES, placement[1]}, "(motion_blur_samples, num_parts, 3, 4)");
930
+ self.check_rows(close, {placement[1]}, "(num_parts, 3, 4)");
931
+ self.set_motion_transforms_device(overlay, rrt::OverlayPlacement{placement[0], placement[1], placement[2]}, samples.data(), close.data(), stream);
932
+ }, nb::arg("overlay"), nb::arg("placement"), nb::arg("samples"), nb::arg("close"), nb::arg("stream") = 0)
933
+ .def("set_all_transforms_device", [](Renderer& self, CudaFloatArray poses, uintptr_t stream){
934
+ self.check_rows(poses, {SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES}, "(num_overlays, max_overlay_instances, 3, 4)");
935
+ self.set_all_transforms_device(poses.data(), stream);
936
+ }, nb::arg("poses"), nb::arg("stream") = 0)
937
+ .def("set_all_motion_transforms_device", [](Renderer& self, CudaFloatArray samples, CudaFloatArray close, uintptr_t stream){
938
+ self.check_rows(samples, {SPEC::MOTION_BLUR_SAMPLES, SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES}, "(motion_blur_samples, num_overlays, max_overlay_instances, 3, 4)");
939
+ self.check_rows(close, {SPEC::NUM_OVERLAYS, SPEC::MAX_OVERLAY_INSTANCES}, "(num_overlays, max_overlay_instances, 3, 4)");
940
+ self.set_all_motion_transforms_device(samples.data(), close.data(), stream);
941
+ }, nb::arg("samples"), nb::arg("close"), nb::arg("stream") = 0)
942
+ .def("set_cameras_device", [](Renderer& self, nb::ndarray<const float, nb::c_contig, nb::device::cuda> cameras, uintptr_t stream){
943
+ int64_t dims[3] = {0, 0, 0};
944
+ for(size_t dimension = 0; dimension < cameras.ndim() && dimension < 3; dimension++){
945
+ dims[dimension] = (int64_t)cameras.shape(dimension);
946
+ }
947
+ self.check_cameras_dims(cameras.ndim(), dims);
948
+ self.set_cameras_device(cameras.data(), stream);
949
+ }, nb::arg("cameras"), nb::arg("stream") = 0)
950
+ // benchmark fast path: index a pre-uploaded set without any per-call DLPack traffic
951
+ .def("set_cameras_from_cuda_buffer", [](Renderer& self, hyperdrone::CudaBuffer& buffer, size_t index, uintptr_t stream){
952
+ if(buffer.slice_elements() != (size_t)SPEC::NUM_CAMERAS * 12){
953
+ throw std::invalid_argument("hyperdrone: CudaBuffer slices must hold num_cameras * 12 floats");
954
+ }
955
+ self.set_cameras_device(buffer.slice_pointer(index), stream);
956
+ }, nb::arg("buffer"), nb::arg("index"), nb::arg("stream") = 0)
957
+ .def("set_motion_blur_cameras_device", [](Renderer& self, nb::ndarray<const float, nb::c_contig, nb::device::cuda> cameras_open, nb::ndarray<const float, nb::c_contig, nb::device::cuda> cameras_close, uintptr_t stream){
958
+ int64_t dims[3] = {0, 0, 0};
959
+ for(size_t dimension = 0; dimension < cameras_open.ndim() && dimension < 3; dimension++){
960
+ dims[dimension] = (int64_t)cameras_open.shape(dimension);
961
+ }
962
+ self.check_cameras_dims(cameras_open.ndim(), dims);
963
+ for(size_t dimension = 0; dimension < cameras_close.ndim() && dimension < 3; dimension++){
964
+ dims[dimension] = (int64_t)cameras_close.shape(dimension);
965
+ }
966
+ self.check_cameras_dims(cameras_close.ndim(), dims);
967
+ self.set_motion_blur_cameras_device(cameras_open.data(), cameras_close.data(), stream);
968
+ }, nb::arg("cameras_open"), nb::arg("cameras_close"), nb::arg("stream") = 0);
969
+ #endif
970
+ }