You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(nlist): move nprocs into InputNlist constructors
Replaces the ``set_nprocs(comm->nprocs)`` setter with a constructor
parameter on both ``InputNlist`` overloads (lightweight and comm-aware)
and the matching ``DP_NewNlist`` / ``DP_NewNlist_comm`` C entry points
plus the hpp wrappers. ``nprocs`` is a conceptual sibling of ``world``
and ``nswap`` and lives more naturally in the initializer than as a
post-construction setter. Default value 1 keeps direct C++ API
consumers source-compatible — they need not pass anything.
- ``InputNlist`` lightweight ctor: new trailing ``int nprocs_ = 1``.
- ``InputNlist`` comm-aware ctor: new trailing ``int nprocs_ = 1``.
- ``DP_NewNlist`` / ``DP_NewNlist_comm``: new trailing ``int nprocs``
arg (no default — C API).
- ``deepmd::hpp::InputNlist`` ctors: new trailing ``int nprocs = 1``.
- ``DP_NlistSetNprocs`` / ``set_nprocs`` removed (single-use in-tree).
- ``pair_deepmd.cpp``, ``pair_deepspin.cpp``, ``fix_dplr.cpp`` now pass
``comm->nprocs`` directly in the constructor call.
- Update stale comments in ``DeepPotPTExpt.cc`` and ``DeepSpinPTExpt.cc``
to reference the constructor parameter instead of the removed setter.
0 commit comments