![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <SmallVector.h>


Public Types | |
| using | size_type = size_t |
| using | difference_type = ptrdiff_t |
| using | value_type = T |
| using | iterator = T * |
| using | const_iterator = const T * |
| using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
| using | reverse_iterator = std::reverse_iterator< iterator > |
| using | reference = T & |
| using | const_reference = const T & |
| using | pointer = T * |
| using | const_pointer = const T * |
Public Member Functions | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| size_type | size_in_bytes () const |
| size_type | max_size () const |
| size_t | capacity_in_bytes () const |
| pointer | data () |
| Return a pointer to the vector's buffer, even if empty(). More... | |
| const_pointer | data () const |
| Return a pointer to the vector's buffer, even if empty(). More... | |
| reference | operator[] (size_type idx) |
| const_reference | operator[] (size_type idx) const |
| reference | front () |
| const_reference | front () const |
| reference | back () |
| const_reference | back () const |
Public Member Functions inherited from cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > > | |
| size_t | size () const |
| size_t | capacity () const |
| bool | empty () const |
Protected Member Functions | |
| SmallVectorTemplateCommon (size_t Size) | |
| void | grow_pod (size_t MinSize, size_t TSize) |
| bool | isSmall () const |
| void | resetToSmall () |
| Put this vector in a state of being small. More... | |
| bool | isReferenceToRange (const void *V, const void *First, const void *Last) const |
| Return true if V is an internal reference to the given range. More... | |
| bool | isReferenceToStorage (const void *V) const |
| Return true if V is an internal reference to this vector. More... | |
| bool | isRangeInStorage (const void *First, const void *Last) const |
| bool | isSafeToReferenceAfterResize (const void *Elt, size_t NewSize) |
| void | assertSafeToReferenceAfterResize (const void *Elt, size_t NewSize) |
| Check whether Elt will be invalidated by resizing the vector to NewSize. More... | |
| void | assertSafeToAdd (const void *Elt, size_t N=1) |
| void | assertSafeToReferenceAfterClear (const T *From, const T *To) |
| Check whether any part of the range will be invalidated by clearing. More... | |
| template<class ItTy , std::enable_if_t< !std::is_same< std::remove_const_t< ItTy >, T * >::value, bool > = false> | |
| void | assertSafeToReferenceAfterClear (ItTy, ItTy) |
| void | assertSafeToAddRange (const T *From, const T *To) |
| Check whether any part of the range will be invalidated by growing. More... | |
| template<class ItTy , std::enable_if_t< !std::is_same< std::remove_const_t< ItTy >, T * >::value, bool > = false> | |
| void | assertSafeToAddRange (ItTy, ItTy) |
Protected Member Functions inherited from cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > > | |
| 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 | |
| template<class U > | |
| static const T * | reserveForParamAndGetAddressImpl (U *This, const T &Elt, size_t N) |
Static Protected Member Functions inherited from cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > > | |
| static constexpr size_t | SizeTypeMax () |
| The maximum value of the Size_T used. More... | |
Additional Inherited Members | |
Protected Attributes inherited from cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > > | |
| void * | BeginX |
| SmallVectorSizeType< T > | Size |
| SmallVectorSizeType< T > | Capacity |
This is the part of SmallVectorTemplateBase which does not depend on whether the type T is a POD. The extra dummy template argument is used by ArrayRef to avoid unnecessarily requiring T to be complete.
Definition at line 153 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::const_iterator = const T * |
Definition at line 286 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::const_pointer = const T * |
Definition at line 294 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::const_reference = const T & |
Definition at line 292 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 288 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::difference_type = ptrdiff_t |
Definition at line 283 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::iterator = T * |
Definition at line 285 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::pointer = T * |
Definition at line 293 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::reference = T & |
Definition at line 291 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 289 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::size_type = size_t |
Definition at line 282 of file SmallVector.h.
| using cloudViewer::core::SmallVectorTemplateCommon< T, typename >::value_type = T |
Definition at line 284 of file SmallVector.h.
|
inlineprotected |
Definition at line 169 of file SmallVector.h.
|
inlineprotected |
Check whether Elt will be invalidated by increasing the size of the vector by N.
Definition at line 232 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterResize(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().
Referenced by cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToAddRange().
|
inlineprotected |
Check whether any part of the range will be invalidated by growing.
Definition at line 249 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToAdd(), and cloudViewer::t::geometry::kernel::image::To().
Referenced by cloudViewer::core::SmallVectorImpl< T >::append(), and cloudViewer::core::SmallVectorImpl< T >::insert().
|
inlineprotected |
Definition at line 258 of file SmallVector.h.
|
inlineprotected |
Check whether any part of the range will be invalidated by clearing.
Definition at line 237 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterResize(), and cloudViewer::t::geometry::kernel::image::To().
Referenced by cloudViewer::core::SmallVectorImpl< T >::assign().
|
inlineprotected |
Definition at line 246 of file SmallVector.h.
|
inlineprotected |
Check whether Elt will be invalidated by resizing the vector to NewSize.
Definition at line 223 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isSafeToReferenceAfterResize().
Referenced by cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToAdd(), and cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterClear().
|
inline |
Definition at line 346 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::empty(), and cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end().
Referenced by cloudViewer::core::SmallVectorImpl< T >::emplace_back(), cloudViewer::core::SmallVectorTemplateBase< T, bool >::growAndEmplaceBack(), cloudViewer::core::SmallVectorTemplateBase< T, true >::growAndEmplaceBack(), cloudViewer::core::SmallVectorImpl< T >::pop_back_val(), and cloudViewer::core::shape_util::Restride().
|
inline |
Definition at line 350 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::empty(), and cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end().
|
inline |
Definition at line 301 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::BeginX.
Referenced by cloudViewer::core::SmallVectorImpl< T >::append(), cloudViewer::core::SmallVectorImpl< T >::assign(), cloudViewer::core::SmallVectorImpl< T >::assignRemote(), cloudViewer::core::HashMap::CheckKeyCompatibility(), cloudViewer::core::HashMap::CheckValueCompatibility(), cloudViewer::core::SmallVectorImpl< T >::clear(), cloudViewer::core::shape_util::Concat(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::data(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end(), cloudViewer::core::SmallVectorImpl< T >::erase(), cloudViewer::core::shape_util::ExpandFrontDims(), cloudViewer::core::TensorList::FromTensor(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::front(), cloudViewer::core::HashMap::GetKeyTensor(), cloudViewer::core::HashMap::GetValueTensor(), cloudViewer::core::HashMap::GetValueTensors(), cloudViewer::core::SmallVectorTemplateBase< T, bool >::growAndAssign(), cloudViewer::core::SmallVectorTemplateBase< T, true >::growAndAssign(), cloudViewer::core::Tensor::IndexExtract(), cloudViewer::core::SmallVectorImpl< T >::insert(), cloudViewer::core::shape_util::Iota(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isRangeInStorage(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isReferenceToStorage(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isSafeToReferenceAfterResize(), cloudViewer::t::geometry::VoxelBlockGrid::Load(), cloudViewer::core::SizeVector::NumElements(), cloudViewer::core::SizeVector::operator std::vector< int64_t >(), cloudViewer::core::SmallVectorImpl< T >::operator<(), cloudViewer::core::SmallVectorImpl< T >::operator=(), cloudViewer::core::SmallVector< T, N >::operator=(), cloudViewer::core::SmallVectorImpl< T >::operator==(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::operator[](), cloudViewer::t::io::ReadHashMap(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::rend(), cloudViewer::core::AdvancedIndexPreprocessor::RestrideIndexTensor(), cloudViewer::core::AdvancedIndexPreprocessor::RestrideTensor(), cloudViewer::core::AdvancedIndexPreprocessor::RunPreprocess(), cloudViewer::core::SmallVectorImpl< T >::swap(), cloudViewer::core::DynamicSizeVector::ToSizeVector(), cloudViewer::core::Tensor::Transpose(), cloudViewer::core::SmallVectorImpl< T >::truncate(), cloudViewer::t::geometry::VoxelBlockGrid::VoxelBlockGrid(), cloudViewer::t::io::WriteNpzOneTensor(), cloudViewer::core::SmallVector< T, N >::~SmallVector(), and cloudViewer::core::SmallVectorImpl< T >::~SmallVectorImpl().
|
inline |
Definition at line 302 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::BeginX.
|
inline |
Definition at line 321 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::capacity().
|
inline |
Return a pointer to the vector's buffer, even if empty().
Definition at line 324 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin().
|
inline |
Return a pointer to the vector's buffer, even if empty().
Definition at line 326 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin().
|
inline |
Definition at line 303 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().
Referenced by cloudViewer::core::SmallVectorImpl< T >::append(), cloudViewer::core::SmallVectorImpl< T >::assign(), cloudViewer::core::SmallVectorImpl< T >::assignRemote(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::back(), cloudViewer::core::SmallVectorImpl< T >::clear(), cloudViewer::core::shape_util::Concat(), cloudViewer::core::SmallVectorImpl< T >::emplace_back(), cloudViewer::core::SmallVectorImpl< T >::erase(), cloudViewer::core::shape_util::ExpandFrontDims(), cloudViewer::core::TensorList::FromTensor(), cloudViewer::core::SmallVectorTemplateBase< T, bool >::growAndAssign(), cloudViewer::core::SmallVectorImpl< T >::insert(), cloudViewer::core::shape_util::Iota(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isRangeInStorage(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isReferenceToStorage(), cloudViewer::core::SizeVector::NumElements(), cloudViewer::core::SizeVector::operator std::vector< int64_t >(), cloudViewer::core::SmallVectorImpl< T >::operator<(), cloudViewer::core::SmallVectorImpl< T >::operator=(), cloudViewer::core::SmallVector< T, N >::operator=(), cloudViewer::core::SmallVectorImpl< T >::operator==(), cloudViewer::core::SmallVectorTemplateBase< T, bool >::pop_back(), cloudViewer::core::SmallVectorTemplateBase< T, bool >::push_back(), cloudViewer::core::SmallVectorTemplateBase< T, true >::push_back(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::rbegin(), cloudViewer::t::io::ReadHashMap(), cloudViewer::core::AdvancedIndexPreprocessor::RestrideIndexTensor(), cloudViewer::core::AdvancedIndexPreprocessor::RestrideTensor(), cloudViewer::core::AdvancedIndexPreprocessor::RunPreprocess(), cloudViewer::core::SmallVectorImpl< T >::swap(), cloudViewer::core::DynamicSizeVector::ToSizeVector(), cloudViewer::core::Tensor::Transpose(), cloudViewer::core::SmallVectorImpl< T >::truncate(), cloudViewer::t::geometry::VoxelBlockGrid::VoxelBlockGrid(), cloudViewer::t::io::WriteNpzOneTensor(), and cloudViewer::core::SmallVector< T, N >::~SmallVector().
|
inline |
Definition at line 304 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().
|
inline |
Definition at line 337 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::empty().
|
inline |
Definition at line 341 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::empty().
|
inlineprotected |
Definition at line 171 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::grow_pod().
Referenced by cloudViewer::core::SmallVectorTemplateBase< T, true >::grow().
|
inlineprotected |
Return true if First and Last form a valid (possibly empty) range in this vector's storage.
Definition at line 202 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end().
Referenced by cloudViewer::core::SmallVectorImpl< T >::erase().
|
inlineprotected |
Return true if V is an internal reference to the given range.
Definition at line 187 of file SmallVector.h.
Referenced by cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isReferenceToStorage().
|
inlineprotected |
Return true if V is an internal reference to this vector.
Definition at line 196 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end(), and cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isReferenceToRange().
Referenced by cloudViewer::core::SmallVectorImpl< T >::erase(), cloudViewer::core::SmallVectorImpl< T >::insert(), and cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isSafeToReferenceAfterResize().
|
inlineprotected |
Return true unless Elt will be invalidated by resizing the vector to NewSize.
Definition at line 211 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::capacity(), cloudViewer::core::SmallVectorTemplateCommon< T, typename >::isReferenceToStorage(), LLVM_LIKELY, and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().
Referenced by cloudViewer::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterResize().
|
inlineprotected |
Return true if this is a smallvector which has not had dynamic memory allocated for it.
Definition at line 177 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::BeginX.
Referenced by cloudViewer::core::SmallVectorImpl< T >::assignRemote(), cloudViewer::core::SmallVectorImpl< T >::swap(), and cloudViewer::core::SmallVectorImpl< T >::~SmallVectorImpl().
|
inline |
Definition at line 317 of file SmallVector.h.
References min(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::SizeTypeMax().
|
inline |
Definition at line 328 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().
Referenced by cloudViewer::core::SizeVector::GetLength(), and cloudViewer::core::SizeVector::IsCompatible().
|
inline |
Definition at line 332 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin(), and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().
|
inline |
Definition at line 307 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end().
Referenced by cloudViewer::core::Indexer::ReorderDimensions().
|
inline |
Definition at line 308 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::end().
|
inline |
Definition at line 311 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin().
Referenced by cloudViewer::core::Indexer::ReorderDimensions().
|
inline |
Definition at line 312 of file SmallVector.h.
References cloudViewer::core::SmallVectorTemplateCommon< T, typename >::begin().
|
inlinestaticprotected |
Reserve enough space to add one element, and return the updated element pointer in case it was a reference to the storage.
Definition at line 263 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::capacity(), LLVM_LIKELY, and LLVM_UNLIKELY.
Referenced by cloudViewer::core::SmallVectorTemplateBase< T, bool >::reserveForParamAndGetAddress(), and cloudViewer::core::SmallVectorTemplateBase< T, true >::reserveForParamAndGetAddress().
|
inlineprotected |
Put this vector in a state of being small.
Definition at line 180 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::BeginX, cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::Capacity, and cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::Size.
|
inline |
Definition at line 316 of file SmallVector.h.
References cloudViewer::core::SmallVectorBase< SmallVectorSizeType< T > >::size().