diffneusim 1.0.0__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.
- diffneusim/__init__.py +1 -0
- diffneusim/_cache.py +42 -0
- diffneusim/_paths.py +5 -0
- diffneusim/bindings/rew14_ext.cu +115 -0
- diffneusim/bindings/soft14_capi.cpp +443 -0
- diffneusim/bindings/soft14_engine_ext.cu +596 -0
- diffneusim/bindings/soft_capi.cpp +782 -0
- diffneusim/bindings/soft_engine_ext.cu +495 -0
- diffneusim/core/cpu_engine/build.sh +40 -0
- diffneusim/core/cpu_engine/fiber/cuda_runtime.h +445 -0
- diffneusim/core/cpu_engine/x14_cpu.cpp +283 -0
- diffneusim/core/diff/dual.h +126 -0
- diffneusim/core/include/diffneusim/macros.h +35 -0
- diffneusim/core/kin/kinematic_tree.h +273 -0
- diffneusim/core/math/so3.h +182 -0
- diffneusim/core/soft/adj/out_adj.h +102 -0
- diffneusim/core/soft/adj/rnea_adj.h +425 -0
- diffneusim/core/soft/adj/rows_adj.h +439 -0
- diffneusim/core/soft/adj/rows_functor.h +89 -0
- diffneusim/core/soft/adj/rows_lanes.h +443 -0
- diffneusim/core/soft/adj/shell_adj.h +243 -0
- diffneusim/core/soft/adj/tree_adj.h +356 -0
- diffneusim/core/soft/collide.h +183 -0
- diffneusim/core/soft/gpu/adj14.cuh +233 -0
- diffneusim/core/soft/gpu/adj14_mus.cuh +98 -0
- diffneusim/core/soft/gpu/adj_shell.cuh +50 -0
- diffneusim/core/soft/gpu/adj_tab.cuh +49 -0
- diffneusim/core/soft/gpu/body14.cuh +47 -0
- diffneusim/core/soft/gpu/chol_rn.cuh +458 -0
- diffneusim/core/soft/gpu/chol_small.cuh +123 -0
- diffneusim/core/soft/gpu/chol_split.cuh +193 -0
- diffneusim/core/soft/gpu/engine_launch.cuh +263 -0
- diffneusim/core/soft/gpu/fk_rn.cuh +109 -0
- diffneusim/core/soft/gpu/generated/body_019e20820f86_mmfloor.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_62f77a4bb16b_mmfloor.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor.cuh +25 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +25 -0
- diffneusim/core/soft/gpu/generated/g1_soft_5db44fd45286.cuh +74 -0
- diffneusim/core/soft/gpu/generated/split_62f77a4bb16b_mmfloor.cuh +18 -0
- diffneusim/core/soft/gpu/generated/split_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +18 -0
- diffneusim/core/soft/gpu/generated/x14_soft_019e20820f86_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_62f77a4bb16b_mmfloor.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/k_mus.cuh +1038 -0
- diffneusim/core/soft/gpu/k_mus_host.cuh +377 -0
- diffneusim/core/soft/gpu/k_pre.cuh +52 -0
- diffneusim/core/soft/gpu/kernel_p.cuh +490 -0
- diffneusim/core/soft/gpu/kp14.cuh +465 -0
- diffneusim/core/soft/gpu/l2v2.cuh +367 -0
- diffneusim/core/soft/gpu/l2x14.cuh +319 -0
- diffneusim/core/soft/gpu/l3.cuh +1483 -0
- diffneusim/core/soft/gpu/model_view.cuh +48 -0
- diffneusim/core/soft/gpu/mus_case_fits.h +15 -0
- diffneusim/core/soft/gpu/mus_classes.h +182 -0
- diffneusim/core/soft/gpu/mus_row_cf.h +44 -0
- diffneusim/core/soft/gpu/rew14.cuh +177 -0
- diffneusim/core/soft/gpu/rows_ctab.cuh +44 -0
- diffneusim/core/soft/gpu/tree_m.cuh +247 -0
- diffneusim/core/soft/gpu/x14_engine_kernels.cuh +260 -0
- diffneusim/core/soft/gpu/x14_rowcf.h +14 -0
- diffneusim/core/soft/hand.h +124 -0
- diffneusim/core/soft/impedance.h +115 -0
- diffneusim/core/soft/jvp.h +202 -0
- diffneusim/core/soft/kin.h +250 -0
- diffneusim/core/soft/muscle.h +1208 -0
- diffneusim/core/soft/newton.h +371 -0
- diffneusim/core/soft/rows.h +176 -0
- diffneusim/core/soft/step.h +188 -0
- diffneusim/core/soft/tape.h +313 -0
- diffneusim/core/soft/x14/collide14.h +69 -0
- diffneusim/core/soft/x14/jvp14.h +182 -0
- diffneusim/core/soft/x14/law14.h +453 -0
- diffneusim/core/soft/x14adj/collide14_adj.h +134 -0
- diffneusim/core/soft/x14adj/passive14_adj.h +162 -0
- diffneusim/core/soft/x14adj/reward14.h +484 -0
- diffneusim/core/soft/x14adj/rows14_adj.h +400 -0
- diffneusim/core/soft/x14adj/scan14.h +349 -0
- diffneusim/core/soft/x14adj/shell14_adj.h +122 -0
- diffneusim/core/soft/x14adj/sweep14.h +255 -0
- diffneusim/core/soft/x14adj/tree14_adj.h +500 -0
- diffneusim/core/soft/x14adj/x14adj_common.h +96 -0
- diffneusim/data/mirror/H1622v2k_geyer_hfdeq.npz +0 -0
- diffneusim/data/mirror/H1622v2k_hfd.npz +0 -0
- diffneusim/data/mirror/H1622v2k_millard_hfdeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_calf2_pe.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01legs.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01lumbar.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_hinge.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_compound_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_luispe.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_trunk0701.npz +0 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01legs.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01lumbar.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1a.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n2.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_rom23.json +91 -0
- diffneusim/data/reference/musclemimic/myofullbody_mimic_sites.json +261 -0
- diffneusim/data/reference/pose3/pose3_scone.json +305 -0
- diffneusim/data/reference/pose3/pose3_scone.txt +3 -0
- diffneusim/data/reference/pose3/pose3_scone_gait.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_mirror.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_stand.npz +0 -0
- diffneusim/data/reference/x016run/MD5SUMS +241 -0
- diffneusim/data/reference/x016run/x016run_states.txt +240 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r3.npz +0 -0
- diffneusim/data/state_prior/lumbar_poly_fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/engine/__init__.py +0 -0
- diffneusim/engine/build_tag.py +52 -0
- diffneusim/engine/case_tables.py +46 -0
- diffneusim/engine/d16_body.py +80 -0
- diffneusim/engine/engine14.py +367 -0
- diffneusim/engine/gen_split.py +159 -0
- diffneusim/engine/hand_format.py +69 -0
- diffneusim/engine/live14.py +149 -0
- diffneusim/engine/phase_b_tree.py +137 -0
- diffneusim/engine/soft14.py +130 -0
- diffneusim/engine/soft_capi.py +373 -0
- diffneusim/engine/soft_engine.py +165 -0
- diffneusim/engine/step14.py +132 -0
- diffneusim/engine/tape_format.py +89 -0
- diffneusim/engine/x14cpu.py +163 -0
- diffneusim/env/__init__.py +0 -0
- diffneusim/env/absent.py +20 -0
- diffneusim/env/cpu14.py +105 -0
- diffneusim/env/e0loop14.py +224 -0
- diffneusim/env/env14.py +568 -0
- diffneusim/env/kin_contact14.py +193 -0
- diffneusim/env/mimic_sites_x14.json +366 -0
- diffneusim/env/old_count.py +78 -0
- diffneusim/env/rew14.py +114 -0
- diffneusim/env/rew14_hook.py +105 -0
- diffneusim/g1/__init__.py +1 -0
- diffneusim/g1/arm_a2.py +165 -0
- diffneusim/g1/arm_a3.py +576 -0
- diffneusim/g1/read_a3.py +79 -0
- diffneusim/g1/rg1_read.py +89 -0
- diffneusim/model/__init__.py +66 -0
- diffneusim/model/case.py +17 -0
- diffneusim/model/dnmodel.py +79 -0
- diffneusim/model/fuse_fixed.py +281 -0
- diffneusim/model/monitor.py +834 -0
- diffneusim/models/BODIES.toml +48 -0
- diffneusim/models/MANIFEST.toml +979 -0
- diffneusim/models/cases/G290/case.bin +0 -0
- diffneusim/models/cases/G290/case.json +1 -0
- diffneusim/models/cases/G356-SRC/case.bin +0 -0
- diffneusim/models/cases/G356-SRC/case.json +1 -0
- diffneusim/models/cases/G416/case.bin +0 -0
- diffneusim/models/cases/G416/case.json +1 -0
- diffneusim/models/cases/M290C-SRC/case.bin +0 -0
- diffneusim/models/cases/M290C-SRC/case.json +1 -0
- diffneusim/models/cases/M290R-SRC/case.bin +0 -0
- diffneusim/models/cases/M290R-SRC/case.json +1 -0
- diffneusim/models/cases/M356C-SRC/case.bin +0 -0
- diffneusim/models/cases/M356C-SRC/case.json +1 -0
- diffneusim/models/cases/M356R-SRC/case.bin +0 -0
- diffneusim/models/cases/M356R-SRC/case.json +1 -0
- diffneusim/models/cases/M416C-SRC/case.bin +0 -0
- diffneusim/models/cases/M416C-SRC/case.json +1 -0
- diffneusim/models/derived/d16_expanded_62f77a4bb16b1e67_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_expanded_a1e8b196b2cd7b3c_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_soft_law_019e20820f8633b9_mmfloor.json +7844 -0
- diffneusim/models/derived/d16_soft_law_62f77a4bb16b1e67_mmfloor.json +16855 -0
- diffneusim/models/derived/d16_soft_law_77dbb7213f26e821_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsd05_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsdef_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsmjd_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_a1e8b196b2cd7b3c_mmfloor_rampsb3l_n6t12.json +16894 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor.json +12655 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor_rampsb3l_n6t12.json +12700 -0
- diffneusim/models/derived/unitree_g1_soft_law.json +15580 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +28913 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +29202 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +46970 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +38570 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +38923 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_meshes/1mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2distph.stl +0 -0
- diffneusim/models/fullbody_meshes/2mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2midph.stl +0 -0
- diffneusim/models/fullbody_meshes/2proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/3distph.stl +0 -0
- diffneusim/models/fullbody_meshes/3mc.stl +0 -0
- diffneusim/models/fullbody_meshes/3midph.stl +0 -0
- diffneusim/models/fullbody_meshes/3proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/4distph.stl +0 -0
- diffneusim/models/fullbody_meshes/4mc.stl +0 -0
- diffneusim/models/fullbody_meshes/4midph.stl +0 -0
- diffneusim/models/fullbody_meshes/4proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/5distph.stl +0 -0
- diffneusim/models/fullbody_meshes/5mc.stl +0 -0
- diffneusim/models/fullbody_meshes/5midph.stl +0 -0
- diffneusim/models/fullbody_meshes/5proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/NOTICE +2 -0
- diffneusim/models/fullbody_meshes/capitate.stl +0 -0
- diffneusim/models/fullbody_meshes/clavicle.stl +0 -0
- diffneusim/models/fullbody_meshes/hamate.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_cervical.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_jaw.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_skull.stl +0 -0
- diffneusim/models/fullbody_meshes/humerus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/l_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/l_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/l_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/l_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar1.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar2.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar3.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar4.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar5.stl +0 -0
- diffneusim/models/fullbody_meshes/lunate.stl +0 -0
- diffneusim/models/fullbody_meshes/pisiform.stl +0 -0
- diffneusim/models/fullbody_meshes/r_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/r_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/r_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/r_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/r_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/r_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/radius.stl +0 -0
- diffneusim/models/fullbody_meshes/sacrum.stl +0 -0
- diffneusim/models/fullbody_meshes/scaphoid.stl +0 -0
- diffneusim/models/fullbody_meshes/scapula.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic10_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic11_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic12_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic1_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic2_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic3_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic4_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic5_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic6_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic7_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic8_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic9_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thorax.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbdist.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbprox.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezium.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezoid.stl +0 -0
- diffneusim/models/fullbody_meshes/triquetrum.stl +0 -0
- diffneusim/models/fullbody_meshes/ulna.stl +0 -0
- diffneusim/models/source/myo_fullbody/UPSTREAM.md +91 -0
- diffneusim/models/source/myoleg/UPSTREAM.md +52 -0
- diffneusim/models/source/unitree_g1/LICENSE.mjlab +202 -0
- diffneusim/models/source/unitree_g1/UPSTREAM.md +38 -0
- diffneusim/models/source/unitree_g1/assets/head_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/logo_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis_contour_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/torso_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_roll_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_yaw_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/dump_mjlab_reference.py +30 -0
- diffneusim/models/source/unitree_g1/g1.xml +308 -0
- diffneusim/models/source/unitree_g1/g1_constants.py +298 -0
- diffneusim/models/source/unitree_g1/mjlab_compiled_reference.json +857 -0
- diffneusim/models/unitree_g1.dnmodel +4393 -0
- diffneusim/models/unitree_g1_selfcol.dnmodel +20824 -0
- diffneusim/rl/__init__.py +2 -0
- diffneusim/rl/dynsyn_layer.py +146 -0
- diffneusim/rl/footstep_plan.py +337 -0
- diffneusim/rl/g1_bm_env.py +572 -0
- diffneusim/rl/g1_bm_eval.py +168 -0
- diffneusim/rl/g1_bm_fused.py +275 -0
- diffneusim/rl/g1_bm_ppo.py +622 -0
- diffneusim/rl/g1_bm_sapo.py +551 -0
- diffneusim/rl/g1_ppo.py +395 -0
- diffneusim/rl/g1_sapo_soft.py +240 -0
- diffneusim/rl/g1_soft_env.py +452 -0
- diffneusim/rl/g1_soft_grad.py +145 -0
- diffneusim/rl/geyer_curves_torch.py +108 -0
- diffneusim/rl/gpu_fullbody_vec_env.py +1241 -0
- diffneusim/rl/imitation.py +2027 -0
- diffneusim/rl/imitation_reward_v2.py +248 -0
- diffneusim/rl/imitation_reward_v3.py +349 -0
- diffneusim/rl/latent_task.py +175 -0
- diffneusim/rl/llc_reward.py +316 -0
- diffneusim/rl/millard_curves_torch.py +154 -0
- diffneusim/rl/mirror_symmetry.py +212 -0
- diffneusim/rl/model_path.py +35 -0
- diffneusim/rl/mvae_recon.py +123 -0
- diffneusim/rl/nets_shac.py +599 -0
- diffneusim/rl/reset_pool.py +154 -0
- diffneusim/rl/sapo_capture.py +873 -0
- diffneusim/rl/sapo_vec.py +1051 -0
- diffneusim/rl/shac_vec.py +346 -0
- diffneusim/rl/state_prior.py +151 -0
- diffneusim/rl/step_library.py +105 -0
- diffneusim/rl/task_walk_env.py +1793 -0
- diffneusim/rl/task_walk_reward.py +3300 -0
- diffneusim/run.py +23 -0
- diffneusim/run_env.py +46 -0
- diffneusim/tasks/__init__.py +147 -0
- diffneusim/tasks/legacy_names.py +63 -0
- diffneusim/tasks/paths.py +79 -0
- diffneusim/tasks/settings.py +202 -0
- diffneusim/third_party/instantmimic_947430ee/LICENSE +202 -0
- diffneusim/third_party/instantmimic_947430ee/NOTICE +19 -0
- diffneusim/third_party/instantmimic_947430ee/README.md +31 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/benchmark_protocol.py +106 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/metrics.py +214 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/reference.py +513 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/motion/quaternion.py +193 -0
- diffneusim/train/__init__.py +0 -0
- diffneusim/train/eval_ckpt.py +239 -0
- diffneusim/train/eval_mimic.py +133 -0
- diffneusim/train/gait_report.py +203 -0
- diffneusim/train/gcot_chain.py +51 -0
- diffneusim/train/levers.py +135 -0
- diffneusim/train/masked_reset.py +314 -0
- diffneusim/train/rl_algorithm_suite.py +917 -0
- diffneusim/train/train14.py +240 -0
- diffneusim/train/train_tw14.py +674 -0
- diffneusim/viz/__init__.py +5 -0
- diffneusim/viz/__main__.py +41 -0
- diffneusim/viz/camera.py +115 -0
- diffneusim/viz/dnrec.py +118 -0
- diffneusim/viz/dnrec_io.py +686 -0
- diffneusim/viz/hud.py +565 -0
- diffneusim/viz/meshes.py +458 -0
- diffneusim/viz/play.py +237 -0
- diffneusim/viz/record.py +74 -0
- diffneusim/viz/render.py +1402 -0
- diffneusim/viz/renderer.py +268 -0
- diffneusim/viz/rl_env_render.py +635 -0
- diffneusim/viz/snapshot.py +54 -0
- diffneusim/viz/strobe.py +124 -0
- diffneusim/viz/to_mp4.py +58 -0
- diffneusim/viz/ui.py +481 -0
- diffneusim/viz/viewer.py +2086 -0
- diffneusim-1.0.0.dist-info/METADATA +226 -0
- diffneusim-1.0.0.dist-info/RECORD +682 -0
- diffneusim-1.0.0.dist-info/WHEEL +5 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSE +201 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-ARMS-hand-wrist-4.3.txt +20 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-MoBL-ARMS.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/CC-BY-3.0-OpenSim-geometry.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Christophy2012-lumbarspine.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lai2017-model-high-flex.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lee2015-hand_muscle.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Rajagopal2016-full_body.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Uhlrich2022-fbmodpassivecal.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/NOTICE +274 -0
- diffneusim-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 14x adjoint, lever 1's tree scans (engine C, 2026-11-03; tools/d16_x14adj/PLAN.md "Lever 1"), shared with the kernel P:
|
|
3
|
+
// the in-place Hillis-Steele prefix sums over the 14x tree's bodies 2..65 (the root, body 1, the base) and their transpose, the
|
|
4
|
+
// subtree sums by gathering from the 2^r-th descendants. Both run kNR rounds on 2 slots per lane (b = 2 + lane + 32 s; the host
|
|
5
|
+
// builds 64 in order, the same per-element arithmetic), with the per-lane tables in registers, loaded from coalesced __device__
|
|
6
|
+
// globals the launcher fills once (t14_anc_table, t14_desc_table); a lane-divergent __constant__ table serializes.
|
|
7
|
+
// Measured (scan_round_bench.cu, 4 worlds per SM): 378 cycles per scan round (9 / 13 / 3 words), 524 per gather round; at 8 per
|
|
8
|
+
// SM 716 / 857.
|
|
9
|
+
#include "x14adj_common.h"
|
|
10
|
+
#if defined(D16_NV_GT64)
|
|
11
|
+
#include <cstdio>
|
|
12
|
+
#include <cstdlib>
|
|
13
|
+
// X14ADJ_PLANT 61 (the gates' planted-bug build only): the gather and the children's add read one descendant word, so a wrist's fifth child is dropped
|
|
14
|
+
#ifndef X14ADJ_PLANT
|
|
15
|
+
#define X14ADJ_PLANT 0
|
|
16
|
+
#endif
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
namespace d16::x14adj {
|
|
20
|
+
|
|
21
|
+
#if defined(D16_NV_LE32) // a body with at most 32 scan bodies: one slot, part-filled, and the rounds its depth needs
|
|
22
|
+
#define X14_NSD 1
|
|
23
|
+
constexpr int nr_of_depth(int nlev) { int r = 0; while ((1 << r) <= nlev) ++r; return r; }
|
|
24
|
+
constexpr int kNR = nr_of_depth(NLEV), kNScan = NB - 2;
|
|
25
|
+
static_assert(kNScan <= 32 && (1 << kNR) > NLEV, "the scan's slot and rounds cover this tree");
|
|
26
|
+
#elif defined(D16_NV_GT64) // a phase B body (B3d; tools/d16_bodies/PHASE_B.md section 3, item 4): 4 slots, the last part-filled (the 416: 104 scan bodies, depth 38)
|
|
27
|
+
#define X14_NSD 4
|
|
28
|
+
constexpr int kNR = 6, kNScan = NB - 2;
|
|
29
|
+
static_assert(kNScan > 32 * (X14_NSD - 1) && kNScan <= 32 * X14_NSD && (1 << kNR) > NLEV, "the scan's 4 slots and 6 rounds cover this tree");
|
|
30
|
+
// the gather's descendants: up to MD::FANIN per (round, body), 4 to a word (body ids < 128, -1 bytes past the last), in global memory read through __ldg
|
|
31
|
+
// (lane-divergent __constant__ reads serialize; the 14x's 2 per lane fit one register word, these do not)
|
|
32
|
+
constexpr int kDW = (MD::FANIN + 3) / 4;
|
|
33
|
+
static_assert(NB <= 128, "a descendant is one signed byte");
|
|
34
|
+
#else
|
|
35
|
+
#define X14_NSD 2
|
|
36
|
+
constexpr int kNR = 6, kNScan = NB - 2;
|
|
37
|
+
static_assert(kNScan == 64 && (1 << kNR) > NLEV, "the scan's slots and rounds cover the 14x tree");
|
|
38
|
+
#endif
|
|
39
|
+
#if defined(__CUDA_ARCH__)
|
|
40
|
+
constexpr int kNS = X14_NSD;
|
|
41
|
+
#else
|
|
42
|
+
constexpr int kNS = kNScan;
|
|
43
|
+
#endif
|
|
44
|
+
#if defined(__CUDACC__)
|
|
45
|
+
static __device__ int gAnc14[kNR][X14_NSD][32];
|
|
46
|
+
#endif
|
|
47
|
+
// the 2^r-th ancestor of b (the root counts, the world does not); -1 past the root
|
|
48
|
+
inline int t14_anc_host(int r, int b) {
|
|
49
|
+
int x = b;
|
|
50
|
+
for (int k = 0; k < (1 << r) && x >= 1; ++k) x = x >= 2 ? MD::kParent[x] : -1;
|
|
51
|
+
return x >= 1 ? x : -1;
|
|
52
|
+
}
|
|
53
|
+
// the launcher's table: [kNR][2][32], slot s of lane l is body 2 + l + 32 s (past the last body: -1)
|
|
54
|
+
inline void t14_anc_table(int* out) {
|
|
55
|
+
for (int r = 0; r < kNR; ++r)
|
|
56
|
+
for (int sl = 0; sl < X14_NSD; ++sl)
|
|
57
|
+
#if defined(D16_NV_LE32) || defined(D16_NV_GT64)
|
|
58
|
+
for (int l = 0; l < 32; ++l) out[(r * X14_NSD + sl) * 32 + l] = 2 + l + 32 * sl < NB ? t14_anc_host(r, 2 + l + 32 * sl) : -1;
|
|
59
|
+
#else
|
|
60
|
+
for (int l = 0; l < 32; ++l) out[(r * X14_NSD + sl) * 32 + l] = t14_anc_host(r, 2 + l + 32 * sl);
|
|
61
|
+
#endif
|
|
62
|
+
}
|
|
63
|
+
template <class T> DN_HOST_DEVICE inline void t14_anc_load(int (&A)[kNR][kNS], int lane) {
|
|
64
|
+
(void)lane;
|
|
65
|
+
#if defined(__CUDA_ARCH__)
|
|
66
|
+
#pragma unroll
|
|
67
|
+
for (int r = 0; r < kNR; ++r)
|
|
68
|
+
#pragma unroll
|
|
69
|
+
for (int sl = 0; sl < X14_NSD; ++sl) A[r][sl] = gAnc14[r][sl][lane];
|
|
70
|
+
#else
|
|
71
|
+
for (int r = 0; r < kNR; ++r)
|
|
72
|
+
for (int sl = 0; sl < kNS; ++sl) A[r][sl] = t14_anc_host(r, 2 + sl);
|
|
73
|
+
#endif
|
|
74
|
+
}
|
|
75
|
+
#if defined(__CUDA_ARCH__) && defined(D16_NV_LE32) // the lanes past the last body sit out
|
|
76
|
+
#define X14_SLOTS(sl, b) for (int sl = 0, b = 2 + lane; sl < kNS && b < NB; ++sl, b += 32)
|
|
77
|
+
#elif defined(__CUDA_ARCH__) && defined(D16_NV_GT64) // unrolled over the 4 slots (the per-slot arrays stay in registers), the lanes past the last body sit out
|
|
78
|
+
#define X14_SLOTS(sl, b) _Pragma("unroll") for (int sl = 0, b = 2 + lane; sl < kNS; ++sl, b += 32) if (b < NB)
|
|
79
|
+
#elif defined(__CUDA_ARCH__)
|
|
80
|
+
#define X14_SLOTS(sl, b) _Pragma("unroll") for (int sl = 0, b = 2 + lane; sl < kNS; ++sl, b += 32)
|
|
81
|
+
#else
|
|
82
|
+
#define X14_SLOTS(sl, b) for (int sl = 0, b = 2; sl < kNS; ++sl, ++b)
|
|
83
|
+
#endif
|
|
84
|
+
template <class T, int NC>
|
|
85
|
+
DN_HOST_DEVICE inline void t14_scan(T (*const (&x)[NC])[3], const int (&A)[kNR][kNS], int lane) {
|
|
86
|
+
(void)lane;
|
|
87
|
+
#if defined(__CUDA_ARCH__)
|
|
88
|
+
#pragma unroll
|
|
89
|
+
#endif
|
|
90
|
+
for (int r = 0; r < kNR; ++r) {
|
|
91
|
+
T t[kNS][3 * NC];
|
|
92
|
+
X14_SLOTS(sl, b) {
|
|
93
|
+
(void)b;
|
|
94
|
+
const int a = A[r][sl];
|
|
95
|
+
for (int c = 0; c < NC; ++c)
|
|
96
|
+
for (int k = 0; k < 3; ++k) t[sl][3 * c + k] = a >= 0 ? x[c][a][k] : T(0);
|
|
97
|
+
}
|
|
98
|
+
X14_SYNC();
|
|
99
|
+
X14_SLOTS(sl, b) {
|
|
100
|
+
if (A[r][sl] >= 0)
|
|
101
|
+
for (int c = 0; c < NC; ++c)
|
|
102
|
+
for (int k = 0; k < 3; ++k) x[c][b][k] = x[c][b][k] + t[sl][3 * c + k];
|
|
103
|
+
}
|
|
104
|
+
X14_SYNC();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
#if defined(__CUDACC__)
|
|
109
|
+
static __device__ int gDesc14[kNR][X14_NSD][32];
|
|
110
|
+
static __device__ int gKid14[4];
|
|
111
|
+
#endif
|
|
112
|
+
inline int t14_desc_host(int r, int b, int j) { // the j-th c in 2..65 (body order) whose 2^r-th ancestor is b
|
|
113
|
+
int n = 0;
|
|
114
|
+
for (int c = 2; c < NB; ++c)
|
|
115
|
+
if (t14_anc_host(r, c) == b) { if (n == j) return c; ++n; }
|
|
116
|
+
return -1;
|
|
117
|
+
}
|
|
118
|
+
inline int t14_desc_pack(int r, int b) {
|
|
119
|
+
unsigned pk = 0xFFFFFFFFu;
|
|
120
|
+
for (int j = 0; j < 2; ++j) {
|
|
121
|
+
const int c = t14_desc_host(r, b, j);
|
|
122
|
+
if (c >= 0) pk = (pk & ~(0xFFu << (8 * j))) | (static_cast<unsigned>(c) << (8 * j));
|
|
123
|
+
}
|
|
124
|
+
return static_cast<int>(pk);
|
|
125
|
+
}
|
|
126
|
+
inline int t14_kid1_host(int j) { // the root's children in body order
|
|
127
|
+
int n = 0;
|
|
128
|
+
for (int c = 2; c < NB; ++c)
|
|
129
|
+
if (MD::kParent[c] == 1) { if (n == j) return c; ++n; }
|
|
130
|
+
return -1;
|
|
131
|
+
}
|
|
132
|
+
#if !defined(D16_NV_GT64) // (a phase B body's launcher calls t14_upload_tables below; a caller of the 2-per-lane table stops at compile time)
|
|
133
|
+
// the launcher's tables: [kNR][2][32] packed descendants (fan-in asserted <= 2), the root's children [4]
|
|
134
|
+
inline void t14_desc_table(int* out, int* kids) {
|
|
135
|
+
for (int r = 0; r < kNR; ++r)
|
|
136
|
+
for (int sl = 0; sl < X14_NSD; ++sl)
|
|
137
|
+
for (int l = 0; l < 32; ++l) {
|
|
138
|
+
const int b = 2 + l + 32 * sl;
|
|
139
|
+
assert(t14_desc_host(r, b, 2) < 0 && "tree14: the gather's fan-in over 2..65 exceeds 2");
|
|
140
|
+
out[(r * X14_NSD + sl) * 32 + l] = t14_desc_pack(r, b);
|
|
141
|
+
}
|
|
142
|
+
assert(t14_kid1_host(4) < 0 && "tree14: the root has more than 4 children");
|
|
143
|
+
for (int j = 0; j < 4; ++j) kids[j] = t14_kid1_host(j);
|
|
144
|
+
}
|
|
145
|
+
#endif
|
|
146
|
+
#if defined(D16_NV_GT64)
|
|
147
|
+
// a check that holds under -DNDEBUG (the tables decide what the gather reads, with no other error)
|
|
148
|
+
inline void t14_need(bool ok, const char* what) {
|
|
149
|
+
if (!ok) { std::fprintf(stderr, "scan14: %s\n", what); std::abort(); }
|
|
150
|
+
}
|
|
151
|
+
// word jw of the descendants of b in round r: entries 4 jw .. 4 jw + 3 in body order, a byte each, 0xFF past the last
|
|
152
|
+
inline int t14_desc_word_host(int r, int b, int jw) {
|
|
153
|
+
unsigned pk = 0xFFFFFFFFu;
|
|
154
|
+
for (int jj = 0; jj < 4; ++jj) {
|
|
155
|
+
const int c = t14_desc_host(r, b, 4 * jw + jj);
|
|
156
|
+
if (c >= 0) pk = (pk & ~(0xFFu << (8 * jj))) | (static_cast<unsigned>(c) << (8 * jj));
|
|
157
|
+
}
|
|
158
|
+
return static_cast<int>(pk);
|
|
159
|
+
}
|
|
160
|
+
// the host's table, slot sl = body 2 + sl, built once (t14_desc_host is a scan over the bodies), with the fan-in checked against MD::FANIN
|
|
161
|
+
struct T14DescHost {
|
|
162
|
+
int w[kNR][kNScan][kDW];
|
|
163
|
+
T14DescHost() {
|
|
164
|
+
for (int r = 0; r < kNR; ++r)
|
|
165
|
+
for (int sl = 0; sl < kNScan; ++sl) {
|
|
166
|
+
t14_need(t14_desc_host(r, 2 + sl, MD::FANIN) < 0, "a body's descendants in one round exceed the header's FANIN");
|
|
167
|
+
for (int jw = 0; jw < kDW; ++jw) w[r][sl][jw] = t14_desc_word_host(r, 2 + sl, jw);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
inline const T14DescHost& t14_desc_host_tab() {
|
|
172
|
+
static const T14DescHost t;
|
|
173
|
+
return t;
|
|
174
|
+
}
|
|
175
|
+
#if defined(__CUDACC__)
|
|
176
|
+
static __device__ int gDescB14[kNR][X14_NSD][kDW][32];
|
|
177
|
+
// the launcher's tables for a phase B body, this translation unit's copies (before any capture): the ancestors, the descendant words, the root's children
|
|
178
|
+
static inline void t14_upload_tables() {
|
|
179
|
+
static int anc[kNR * X14_NSD * 32], desc[kNR][X14_NSD][kDW][32], kids[4];
|
|
180
|
+
t14_anc_table(anc);
|
|
181
|
+
const T14DescHost& H = t14_desc_host_tab();
|
|
182
|
+
for (int r = 0; r < kNR; ++r)
|
|
183
|
+
for (int sl = 0; sl < X14_NSD; ++sl)
|
|
184
|
+
for (int jw = 0; jw < kDW; ++jw)
|
|
185
|
+
for (int l = 0; l < 32; ++l) {
|
|
186
|
+
const int b = 2 + l + 32 * sl;
|
|
187
|
+
desc[r][sl][jw][l] = b < NB ? H.w[r][b - 2][jw] : -1;
|
|
188
|
+
}
|
|
189
|
+
t14_need(t14_kid1_host(4) < 0, "the root has more than 4 children");
|
|
190
|
+
for (int j = 0; j < 4; ++j) kids[j] = t14_kid1_host(j);
|
|
191
|
+
t14_need(cudaMemcpyToSymbol(gAnc14, anc, sizeof(anc)) == cudaSuccess, "the ancestor table");
|
|
192
|
+
t14_need(cudaMemcpyToSymbol(gDescB14, desc, sizeof(desc)) == cudaSuccess, "the descendant words");
|
|
193
|
+
t14_need(cudaMemcpyToSymbol(gKid14, kids, sizeof(kids)) == cudaSuccess, "the root's children");
|
|
194
|
+
}
|
|
195
|
+
#endif
|
|
196
|
+
#endif
|
|
197
|
+
template <class T> DN_HOST_DEVICE inline void t14_desc_load(int (&D)[kNR][kNS], int lane) {
|
|
198
|
+
(void)lane;
|
|
199
|
+
#if defined(D16_NV_GT64) // the gather reads the descendant words itself (t14_desc_word); D is not read
|
|
200
|
+
for (int r = 0; r < kNR; ++r)
|
|
201
|
+
for (int sl = 0; sl < kNS; ++sl) D[r][sl] = 0;
|
|
202
|
+
#elif defined(__CUDA_ARCH__)
|
|
203
|
+
#pragma unroll
|
|
204
|
+
for (int r = 0; r < kNR; ++r)
|
|
205
|
+
#pragma unroll
|
|
206
|
+
for (int sl = 0; sl < X14_NSD; ++sl) D[r][sl] = gDesc14[r][sl][lane];
|
|
207
|
+
#else
|
|
208
|
+
for (int r = 0; r < kNR; ++r)
|
|
209
|
+
for (int sl = 0; sl < kNS; ++sl) D[r][sl] = t14_desc_pack(r, 2 + sl);
|
|
210
|
+
#endif
|
|
211
|
+
}
|
|
212
|
+
DN_HOST_DEVICE inline int t14_dj(int pk, int j) { return static_cast<signed char>((pk >> (8 * j)) & 0xFF); }
|
|
213
|
+
DN_HOST_DEVICE inline int t14_kid1(int j) {
|
|
214
|
+
#if defined(__CUDA_ARCH__)
|
|
215
|
+
return gKid14[j];
|
|
216
|
+
#else
|
|
217
|
+
return t14_kid1_host(j);
|
|
218
|
+
#endif
|
|
219
|
+
}
|
|
220
|
+
#if defined(D16_NV_GT64)
|
|
221
|
+
// word jw of slot sl's descendants in round r (the device: slot sl of this lane is body 2 + lane + 32 sl; the host: body 2 + sl)
|
|
222
|
+
DN_HOST_DEVICE inline int t14_desc_word(int r, int sl, int jw, int lane) {
|
|
223
|
+
#if defined(__CUDA_ARCH__)
|
|
224
|
+
return __ldg(&gDescB14[r][sl][jw][lane]);
|
|
225
|
+
#else
|
|
226
|
+
(void)lane;
|
|
227
|
+
return t14_desc_host_tab().w[r][sl][jw];
|
|
228
|
+
#endif
|
|
229
|
+
}
|
|
230
|
+
// subtree sums over the scan bodies of the words o[w] .. o[w] + 2, in place: each body adds its 2^r-th descendants (up to FANR[r]; the words end at
|
|
231
|
+
// the first -1) in body order, the same order on the host and the device
|
|
232
|
+
template <class T, int NW, int KS>
|
|
233
|
+
DN_HOST_DEVICE inline void t14_gather(T (*acc)[KS], const int (&o)[NW], const int (&D)[kNR][kNS], int lane) {
|
|
234
|
+
(void)lane; (void)D;
|
|
235
|
+
#if defined(__CUDA_ARCH__)
|
|
236
|
+
#pragma unroll
|
|
237
|
+
#endif
|
|
238
|
+
for (int r = kNR - 1; r >= 0; --r) {
|
|
239
|
+
T t[kNS][3 * NW];
|
|
240
|
+
bool any[kNS];
|
|
241
|
+
X14_SLOTS(sl, b) {
|
|
242
|
+
(void)b;
|
|
243
|
+
for (int w = 0; w < 3 * NW; ++w) t[sl][w] = T(0);
|
|
244
|
+
any[sl] = false;
|
|
245
|
+
for (int jw = 0; jw < (X14ADJ_PLANT == 61 ? 1 : kDW); ++jw) {
|
|
246
|
+
const int pk = t14_desc_word(r, sl, jw, lane);
|
|
247
|
+
if (t14_dj(pk, 0) < 0) break;
|
|
248
|
+
any[sl] = true;
|
|
249
|
+
for (int jj = 0; jj < 4; ++jj) {
|
|
250
|
+
const int c = t14_dj(pk, jj);
|
|
251
|
+
if (c >= 0)
|
|
252
|
+
for (int w = 0; w < NW; ++w)
|
|
253
|
+
for (int k = 0; k < 3; ++k) t[sl][3 * w + k] = t[sl][3 * w + k] + acc[c][o[w] + k];
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
X14_SYNC();
|
|
258
|
+
X14_SLOTS(sl, b) {
|
|
259
|
+
if (any[sl])
|
|
260
|
+
for (int w = 0; w < NW; ++w)
|
|
261
|
+
for (int k = 0; k < 3; ++k) acc[b][o[w] + k] = acc[b][o[w] + k] + t[sl][3 * w + k];
|
|
262
|
+
}
|
|
263
|
+
X14_SYNC();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// the children's contributions tmp[c] into acc[p][o .. o + 2]: the scan bodies by the round-0 descendants (up to FANR[0]), the root on one lane
|
|
267
|
+
template <class T, int KS>
|
|
268
|
+
DN_HOST_DEVICE inline void t14_kids_add(T (*acc)[KS], int o, const T (*tmp)[3], const int (&D)[kNR][kNS], int lane) {
|
|
269
|
+
(void)lane; (void)D;
|
|
270
|
+
X14_SLOTS(sl, b) {
|
|
271
|
+
for (int jw = 0; jw < (X14ADJ_PLANT == 61 ? 1 : kDW); ++jw) {
|
|
272
|
+
const int pk = t14_desc_word(0, sl, jw, lane);
|
|
273
|
+
if (t14_dj(pk, 0) < 0) break;
|
|
274
|
+
for (int jj = 0; jj < 4; ++jj) {
|
|
275
|
+
const int c = t14_dj(pk, jj);
|
|
276
|
+
if (c >= 0)
|
|
277
|
+
for (int k = 0; k < 3; ++k) acc[b][o + k] = acc[b][o + k] + tmp[c][k];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
#if defined(__CUDA_ARCH__)
|
|
282
|
+
if (lane == 0)
|
|
283
|
+
#endif
|
|
284
|
+
for (int j = 0; j < 4; ++j) {
|
|
285
|
+
const int c = t14_kid1(j);
|
|
286
|
+
if (c >= 0)
|
|
287
|
+
for (int k = 0; k < 3; ++k) acc[1][o + k] = acc[1][o + k] + tmp[c][k];
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
#else
|
|
291
|
+
// subtree sums over 2..65 of the words o[w] .. o[w] + 2, in place
|
|
292
|
+
template <class T, int NW, int KS>
|
|
293
|
+
DN_HOST_DEVICE inline void t14_gather(T (*acc)[KS], const int (&o)[NW], const int (&D)[kNR][kNS], int lane) {
|
|
294
|
+
(void)lane;
|
|
295
|
+
#if defined(__CUDA_ARCH__)
|
|
296
|
+
#pragma unroll
|
|
297
|
+
#endif
|
|
298
|
+
for (int r = kNR - 1; r >= 0; --r) {
|
|
299
|
+
T t[kNS][3 * NW];
|
|
300
|
+
X14_SLOTS(sl, b) {
|
|
301
|
+
(void)b;
|
|
302
|
+
for (int w = 0; w < 3 * NW; ++w) t[sl][w] = T(0);
|
|
303
|
+
for (int j = 0; j < 2; ++j) {
|
|
304
|
+
const int c = t14_dj(D[r][sl], j);
|
|
305
|
+
if (c >= 0)
|
|
306
|
+
for (int w = 0; w < NW; ++w)
|
|
307
|
+
for (int k = 0; k < 3; ++k) t[sl][3 * w + k] = t[sl][3 * w + k] + acc[c][o[w] + k];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
X14_SYNC();
|
|
311
|
+
X14_SLOTS(sl, b) {
|
|
312
|
+
if (t14_dj(D[r][sl], 0) >= 0)
|
|
313
|
+
for (int w = 0; w < NW; ++w)
|
|
314
|
+
for (int k = 0; k < 3; ++k) acc[b][o[w] + k] = acc[b][o[w] + k] + t[sl][3 * w + k];
|
|
315
|
+
}
|
|
316
|
+
X14_SYNC();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// the children's contributions tmp[c] into acc[p][o .. o + 2]: bodies 2..65 by the round-0 descendants, the root on one lane
|
|
320
|
+
template <class T, int KS>
|
|
321
|
+
DN_HOST_DEVICE inline void t14_kids_add(T (*acc)[KS], int o, const T (*tmp)[3], const int (&D)[kNR][kNS], int lane) {
|
|
322
|
+
(void)lane;
|
|
323
|
+
X14_SLOTS(sl, b) {
|
|
324
|
+
for (int j = 0; j < 2; ++j) {
|
|
325
|
+
const int c = t14_dj(D[0][sl], j);
|
|
326
|
+
if (c >= 0)
|
|
327
|
+
for (int k = 0; k < 3; ++k) acc[b][o + k] = acc[b][o + k] + tmp[c][k];
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
#if defined(__CUDA_ARCH__)
|
|
331
|
+
if (lane == 0)
|
|
332
|
+
#endif
|
|
333
|
+
for (int j = 0; j < 4; ++j) {
|
|
334
|
+
const int c = t14_kid1(j);
|
|
335
|
+
if (c >= 0)
|
|
336
|
+
for (int k = 0; k < 3; ++k) acc[1][o + k] = acc[1][o + k] + tmp[c][k];
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
#endif
|
|
340
|
+
// the root's total of the words o .. o + 2: its own plus its children's subtree sums
|
|
341
|
+
template <class T, int KS> DN_HOST_DEVICE inline void t14_root_tot(const T (*acc)[KS], int o, T* out) {
|
|
342
|
+
for (int k = 0; k < 3; ++k) out[k] = acc[1][o + k];
|
|
343
|
+
for (int j = 0; j < 4; ++j) {
|
|
344
|
+
const int c = t14_kid1(j);
|
|
345
|
+
if (c >= 0)
|
|
346
|
+
for (int k = 0; k < 3; ++k) out[k] = out[k] + acc[c][o + k];
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
} // namespace d16::x14adj
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 14x adjoint, one substep's reverse (engine C, 2026-11-03; tools/d16_x14adj/PLAN.md "What is reversed, per substep"):
|
|
3
|
+
// Euler with explicit damping (MuscleMimic's integrator): v' = v + h a*, q' = integrate(q, v', h) (the root's translation and every
|
|
4
|
+
// hinge q' = q + h v'; the root's rotation and each ball's by mju_quatIntegrate, quat' = quat (x) Exp(h w'), body frame), with a*
|
|
5
|
+
// at the soft law's optimality condition R(q, v, tau; a*) = M a* + bias - passive - tau + sum_QUADRATIC J' D (J a* - aref) = 0.
|
|
6
|
+
// Given the cotangents of (q' in its tangent chart, v', a* as an output), returns those of (q in its tangent chart, v, tau):
|
|
7
|
+
// 1. positions: the rotations' q_bar <- Exp(phi) q'_bar and v'_bar += h Jr(phi)' q'_bar (d5's root step at each of the three
|
|
8
|
+
// quaternion charts), the rest v'_bar += h q'_bar;
|
|
9
|
+
// 2. velocities: v_bar = v'_bar, a*_bar = h v'_bar (+ the a* output's own cotangent);
|
|
10
|
+
// 3. the IFT: lam = H^-1 a*_bar with H = L_H L_H' (the record's factor at a*'s zones);
|
|
11
|
+
// 4. theta: (q, v)_bar -= d/d(q, v) [lam' (M a* + bias) + F_rows(lam)] (tree14 and rows14 run with -lam: both are linear in
|
|
12
|
+
// lam), (q, v)_bar += d/d(q, v) [lam' passive] (passive14), tau_bar = lam.
|
|
13
|
+
// The host build solves with L_H by substitution; the device build will use chol_rn's solve_fwd / solve_bwd (own Tag).
|
|
14
|
+
#include "x14adj_common.h"
|
|
15
|
+
#include "tree14_adj.h"
|
|
16
|
+
#include "rows14_adj.h"
|
|
17
|
+
#include "passive14_adj.h"
|
|
18
|
+
|
|
19
|
+
namespace d16::x14adj {
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template <class T> struct Shell14 {
|
|
23
|
+
Tree14<T> t;
|
|
24
|
+
Rows14<T> r;
|
|
25
|
+
T y[NV], lam[NV];
|
|
26
|
+
int flags;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// the rotation charts: (qpos address, dof address) of the free root's rotation and of each ball
|
|
30
|
+
template <class T> DN_HOST_DEVICE inline void s14_chart(int k, int* da) {
|
|
31
|
+
*da = k == 0 ? 3 : X14T(RomDadr)[k - 1];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 1. and 2.: qb (in: q'_bar, out: q_bar's chart part), vb (in: v'_bar, out: v_bar), ab (out: a*_bar = h v'_bar + ab_in)
|
|
35
|
+
template <class T>
|
|
36
|
+
DN_HOST_DEVICE inline void shell14_kinematics(const T* v, const T* a, T h, T* qb, T* vb, T* ab, const T* ab_in, int lane) {
|
|
37
|
+
(void)lane;
|
|
38
|
+
using std::sqrt; using std::sin; using std::cos;
|
|
39
|
+
// the hinges and the root's translation: q' = q + h v' (the rotation charts' dofs are handled below)
|
|
40
|
+
X14_FOR(d, NV) {
|
|
41
|
+
const bool rot = (d >= 3 && d < 6) || (d >= X14T(RomDadr)[0] && d < X14T(RomDadr)[0] + 3) ||
|
|
42
|
+
(d >= X14T(RomDadr)[1] && d < X14T(RomDadr)[1] + 3);
|
|
43
|
+
if (!rot) vb[d] = vb[d] + h * qb[d];
|
|
44
|
+
}
|
|
45
|
+
X14_FOR(k, 1 + MD::NROM) { // a lane per rotation chart: q' = q (x) Exp(phi), phi = h w', w' = v + h a* (body frame)
|
|
46
|
+
int da;
|
|
47
|
+
s14_chart<T>(k, &da);
|
|
48
|
+
T phi[3], t2 = T(0);
|
|
49
|
+
for (int i = 0; i < 3; ++i) { phi[i] = h * (v[da + i] + h * a[da + i]); t2 = t2 + phi[i] * phi[i]; }
|
|
50
|
+
const T th = sqrt(t2);
|
|
51
|
+
T c1, c2, d1, d2; // Exp = I + c1 K + c2 K^2 ; Jr = I - d1 K + d2 K^2 (K = [phi]x)
|
|
52
|
+
if (th < T(1e-8)) { c1 = T(1); c2 = T(0.5); d1 = T(0.5); d2 = T(1) / T(6); }
|
|
53
|
+
else {
|
|
54
|
+
const T sn = sin(th), cs = cos(th);
|
|
55
|
+
c1 = sn / th; c2 = (T(1) - cs) / t2; d1 = (T(1) - cs) / t2; d2 = (th - sn) / (t2 * th);
|
|
56
|
+
}
|
|
57
|
+
const T g[3] = {qb[da], qb[da + 1], qb[da + 2]};
|
|
58
|
+
T Kg[3], KKg[3];
|
|
59
|
+
crs(phi, g, Kg); crs(phi, Kg, KKg);
|
|
60
|
+
for (int i = 0; i < 3; ++i) {
|
|
61
|
+
qb[da + i] = (X14ADJ_PLANT == 41 && k > 0) ? g[i] : g[i] + c1 * Kg[i] + c2 * KKg[i]; // (41: planted, the balls' transport)
|
|
62
|
+
vb[da + i] = vb[da + i] + h * (g[i] + d1 * Kg[i] + d2 * KKg[i]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
X14_SYNC();
|
|
66
|
+
X14_FOR(d, NV) ab[d] = h * vb[d] + (ab_in ? ab_in[d] : T(0));
|
|
67
|
+
X14_SYNC();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 3. on the host: lam = (L L')^-1 ab with L packed lower (TRI, true diagonal)
|
|
71
|
+
template <class T> inline void shell14_solve_host(const T* L, const T* ab, T* y, T* lam) {
|
|
72
|
+
for (int i = 0; i < NV; ++i) {
|
|
73
|
+
T s = ab[i];
|
|
74
|
+
for (int j = 0; j < i; ++j) s = s - L[i * (i + 1) / 2 + j] * y[j];
|
|
75
|
+
y[i] = s / L[i * (i + 1) / 2 + i];
|
|
76
|
+
}
|
|
77
|
+
for (int i = NV - 1; i >= 0; --i) {
|
|
78
|
+
T s = y[i];
|
|
79
|
+
for (int j = i + 1; j < NV; ++j) s = s - L[j * (j + 1) / 2 + i] * lam[j];
|
|
80
|
+
lam[i] = s / L[i * (i + 1) / 2 + i];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 4. theta, given lam in s.lam: the tree, the rows and the passive terms into qb / vb; tau_bar = lam. The state (q, v, a*) and the
|
|
85
|
+
// decisions (the contacts, nlim from the record, the zones) are the substep's.
|
|
86
|
+
template <class T>
|
|
87
|
+
DN_HOST_DEVICE inline void shell14_theta(Shell14<T>& s, const T* V, const T* q, const T* v, const T* a, int ncon,
|
|
88
|
+
const D16_IDX_T* con_pair, const D16_IDX_T* con_slot, int nlim, const unsigned* zone, T* qb, T* vb,
|
|
89
|
+
T* taub, int lane, long long* prof = nullptr, const unsigned* limmask = nullptr) {
|
|
90
|
+
(void)lane; (void)prof;
|
|
91
|
+
X14_FOR(i, NQ) s.t.q[i] = q[i];
|
|
92
|
+
X14_FOR(i, NV) { s.t.v[i] = v[i]; s.t.a[i] = a[i]; s.t.lam[i] = -s.lam[i]; }
|
|
93
|
+
X14_SYNC();
|
|
94
|
+
X14_MARK(prof, 0);
|
|
95
|
+
tree14_down(s.t, V, lane);
|
|
96
|
+
X14_MARK(prof, 1);
|
|
97
|
+
tree14_local(s.t, V, true, lane);
|
|
98
|
+
X14_MARK(prof, 2);
|
|
99
|
+
rows14_vjp(s.t, s.r, V, ncon, con_pair, con_slot, nlim, zone, qb, vb, lane, limmask);
|
|
100
|
+
X14_MARK(prof, 3);
|
|
101
|
+
tree14_up(s.t, V, qb, vb, lane, prof);
|
|
102
|
+
X14_MARK(prof, 4);
|
|
103
|
+
// passive14_vjp across lanes (lever 3): the damping per dof, then the springs and the ball_roms on one lane each (disjoint
|
|
104
|
+
// dofs); per element the same operations in the same order as passive14_vjp's serial loops
|
|
105
|
+
X14_FOR(d, NV) vb[d] = vb[d] - V[MD::O_DAMP + d] * s.lam[d];
|
|
106
|
+
X14_SYNC();
|
|
107
|
+
X14_FOR(k, MD::NSPRING + MD::NROM) {
|
|
108
|
+
if (k < MD::NSPRING) {
|
|
109
|
+
const int d = X14T(SpDof)[k];
|
|
110
|
+
qb[d] = qb[d] - V[MD::O_SPRING + 2 * k] * s.lam[d];
|
|
111
|
+
} else {
|
|
112
|
+
ball_rom14_vjp<T>(V, k - MD::NSPRING, q, v, s.lam, qb, vb);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
X14_SYNC();
|
|
116
|
+
X14_MARK(prof, 5);
|
|
117
|
+
X14_FOR(d, NV) taub[d] = s.lam[d];
|
|
118
|
+
X14_SYNC();
|
|
119
|
+
s.flags = s.r.flags;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
} // namespace d16::x14adj
|