Problem
For multi-threaded direct-collocation OCPs, continuity penalties may build repeated ThreadMap wrappers during penalty preparation even though threaded dispatch consumes the representative mapped function only.
Proposed change
For multi-threaded STATE_CONTINUITY penalties whose node range begins at zero, construct the mapped function and mapped weighted function only for the representative node. Keep the regular per-node non-threaded functions and preserve current behavior for other penalty types.
Acceptance criteria
- unchanged objective, constraints, Jacobian and Hessian on a collocation OCP;
- unchanged IPOPT trajectory;
- regression test that redundant wrappers are not created;
- no persistent cache, avoiding graph invalidation risks.
A downstream minimal fix and tests are being prepared for a future pull request.
Problem
For multi-threaded direct-collocation OCPs, continuity penalties may build repeated ThreadMap wrappers during penalty preparation even though threaded dispatch consumes the representative mapped function only.
Proposed change
For multi-threaded STATE_CONTINUITY penalties whose node range begins at zero, construct the mapped function and mapped weighted function only for the representative node. Keep the regular per-node non-threaded functions and preserve current behavior for other penalty types.
Acceptance criteria
A downstream minimal fix and tests are being prepared for a future pull request.