| 43 | } |
| 44 | |
| 45 | uint32_t CPUBuffer::GetCurrentElementNumber() const |
| 46 | { |
| 47 | auto pointerDiff = static_cast<uint32_t>(GetCursor() - Data()); |
| 48 | ASSERT(pointerDiff % GetElementSize() == 0, ()); |
| 49 | return pointerDiff / GetElementSize(); |
| 50 | } |
| 51 | |
| 52 | unsigned char const * CPUBuffer::Data() const |
| 53 | { |