7#ifndef PXR_EXEC_VDF_VECTOR_IMPL_BOXED_H
8#define PXR_EXEC_VDF_VECTOR_IMPL_BOXED_H
12#include "pxr/exec/vdf/api.h"
13#include "pxr/exec/vdf/vectorDataTyped.h"
15#include "pxr/exec/vdf/boxedContainer.h"
17#include "pxr/exec/vdf/forEachCommonType.h"
22PXR_NAMESPACE_OPEN_SCOPE
28 :
public Vdf_VectorDataTyped<T>
37 : _box(std::move(box))
103 return _box.empty() ? 0 : 1;
106 bool IsSharable()
const override {
107 return _box.size() >= Vdf_VectorData::_VectorSharingSize;
110 size_t EstimateElementMemory()
const override {
118 _box.GetRanges().GetNumRanges();
123 Vdf_VectorData::Info GetInfo()
override {
124 return Vdf_VectorData::Info(
130 Vdf_VectorData::Info::Layout::Boxed);
138#define VDF_DECLARE_EXTERN_VECTOR_IMPL_BOXED(type) \
139 extern template class VDF_API_TYPE Vdf_VectorImplBoxed<type>;
140VDF_FOR_EACH_COMMON_TYPE(VDF_DECLARE_EXTERN_VECTOR_IMPL_BOXED)
141#undef VDF_DECLARE_EXTERN_VECTOR_IMPL_BOXED
143PXR_NAMESPACE_CLOSE_SCOPE
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.
This simple container stores multiple values that flow through the network as a single data flow elem...
A range of data elements as denoted by [ begin, end ) indices.
void New(Args &&... args)
Creates an instance.
void Destroy()
Destroys a held instance.
Implements a Vdf_VectorData storage that holds a boxed element.
size_t GetSize() const override
The size of a boxed vector is always 1, since that's the size of the mask used to represent data held...
size_t GetNumStoredElements() const override
The number of elements stored in a boxed vector is eiter 0 (if the box is empty) or 1.
Implements a Vdf_VectorData storage that is always empty.
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.