NVIDIA IndeX API nvidia_logo_transpbg.gif Up
iaffinity_information.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_IAFFINITY_INFORMATION_H
8#define NVIDIA_INDEX_IAFFINITY_INFORMATION_H
9
10#include <mi/math/bbox.h>
11#include <mi/neuraylib/dice.h>
12#include <mi/neuraylib/istring.h>
13
14namespace nv
15{
16namespace index
17{
18
39 public mi::base::Interface_declare<0x3fbeb811,0xffd1,0x4521,0x33,0x21,0xbd,0x67,0x12,0x21,0x11,0x69,
40 mi::neuraylib::ISerializable>
41{
42public:
45 {
46 ANY_GPU = 0xffffffffu,
47 ANY_HOST = 0u
48 };
49
76 virtual bool get_affinity(
77 const mi::math::Bbox_struct<mi::Float32, 3>& subregion,
78 mi::Uint32& host_id,
79 mi::IString* host_name,
80 mi::Uint32& device_id) const = 0;
81};
82
109 public mi::base::Interface_declare<0x1fefb212,0xffe1,0x1431,0x13,0x67,0xbd,0x17,0x13,0x31,0x41,0x6e,
110 nv::index::IAffinity_information>
111{
112public:
119 virtual mi::Uint32 get_nb_subregions() const = 0;
120
132 virtual mi::math::Bbox_struct<mi::Float32, 3> get_subregion(mi::Uint32 index) const = 0;
133};
134
135
136
145 public mi::base::Interface_declare<0x25d72982,0x3cff,0x4f72,0x99,0x72,0x41,0x95,0xec,0x06,0x16,0x12,
146 nv::index::IDomain_specific_subdivision>
147{
148public:
151 {
154 };
155
157 virtual mi::Uint32 get_topology_type() const = 0;
158
161 virtual mi::Uint32 get_nb_nodes() const = 0;
162
166 virtual mi::math::Bbox_struct<mi::Float32, 3> get_node_box(mi::Uint32 inode) const = 0;
167
173 virtual mi::Uint32 get_node_child_count(mi::Uint32 inode) const = 0;
174
178 virtual mi::Sint32 get_node_child(mi::Uint32 inode, mi::Uint32 ichild) const = 0;
179
183 virtual mi::Sint32 get_node_subregion_index(mi::Uint32 inode) const = 0;
184};
185
186} // namespace index
187} // namespace nv
188
189#endif // NVIDIA_INDEX_IAFFINITY_INFORMATION_H
Application-side control of data distribution to cluster machines and GPUs.
Definition: iaffinity_information.h:41
virtual bool get_affinity(const mi::math::Bbox_struct< mi::Float32, 3 > &subregion, mi::Uint32 &host_id, mi::IString *host_name, mi::Uint32 &device_id) const =0
Defines the affinity for a subregion with the given bounding box.
Affinity_flags
Flags for setting specific affinity modes.
Definition: iaffinity_information.h:45
@ ANY_GPU
The GPU should be assigned automatically.
Definition: iaffinity_information.h:46
@ ANY_HOST
The host should be assigned automatically.
Definition: iaffinity_information.h:47
Domain specific subdivision with topology information.
Definition: iaffinity_information.h:147
Topology_type
Subdivision schemes can rely on different topologies.
Definition: iaffinity_information.h:151
@ TOPO_KD_TREE
! Kd-tree based topology.
Definition: iaffinity_information.h:152
@ TOPO_OCTREE
! Octree-based topology.
Definition: iaffinity_information.h:153
virtual mi::Uint32 get_node_child_count(mi::Uint32 inode) const =0
Get the number of children of node inode.
virtual mi::Sint32 get_node_child(mi::Uint32 inode, mi::Uint32 ichild) const =0
Get a child index of the node inode.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_node_box(mi::Uint32 inode) const =0
Get the bounding box of the node inode.
virtual mi::Uint32 get_topology_type() const =0
Get type of topology,.
virtual mi::Uint32 get_nb_nodes() const =0
Get the total number of nodes of the topology.
virtual mi::Sint32 get_node_subregion_index(mi::Uint32 inode) const =0
Get index of subregion associated with node inode (or -1, if no subregion).
Domain specific subdivision and data distribution.
Definition: iaffinity_information.h:111
virtual mi::Uint32 get_nb_subregions() const =0
Provides the number of spatial regions that span the application's decomposition scheme.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_subregion(mi::Uint32 index) const =0
Provides each spatial regions according to on the given index.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349