Commit 5cdc178
committed
Cache flat wrench-buffer view in _create_buffers
Previously write_data_to_sim rebuilt the (N, 9) zero-copy reshape of
self._wrench_buf on every step. The view aliases a fixed allocation
whose shape never changes, so build it once at buffer creation and
reuse the cached view in the hot path.
Addresses Antoine's PR #5426 review comment on rigid_object.py:188.1 parent d74e904 commit 5cdc178
1 file changed
Lines changed: 10 additions & 9 deletions
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | 181 | | |
190 | 182 | | |
191 | | - | |
| 183 | + | |
192 | 184 | | |
193 | 185 | | |
194 | 186 | | |
| |||
1101 | 1093 | | |
1102 | 1094 | | |
1103 | 1095 | | |
| 1096 | + | |
| 1097 | + | |
1104 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
| |||
0 commit comments