Loading...
Searching...
No Matches
poolChainIndex.h
Go to the documentation of this file.
1
//
2
// Copyright 2025 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
#ifndef PXR_EXEC_VDF_POOL_CHAIN_INDEX_H
8
#define PXR_EXEC_VDF_POOL_CHAIN_INDEX_H
9
11
12
#include "
pxr/pxr.h
"
13
14
#include "pxr/exec/vdf/api.h"
15
#include "
pxr/exec/vdf/output.h
"
16
17
PXR_NAMESPACE_OPEN_SCOPE
18
19
23
class
VdfPoolChainIndex
24
{
25
public
:
26
bool
operator<(
VdfPoolChainIndex
rhs)
const
27
{
28
return
_index < rhs._index;
29
}
30
31
bool
operator<=(
VdfPoolChainIndex
rhs)
const
32
{
33
return
!(rhs < *
this
);
34
}
35
36
bool
operator>(
VdfPoolChainIndex
rhs)
const
37
{
38
return
rhs < *
this
;
39
}
40
41
bool
operator>=(
VdfPoolChainIndex
rhs)
const
42
{
43
return
!(*
this
< rhs);
44
}
45
46
bool
operator==(
VdfPoolChainIndex
rhs)
const
47
{
48
return
_index == rhs._index;
49
}
50
51
bool
operator!=(
VdfPoolChainIndex
rhs)
const
52
{
53
return
!(*
this
== rhs);
54
}
55
56
private
:
57
friend
class
VdfPoolChainIndexer;
58
VdfPoolChainIndex
(
int
poolChainIndex, uint32_t outputIndex)
59
// Combine the pool chain and output indices into a single field.
60
//
61
// The combined index should be sorted primarily in pool chain order.
62
// The invalid pool chain index is -1 so we increment the pool chain
63
// index to ensure that the previous implementation's order, which put
64
// invalid entries first, is maintained.
65
: _index(((
static_cast<
size_t
>
(poolChainIndex)+1) << 32ull) |
66
outputIndex)
67
{}
68
69
private
:
70
size_t
_index;
71
};
72
73
77
inline
bool
78
Vdf_IsPoolOutput
(
const
VdfOutput
&output)
79
{
80
return
output.GetAssociatedInput() && output.GetNumDataEntries() > 1;
81
}
82
83
PXR_NAMESPACE_CLOSE_SCOPE
84
85
#endif
VdfOutput
A VdfOutput represents an output on a node.
Definition
output.h:32
VdfPoolChainIndex
Opaque pool chain index type.
Definition
poolChainIndex.h:24
output.h
Vdf_IsPoolOutput
bool Vdf_IsPoolOutput(const VdfOutput &output)
Returns true if output is a pool output, i.e., an output that has an associated input,...
Definition
poolChainIndex.h:78
pxr.h
pxr
exec
vdf
poolChainIndex.h
© Copyright 2026, Pixar Animation Studios. |
Terms of Use
| Generated on Fri Jul 17 2026 14:22:47 by
1.12.0