NVIDIA IndeX API nvidia_logo_transpbg.gif Up
idistributed_data_subset.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_IDISTRIBUTED_DATA_SUBSET_H
8#define NVIDIA_INDEX_IDISTRIBUTED_DATA_SUBSET_H
9
10#include <mi/dice.h>
11#include <mi/base/interface_declare.h>
12#include <mi/neuraylib/iserializer.h>
13
14namespace nv {
15namespace index {
16
26{
59
60 ATTRIB_FORMAT_COUNT,
61 ATTRIB_FORMAT_INVALID = ATTRIB_FORMAT_COUNT
62};
63
74 public mi::base::Interface_declare<0x88b4168a,0xde56,0x4f18,0x96,0xca,0xd6,0x4d,0xef,0x0,0x4b,0x94>
75{
76public:
82 virtual bool is_valid() const = 0;
83};
84
96 public mi::base::Interface_declare<0x10f2ae8b,0xd1ac,0x446b,0xa2,0xef,0x15,0xb,0xd,0x82,0xaa,0xc8>
97{
98public:
105 virtual bool is_valid() const = 0;
106
112 virtual mi::math::Bbox_struct<mi::Float32, 3> get_subregion_scene_space() const = 0;
113
119 virtual mi::math::Bbox_struct<mi::Float32, 3> get_subregion_object_space() const = 0;
120};
121
155 public mi::base::Interface_declare<0x3fbeb822,0xffd0,0x4520,0x83,0x21,0xbd,0x62,0x89,0x69,0x01,0x69,
156 mi::neuraylib::ISerializable>
157{
158public:
177 virtual bool is_valid() const = 0;
178
199 virtual bool finalize() = 0;
200};
201
202class IDistributed_data_subset_device :
203 public mi::base::Interface_declare<0x469345b3,0x51e8,0x4a49,0xa7,0xb1,0x5,0xf7,0x85,0x5,0x7c,0xc2>
204{
205public:
221 virtual bool is_valid() const = 0;
222
228 virtual mi::Sint32 get_device_id() const = 0;
229
230 // #todo required for device subsets?
231 // * maybe a place to gather data and update internal structures once
232 // the application is done changing the device subset?
233 // virtual bool finalize() = 0;
234};
235
258 public mi::base::Interface_declare<0x79c2f676,0x194d,0x4915,0xb0,0xce,0x66,0xbe,0x68,0x7c,0xbd,0xc7>
259{
260public:
277 const mi::base::Uuid& dataset_type,
278 const char* parameter) const = 0;
279
298 const mi::base::Uuid& dataset_type,
299 const IDistributed_data_attribute_set_descriptor* dataset_attrib_set_desc,
300 const char* parameter) const = 0;
301
314 template <class T>
315 const T* create_data_subset(const char* parameter = 0) const
316 {
317 const T* t = static_cast<const T*>(create_data_subset(typename T::IID(), parameter));
318 return t;
319 }
320
333 template <class T>
334 T* create_data_subset(const char* parameter = 0)
335 {
336 T* t = static_cast<T*>(create_data_subset(typename T::IID(), parameter));
337 return t;
338 }
339
356 template <class T>
358 const IDistributed_data_attribute_set_descriptor* dataset_attrib_set_desc,
359 const char* parameter = 0) const
360 {
361 const T* t = static_cast<const T*>(create_data_subset(typename T::IID(), dataset_attrib_set_desc, parameter));
362 return t;
363 }
364
381 template <class T>
383 const IDistributed_data_attribute_set_descriptor* dataset_attrib_set_desc,
384 const char* parameter = 0)
385 {
386 T* t = static_cast<T*>(create_data_subset(typename T::IID(), dataset_attrib_set_desc, parameter));
387 return t;
388 }
389
400 const mi::base::Uuid& class_id) const = 0;
401
414 template <class T>
416 {
417 return static_cast<T*>(create_attribute_set_descriptor(typename T::IID()));
418 }
419};
420
421
422} // namespace index
423} // namespace nv
424
425#endif // NVIDIA_INDEX_IDISTRIBUTED_DATA_SUBSET_H
Factory for creating an empty data subset for a specific distributed dataset type.
Definition: idistributed_data_subset.h:259
virtual IDistributed_data_attribute_set_descriptor * create_attribute_set_descriptor(const mi::base::Uuid &class_id) const =0
Creates a specific attribute set descriptor instance.
const T * create_data_subset(const IDistributed_data_attribute_set_descriptor *dataset_attrib_set_desc, const char *parameter=0) const
Convenience template function for creating and empty typed data subset instance for a given attribute...
Definition: idistributed_data_subset.h:357
const T * create_data_subset(const char *parameter=0) const
Convenience template function for creating and empty typed data subset instance.
Definition: idistributed_data_subset.h:315
T * create_data_subset(const char *parameter=0)
Convenience template function for creating and empty typed data subset instance.
Definition: idistributed_data_subset.h:334
T * create_attribute_set_descriptor()
Convenience template function for creating a typed attribute-set descriptor instance.
Definition: idistributed_data_subset.h:415
T * create_data_subset(const IDistributed_data_attribute_set_descriptor *dataset_attrib_set_desc, const char *parameter=0)
Convenience template function for creating and empty typed data subset instance for a given attribute...
Definition: idistributed_data_subset.h:382
virtual IDistributed_data_subset * create_data_subset(const mi::base::Uuid &dataset_type, const IDistributed_data_attribute_set_descriptor *dataset_attrib_set_desc, const char *parameter) const =0
Creates an instance that represents a subset of a large-scale dataset.
virtual IDistributed_data_subset * create_data_subset(const mi::base::Uuid &dataset_type, const char *parameter) const =0
Creates an instance that represents a subset of a large-scale dataset.
A data attribute set descriptor configures and communicates the attributes for a data subset.
Definition: idistributed_data_subset.h:75
virtual bool is_valid() const =0
Verifying the correctness of a data subset descriptor.
Subset data descriptors communicate the structural data representations about a subset data to an app...
Definition: idistributed_data_subset.h:97
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_subregion_scene_space() const =0
The scene space bounding box of the subdivision's subregion, which hosts the given data subset.
virtual bool is_valid() const =0
Verifying the integrity of a data subset descriptor.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_subregion_object_space() const =0
The object space bounding box of the subdivision's subregion, which hosts the given data subset.
A data subset represent the unique entity representing a distributed dataset inside a single subregio...
Definition: idistributed_data_subset.h:157
virtual bool finalize()=0
Finalize the given subset's data representation.
virtual bool is_valid() const =0
Verifying the integrity of a data subset descriptor for the use by NVIDIA IndeX.
Distributed_data_attribute_format
Attribute formats for distributed dataset types.
Definition: idistributed_data_subset.h:26
@ ATTRIB_FORMAT_UINT8_4
Vector attribute format with 4 components and uint8 precision per component.
Definition: idistributed_data_subset.h:30
@ ATTRIB_FORMAT_SINT16_2
Vector attribute format with 2 components and sint16 precision per component.
Definition: idistributed_data_subset.h:40
@ ATTRIB_FORMAT_FLOAT32
Scalar attribute format with float32 precision.
Definition: idistributed_data_subset.h:55
@ ATTRIB_FORMAT_UINT32
Scalar attribute format with uint32 precision.
Definition: idistributed_data_subset.h:43
@ ATTRIB_FORMAT_FLOAT32_2
Vector attribute format with 2 components and float32 precision per component.
Definition: idistributed_data_subset.h:56
@ ATTRIB_FORMAT_UINT8_3
Vector attribute format with 3 components and uint8 precision per component.
Definition: idistributed_data_subset.h:29
@ ATTRIB_FORMAT_UINT32_4
Vector attribute format with 4 components and uint32 precision per component.
Definition: idistributed_data_subset.h:46
@ ATTRIB_FORMAT_UINT8_2
Vector attribute format with 2 components and uint8 precision per component.
Definition: idistributed_data_subset.h:28
@ ATTRIB_FORMAT_FLOAT32_4
Vector attribute format with 4 components and float32 precision per component.
Definition: idistributed_data_subset.h:58
@ ATTRIB_FORMAT_UINT8
Scalar attribute format with uint8 precision.
Definition: idistributed_data_subset.h:27
@ ATTRIB_FORMAT_FLOAT32_3
Vector attribute format with 3 components and float32 precision per component.
Definition: idistributed_data_subset.h:57
@ ATTRIB_FORMAT_FLOAT16_3
Vector attribute format with 3 components and float16 precision per component.
Definition: idistributed_data_subset.h:53
@ ATTRIB_FORMAT_SINT32_3
Vector attribute format with 3 components and sint32 precision per component.
Definition: idistributed_data_subset.h:49
@ ATTRIB_FORMAT_FLOAT16_2
Vector attribute format with 2 components and float16 precision per component.
Definition: idistributed_data_subset.h:52
@ ATTRIB_FORMAT_SINT8_4
Vector attribute format with 4 components and sint8 precision per component.
Definition: idistributed_data_subset.h:34
@ ATTRIB_FORMAT_UINT32_2
Vector attribute format with 2 components and uint32 precision per component.
Definition: idistributed_data_subset.h:44
@ ATTRIB_FORMAT_FLOAT16_4
Vector attribute format with 4 components and float16 precision per component.
Definition: idistributed_data_subset.h:54
@ ATTRIB_FORMAT_UINT16_4
Vector attribute format with 4 components and uint16 precision per component.
Definition: idistributed_data_subset.h:38
@ ATTRIB_FORMAT_SINT16
Scalar attribute format with sint16 precision.
Definition: idistributed_data_subset.h:39
@ ATTRIB_FORMAT_SINT32
Scalar attribute format with sint32 precision.
Definition: idistributed_data_subset.h:47
@ ATTRIB_FORMAT_FLOAT16
Scalar attribute format with float16 precision.
Definition: idistributed_data_subset.h:51
@ ATTRIB_FORMAT_SINT8_2
Vector attribute format with 2 components and sint8 precision per component.
Definition: idistributed_data_subset.h:32
@ ATTRIB_FORMAT_SINT16_3
Vector attribute format with 3 components and sint16 precision per component.
Definition: idistributed_data_subset.h:41
@ ATTRIB_FORMAT_UINT16_2
Vector attribute format with 2 components and uint16 precision per component.
Definition: idistributed_data_subset.h:36
@ ATTRIB_FORMAT_UINT32_3
Vector attribute format with 3 components and uint32 precision per component.
Definition: idistributed_data_subset.h:45
@ ATTRIB_FORMAT_UINT16
Scalar attribute format with uint16 precision.
Definition: idistributed_data_subset.h:35
@ ATTRIB_FORMAT_SINT8
Scalar attribute format with sint8 precision.
Definition: idistributed_data_subset.h:31
@ ATTRIB_FORMAT_UINT16_3
Vector attribute format with 3 components and uint16 precision per component.
Definition: idistributed_data_subset.h:37
@ ATTRIB_FORMAT_SINT32_2
Vector attribute format with 2 components and sint32 precision per component.
Definition: idistributed_data_subset.h:48
@ ATTRIB_FORMAT_SINT16_4
Vector attribute format with 4 components and sint16 precision per component.
Definition: idistributed_data_subset.h:42
@ ATTRIB_FORMAT_SINT8_3
Vector attribute format with 3 components and sint8 precision per component.
Definition: idistributed_data_subset.h:33
@ ATTRIB_FORMAT_SINT32_4
Vector attribute format with 4 components and sint32 precision per component.
Definition: idistributed_data_subset.h:50
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349