7#ifndef PXR_EXEC_VDF_VECTOR_IMPL_SINGLE_H
8#define PXR_EXEC_VDF_VECTOR_IMPL_SINGLE_H
12#include "pxr/exec/vdf/api.h"
13#include "pxr/exec/vdf/boxedContainerTraits.h"
15#include "pxr/exec/vdf/fixedSizeHolder.h"
16#include "pxr/exec/vdf/forEachCommonType.h"
18#include "pxr/exec/vdf/vectorDataTyped.h"
19#include "pxr/exec/vdf/vectorImpl_Empty.h"
23PXR_NAMESPACE_OPEN_SCOPE
27template<
typename TYPE>
29 :
public Vdf_VectorDataTyped<TYPE>
32 !Vdf_IsBoxedContainer<TYPE>,
33 "Only Vdf_VectorImplBoxed may hold boxed values");
44 _data(std::move(value)) {
52 _data(std::move(rhs._data)) {
74 void CloneSubset(
const VdfMask &mask,
87 TF_VERIFY(
false,
"Attempted to box single-element vector");
106 size_t GetSize()
const override
111 size_t GetNumStoredElements()
const override
116 size_t EstimateElementMemory()
const override
123 Vdf_VectorData::Info GetInfo()
override
125 return Vdf_VectorData::Info(
135#define VDF_DECLARE_EXTERN_VECTOR_IMPL_SINGLE(type) \
136 extern template class VDF_API_TYPE Vdf_VectorImplSingle<type>;
137VDF_FOR_EACH_COMMON_TYPE(VDF_DECLARE_EXTERN_VECTOR_IMPL_SINGLE)
138#undef VDF_DECLARE_EXTERN_VECTOR_IMPL_SINGLE
140PXR_NAMESPACE_CLOSE_SCOPE
Low-level utilities for informing users of various internal and external diagnostic conditions.
Fast, compressed bit array which is capable of performing logical operations without first decompress...
size_t GetSize() const
Returns the size of the bit array, ie.
bool AreAllSet() const
Returns true, if all the bits in this bit array are set.
Vdf_FixedSizeHolder holds an object of type T of any size, but the sizeof(Vdf_FixedSizeHolder<T>) is ...
void New(Args &&... args)
Creates an instance.
void Destroy()
Destroys a held instance.
Implements a Vdf_VectorData storage that is always empty.
Implements a Vdf_VectorData storage that is holds a single element.
A VdfMask is placed on connections to specify the data flowing through them.
size_t VdfEstimateSize(const T &)
Estimate the memory footprint of instance t of type T.
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.