Commit 62cd478
committed
Avoid memory allocation with
Implement `HighFive::RegularHyperSlabNoMalloc<Rank>` that takes
hyperslab variables in stack space. Do not construct
`std::vector<hsize_t>`.
Similarly, implement `::select(RegularHyperSlabNoMalloc<>)` such that it
is free of `operator new[]` calls before invoking `H5Sselect_hyperslab`.
Ensure that when hyperslab offset and range are compile-time constants,
compiler (with arguments `-O3 -flto`) will inline everything without
any `operator new[]` statements.H5Sselect_hyperslab
1 parent c1070f3 commit 62cd478
File tree
3 files changed
+68
-1
lines changed- include/highfive/bits
- src/examples
3 files changed
+68
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
111 | 153 | | |
112 | 154 | | |
113 | 155 | | |
| |||
416 | 458 | | |
417 | 459 | | |
418 | 460 | | |
419 | | - | |
420 | 461 | | |
421 | 462 | | |
422 | 463 | | |
| |||
430 | 471 | | |
431 | 472 | | |
432 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
433 | 477 | | |
434 | 478 | | |
435 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
243 | 261 | | |
244 | 262 | | |
245 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
0 commit comments