NVIDIA IndeX API nvidia_logo_transpbg.gif Up
icompute.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ICOMPUTE_H
8#define NVIDIA_INDEX_ICOMPUTE_H
9
10#include <mi/base/interface_declare.h>
11#include <mi/math/bbox.h>
12#include <mi/neuraylib/iserializer.h> // Tag_struct
13
14#include <nv/index/iattribute.h>
16#include <nv/index/ierror.h>
17
18namespace nv {
19namespace index {
20
21// forward declarations
22class ICompute_results;
23class ICompute_launch_request;
24class IDistributed_data_access;
25class IIndex_rendering;
26
33 public mi::base::Interface_declare<0x5aee3342,0x97c2,0x41fc,0xa3,0x40,0x3e,0x1c,0x20,0x87,0x10,0xff>
34{
35public:
38
47 const ICompute_launch_request* request,
48 IIndex_rendering* index_rendering,
49 mi::neuraylib::Tag_struct session_tag,
50 mi::neuraylib::IDice_transaction* dice_transaction) = 0;
51};
52
58 public mi::base::Interface_declare<0x7487d3dd,0x72e3,0x4a9e,0x9e,0x9d,0x1d,0x8b,0xfb,0x96,0xd5,0xa0>
59{
60public:
62 virtual void set_launch(
63 mi::neuraylib::Tag_struct xac_compute_program_tag,
64 mi::neuraylib::Tag_struct data_write_target_tag) = 0;
65
67 virtual void set_launch(
68 mi::neuraylib::Tag_struct xac_compute_program_tag,
69 mi::neuraylib::Tag_struct xac_compute_target_tag,
70 mi::neuraylib::Tag_struct data_write_target_tag) = 0;
71
75 virtual void set_region_of_interest(const mi::math::Bbox_struct<mi::Float32, 3>& box) = 0;
76
78 virtual bool is_valid() const = 0;
79
81 virtual mi::neuraylib::Tag_struct get_compute_program_tag() const = 0;
82
84 virtual mi::neuraylib::Tag_struct get_compute_target_tag() const = 0;
85
87 virtual mi::neuraylib::Tag_struct get_data_write_target_tag() const = 0;
88
90 virtual bool get_region_of_interest(mi::math::Bbox_struct<mi::Float32, 3>& box) const = 0;
91};
92
98 public mi::base::Interface_declare<0xcb08140d,0x10bc,0x4c8f,0xa0,0xf7,0xe,0x85,0x31,0x21,0xd8,0x6e>
99{
100public:
102 virtual bool is_valid() const = 0;
103
106 virtual const IError_set* get_error_set() const = 0;
107
110};
111
118 public mi::base::Interface_declare<0xdaf77e98,0xd880,0x415c,0x86,0x39,0x2d,0x6b,0xee,0x9e,0x5c,0xbe,
119 nv::index::IAttribute>
120{
121public:
123 virtual void set_resolution(const mi::math::Vector_struct<mi::Uint32, 2>& res) = 0;
124
131 virtual bool set_value_sizes(const mi::Uint32* value_sizes, mi::Uint32 nb_values) = 0;
132
134 virtual mi::math::Vector_struct<mi::Uint32, 2> get_resolution() const = 0;
135
137 virtual mi::Uint32 get_nb_values() const = 0;
138
140 virtual mi::Uint32 get_value_size(mi::Uint32 i) const = 0;
141};
142
148 public mi::base::Interface_declare<0x8f335887,0x6c3b,0x48be,0xb0,0x55,0x46,0xb0,0xc4,0xdb,0xf4,0xb0,
149 IDistributed_data_subset>
150{
151public:
154 virtual mi::math::Vector_struct<mi::Uint32, 2> get_resolution() const = 0;
155
157 virtual mi::math::Vector_struct<mi::Uint32, 2> get_offset() const = 0;
158
159
161 virtual mi::Uint32 get_nb_values() const = 0;
162
164 virtual mi::Uint32 get_value_size(mi::Uint32 i) const = 0;
165
170 virtual const mi::Uint32* get_value_masks() const = 0;
171
178 virtual const void* get_values(mi::Uint32 value_index) const = 0;
179};
180
181}} // namespace index / nv
182
183#endif // NVIDIA_INDEX_ICOMPUTE_H
Interface to define a compute launch request.
Definition: icompute.h:59
virtual bool is_valid() const =0
Returns true if request is valid.
virtual bool get_region_of_interest(mi::math::Bbox_struct< mi::Float32, 3 > &box) const =0
Get region of interest, returns true if region of interest is valid.
virtual mi::neuraylib::Tag_struct get_compute_program_tag() const =0
Get launch program.
virtual void set_launch(mi::neuraylib::Tag_struct xac_compute_program_tag, mi::neuraylib::Tag_struct data_write_target_tag)=0
Specify compute program and target for both data write and compute.
virtual mi::neuraylib::Tag_struct get_compute_target_tag() const =0
Get compute target.
virtual void set_launch(mi::neuraylib::Tag_struct xac_compute_program_tag, mi::neuraylib::Tag_struct xac_compute_target_tag, mi::neuraylib::Tag_struct data_write_target_tag)=0
Specify compute program and separate targets for data write and compute.
virtual void set_region_of_interest(const mi::math::Bbox_struct< mi::Float32, 3 > &box)=0
Set region of interest in the datasets local coordinate system.
virtual mi::neuraylib::Tag_struct get_data_write_target_tag() const =0
Get data write target.
Interface to parameters of a compute plane.
Definition: icompute.h:120
virtual mi::Uint32 get_value_size(mi::Uint32 i) const =0
Get the byte size of value i.
virtual mi::math::Vector_struct< mi::Uint32, 2 > get_resolution() const =0
Get the specified resolution.
virtual mi::Uint32 get_nb_values() const =0
Get the number of values specified.
virtual bool set_value_sizes(const mi::Uint32 *value_sizes, mi::Uint32 nb_values)=0
Define the format of compute values.
virtual void set_resolution(const mi::math::Vector_struct< mi::Uint32, 2 > &res)=0
Define surface parameterization of the plane. This specifies the resolution of the 2D result buffer.
Interface to compute results from a compute plane target.
Definition: icompute.h:150
virtual mi::math::Vector_struct< mi::Uint32, 2 > get_offset() const =0
Get offset of this buffer inside the total resolution of ICompute_plane_parameters.
virtual mi::Uint32 get_nb_values() const =0
Get the number of values per buffer element,.
virtual mi::Uint32 get_value_size(mi::Uint32 i) const =0
Get the byte size of value i,.
virtual mi::math::Vector_struct< mi::Uint32, 2 > get_resolution() const =0
Get the resolution of this buffer.
virtual const mi::Uint32 * get_value_masks() const =0
Get value mask.
virtual const void * get_values(mi::Uint32 value_index) const =0
Get values of given value index.
Interface to access results of compute launch.
Definition: icompute.h:99
virtual bool is_valid() const =0
Return true if result is valid.
virtual const IError_set * get_error_set() const =0
Returns an instance of the error set interface IError_set containing information about the success or...
virtual IDistributed_data_access * access_compute_results() const =0
Get interface to fetch computed data.
Interface class enabling custom distributed data accesses.
Definition: idistributed_data_access.h:59
This class serves as a collection of runtime errors potentially generated during the execution of dis...
Definition: ierror.h:168
Interface to XAC compute infrastructure.
Definition: icompute.h:34
virtual ICompute_launch_request * create_launch_request()=0
Create object to specify compute launch request.
virtual const ICompute_results * perform_compute(const ICompute_launch_request *request, IIndex_rendering *index_rendering, mi::neuraylib::Tag_struct session_tag, mi::neuraylib::IDice_transaction *dice_transaction)=0
Perform a compute launch.
Enables the rendering of a user-defined session/scene.
Definition: iindex.h:771
Base class representing attributes that can be defined in a scene description.
Distributed subset interaces for a large-scale distributed datasets.
Interfaces for error feedback from the NVIDIA IndeX library runtime.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349