| 164 | } |
| 165 | |
| 166 | void* WorkspaceBundle::get(size_t i) const { |
| 167 | auto addr = reinterpret_cast<uintptr_t>(m_ptr); |
| 168 | if (addr % m_align_in_bytes != 0) |
| 169 | addr += m_align_in_bytes - addr % m_align_in_bytes; |
| 170 | for (size_t j = 0; j < i; ++j) { |
| 171 | addr += m_aligned_sizes[j]; |
| 172 | } |
| 173 | return reinterpret_cast<void*>(addr); |
| 174 | } |
| 175 | |
| 176 | size_t WorkspaceBundle::nr_workspace() const { |
| 177 | return m_sizes.size(); |
no outgoing calls
no test coverage detected