Open3D (C++ API)
0.18.0+6e910d9
|
#include <SmallVector.h>
Public Member Functions | |
size_t | size () const |
size_t | capacity () const |
LLVM_NODISCARD bool | empty () const |
Protected Member Functions | |
SmallVectorBase ()=delete | |
SmallVectorBase (void *FirstEl, size_t TotalCapacity) | |
void * | mallocForGrow (size_t MinSize, size_t TSize, size_t &NewCapacity) |
void | grow_pod (void *FirstEl, size_t MinSize, size_t TSize) |
void | set_size (size_t N) |
Static Protected Member Functions | |
static constexpr size_t | SizeTypeMax () |
The maximum value of the Size_T used. More... | |
Protected Attributes | |
void * | BeginX |
Size_T | Size = 0 |
Size_T | Capacity |
This is all the stuff common to all SmallVectors.
The template parameter specifies the type which should be used to hold the Size and Capacity of the SmallVector, so it can be adjusted. Using 32 bit size is desirable to shrink the size of the SmallVector. Using 64 bit size is desirable for cases like SmallVector<char>, where a 32 bit size would limit the vector to ~4GB. SmallVectors are used for buffering bitcode output - which can exceed 4GB.
|
protecteddelete |
|
inlineprotected |
|
inline |
|
inline |
|
protected |
This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication. This function will report a fatal error if it cannot increase capacity.
|
protected |
This is a helper for grow() that's out of line to reduce code duplication. This function will report a fatal error if it can't grow at least to MinSize
.
|
inlineprotected |
Set the array size to N
, which the current array must have enough capacity for.
This does not construct or destroy any elements in the vector.
|
inline |
|
inlinestaticconstexprprotected |
The maximum value of the Size_T used.
|
protected |
|
protected |
|
protected |