blob: 447f28d3516b7ed6667afc6363918d73ee29ea1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include "std/vector.hpp"
#include "std/cstdint.hpp"
namespace dp
{
class IndexStorage
{
public:
IndexStorage();
IndexStorage(vector<uint32_t> && initial);
uint32_t Size() const;
void Resize(uint32_t size);
void * GetRaw(uint32_t offsetInElements = 0);
void const * GetRawConst() const;
static bool IsSupported32bit();
static uint32_t SizeOfIndex();
private:
vector<uint32_t> m_storage;
uint32_t m_size;
uint32_t GetStorageSize(uint32_t elementsCount) const;
};
} // namespace dp
|