Skip to content

Commit 132fe54

Browse files
committed
rename IndexedVector --> ObjectPool
1 parent 0fc504a commit 132fe54

29 files changed

+155
-162
lines changed

tsd/src/tsd/core/AnariObjectCache.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#pragma once
55

6-
#include "tsd/core/IndexedVector.hpp"
6+
#include "tsd/core/ObjectPool.hpp"
77
// anari
88
#include <anari/anari_cpp.hpp>
99

@@ -29,14 +29,14 @@ struct AnariObjectCache
2929
bool supportsCUDA() const;
3030
void updateObjectArrayData(const Array *a); // for arrays-of-arrays
3131

32-
IndexedVector<anari::Surface> surface;
33-
IndexedVector<anari::Geometry> geometry;
34-
IndexedVector<anari::Material> material;
35-
IndexedVector<anari::Sampler> sampler;
36-
IndexedVector<anari::Volume> volume;
37-
IndexedVector<anari::SpatialField> field;
38-
IndexedVector<anari::Light> light;
39-
IndexedVector<anari::Array> array;
32+
ObjectPool<anari::Surface> surface;
33+
ObjectPool<anari::Geometry> geometry;
34+
ObjectPool<anari::Material> material;
35+
ObjectPool<anari::Sampler> sampler;
36+
ObjectPool<anari::Volume> volume;
37+
ObjectPool<anari::SpatialField> field;
38+
ObjectPool<anari::Light> light;
39+
ObjectPool<anari::Array> array;
4040

4141
anari::Device device{nullptr};
4242

tsd/src/tsd/core/Forest.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#pragma once
55

6-
#include "tsd/core/IndexedVector.hpp"
6+
#include "tsd/core/ObjectPool.hpp"
77
// std
88
#include <functional>
99
#include <utility>
@@ -16,7 +16,7 @@ struct Forest;
1616
template <typename T>
1717
struct ForestNode
1818
{
19-
using Ref = IndexedVectorRef<ForestNode<T>>;
19+
using Ref = ObjectPoolRef<ForestNode<T>>;
2020

2121
ForestNode() = default;
2222
ForestNode(T initialValue, Forest<T> *f);
@@ -67,7 +67,7 @@ struct ForestNode
6767
};
6868

6969
template <typename T>
70-
using ForestNodeRef = IndexedVectorRef<ForestNode<T>>;
70+
using ForestNodeRef = ObjectPoolRef<ForestNode<T>>;
7171

7272
template <typename T>
7373
bool operator==(const ForestNode<T> &a, const ForestNode<T> &b);
@@ -101,7 +101,7 @@ using ForestVisitorExitFunction =
101101
template <typename T>
102102
struct Forest
103103
{
104-
using Ref = IndexedVectorRef<Forest<T>>;
104+
using Ref = ObjectPoolRef<Forest<T>>;
105105
using Node = ForestNode<T>;
106106
using NodeRef = typename ForestNode<T>::Ref;
107107
using Visitor = ForestVisitor<T>;
@@ -149,7 +149,7 @@ struct Forest
149149
void traverse_impl(NodeRef n, ForestVisitor<T> &visitor, int level);
150150
NodeRef make_ForestNode(T &&v);
151151

152-
IndexedVector<ForestNode<T>> m_nodes;
152+
ObjectPool<ForestNode<T>> m_nodes;
153153
NodeRef m_root;
154154
};
155155

0 commit comments

Comments
 (0)