| 474 | */ |
| 475 | template<typename Index> |
| 476 | inline Index first_multiple(Index size, Index base) |
| 477 | { |
| 478 | return ((size+base-1)/base)*base; |
| 479 | } |
| 480 | |
| 481 | // std::copy is much slower than memcpy, so let's introduce a smart_copy which |
| 482 | // use memcpy on trivial types, i.e., on types that does not require an initialization ctor. |