Distributed data storage class for height-field subsets.
More...
#include <iheight_field_subset.h>
Inherits mi::base::Interface_declare< 0xe6fc895a, ... >.
|
virtual const IHeight_field_subset_data_descriptor * | get_subset_data_descriptor () const =0 |
| Returns the data descriptor of the subset. More...
|
|
virtual bool | write_tile_data (mi::Uint32 tile_subset_idx, const void *src_values, mi::Sint32 gpu_device_id, Data_transformation tile_data_transform=DATA_TRANSFORMATION_NONE)=0 |
| Write a height-field data tile to the subset from a memory block in main memory. More...
|
|
virtual bool | write_tile_data (mi::Uint32 tile_subset_idx, const mi::neuraylib::IRDMA_buffer *src_rdma_buffer, Data_transformation tile_data_transform=DATA_TRANSFORMATION_NONE)=0 |
| Write a height-field data tile to the subset from a IRDMA_buffer . More...
|
|
virtual bool | write_tile_data_multiple (const mi::Uint32 *tile_subset_indices, mi::Uint32 nb_input_tiles, const mi::Size *src_rdma_buffer_offsets, const mi::neuraylib::IRDMA_buffer *src_rdma_buffer, Data_transformation tile_data_transform=DATA_TRANSFORMATION_NONE)=0 |
| Write multiple height-field data tiles to the subset from a single IRDMA_buffer . More...
|
|
virtual const Data_tile_buffer_info | access_tile_data_buffer (mi::Uint32 tile_subset_idx)=0 |
| Query the internal buffer information of the data-subset instance for a height-field data tile in otder to gain access to the internal buffer-data for direct write operations. More...
|
|
virtual const Data_tile_buffer_info | access_tile_data_buffer (mi::Uint32 tile_subset_idx) const =0 |
| Query the internal buffer information of the data-subset instance for a height-field data tile in otder to gain access to the internal buffer-data for direct write operations. More...
|
|
virtual mi::neuraylib::IRDMA_buffer * | access_tile_data_buffer_rdma (mi::neuraylib::IRDMA_context *rdma_ctx, mi::Uint32 tile_subset_idx)=0 |
| Creates an RDMA buffer that is a wrapper for of the internal buffer. More...
|
|
virtual bool | store_internal_data_representation (const char *output_filename) const =0 |
| This method allows to write a compact cache file of successfully loaded subset data to the file system for more efficient future loading operations. More...
|
|
virtual bool | load_internal_data_representation (const char *input_filename)=0 |
| This method allows to load a compact cache file of successfully loaded subset data to the file system for more efficient future loading operations. More...
|
|
|
static mi::Float32 | get_hole_value () |
| Returns the height value that encodes a hole in the heightfield data. More...
|
|
static bool | is_hole (mi::Float32 height) |
| Returns whether the given height value represent a hole in the heightfield. More...
|
|
Distributed data storage class for height-field subsets.
The data import for height-field data associated with IHeight_field_scene_element
instances using NVIDIA IndeX is performed through instances of this subset class. A subset of a height field is defined by all the height-field data tiles associated with a rectangular subregion of the entire scene/dataset. This interface class provides methods to input tile data for one or multiple attributes of a dataset.
◆ Data_transformation
Transformation that should be applied on the written data.
- Note
- Experimental, subject to change!
Enumerator |
---|
DATA_TRANSFORMATION_NONE | Pass through unchanged.
|
◆ access_tile_data_buffer() [1/2]
virtual const Data_tile_buffer_info nv::index::IHeight_field_subset::access_tile_data_buffer |
( |
mi::Uint32 |
tile_subset_idx | ) |
const |
|
pure virtual |
Query the internal buffer information of the data-subset instance for a height-field data tile in otder to gain access to the internal buffer-data for direct write operations.
- Note
- The const-qualifier of the interface method's signature leaves the instance of an implemented
IHeight_field_subset
interface untouched.
- Parameters
-
[in] | tile_subset_idx | The height-field data tile subset index for which to query internal buffer. |
- Returns
- An instance of
Internal_buffer_info
describing the internal buffer data for direct use.
◆ access_tile_data_buffer() [2/2]
virtual const Data_tile_buffer_info nv::index::IHeight_field_subset::access_tile_data_buffer |
( |
mi::Uint32 |
tile_subset_idx | ) |
|
|
pure virtual |
Query the internal buffer information of the data-subset instance for a height-field data tile in otder to gain access to the internal buffer-data for direct write operations.
- Parameters
-
[in] | tile_subset_idx | The height-field data tile subset index for which to query internal buffer. |
- Returns
- An instance of
Internal_buffer_info
describing the internal buffer data for direct use.
◆ access_tile_data_buffer_rdma()
virtual mi::neuraylib::IRDMA_buffer * nv::index::IHeight_field_subset::access_tile_data_buffer_rdma |
( |
mi::neuraylib::IRDMA_context * |
rdma_ctx, |
|
|
mi::Uint32 |
tile_subset_idx |
|
) |
| |
|
pure virtual |
Creates an RDMA buffer that is a wrapper for of the internal buffer.
- Parameters
-
[in] | rdma_ctx | The RDMA context used for wrapping the internal buffer. |
[in] | tile_subset_idx | Height-field data tile subset index for which to query internal buffer. |
- Returns
- RDMA buffer wrapping the internal buffer data, or 0 in case of failure.
◆ get_hole_value()
static mi::Float32 nv::index::IHeight_field_subset::get_hole_value |
( |
| ) |
|
|
inlinestatic |
Returns the height value that encodes a hole in the heightfield data.
- Note
- Always use
is_hole()
to check for holes, do not compare height values with the return value of this function. Such a comparison would always fail if NaN is used, as comparing anything to NaN will always return false.
- Returns
- Height value that represents holes.
◆ get_subset_data_descriptor()
Returns the data descriptor of the subset.
◆ is_hole()
static bool nv::index::IHeight_field_subset::is_hole |
( |
mi::Float32 |
height | ) |
|
|
inlinestatic |
Returns whether the given height value represent a hole in the heightfield.
- Parameters
-
[in] | height | Heightfield height value. |
- Returns
- Returns
true
if the given height value represents a hole.
◆ load_internal_data_representation()
virtual bool nv::index::IHeight_field_subset::load_internal_data_representation |
( |
const char * |
input_filename | ) |
|
|
pure virtual |
This method allows to load a compact cache file of successfully loaded subset data to the file system for more efficient future loading operations.
- Parameters
-
[in] | input_filename | Defines the input file. |
- Note
- This API is currently not supported and will change in future releases.
◆ store_internal_data_representation()
virtual bool nv::index::IHeight_field_subset::store_internal_data_representation |
( |
const char * |
output_filename | ) |
const |
|
pure virtual |
This method allows to write a compact cache file of successfully loaded subset data to the file system for more efficient future loading operations.
- Parameters
-
[in] | output_filename | Defines the output file. |
- Note
- This API is currently not supported and will change in future releases.
◆ write_tile_data() [1/2]
Write a height-field data tile to the subset from a IRDMA_buffer
.
- Note
- The
IRDMA_buffer
can be located either in CPU or GPU memory. If a GPU-memory buffer is passed additional memory copy operations may occur.
- Parameters
-
[in] | tile_subset_idx | height-field data tile subset index for which to write pixel data. |
[in] | src_rdma_buffer | Source RDMA buffer of pixel values that will be written to this data-subset buffer. |
[in] | tile_data_transform | Transformation to apply to the data that is written. |
- Returns
- True if the write operation was successful, false otherwise.
◆ write_tile_data() [2/2]
Write a height-field data tile to the subset from a memory block in main memory.
- Parameters
-
[in] | tile_subset_idx | Height-field data tile subset index for which to write pixel data. |
[in] | src_values | Source array of pixel values that will be written to this data-subset buffer. |
[in] | gpu_device_id | GPU device id if the passed buffer is located on a GPU device, otherwise this needs to be -1 to for a host memory buffer. |
[in] | tile_data_transform | Transformation to apply to the data that is written. |
- Returns
- True if the write operation was successful, false otherwise.
◆ write_tile_data_multiple()
virtual bool nv::index::IHeight_field_subset::write_tile_data_multiple |
( |
const mi::Uint32 * |
tile_subset_indices, |
|
|
mi::Uint32 |
nb_input_tiles, |
|
|
const mi::Size * |
src_rdma_buffer_offsets, |
|
|
const mi::neuraylib::IRDMA_buffer * |
src_rdma_buffer, |
|
|
Data_transformation |
tile_data_transform = DATA_TRANSFORMATION_NONE |
|
) |
| |
|
pure virtual |
Write multiple height-field data tiles to the subset from a single IRDMA_buffer
.
The packing of the height-field data tiles to be written from the IRDMA_buffer
is defined in the passed src_rdma_buffer_offsets
parameter. It this parameter is 0, the tile sub-blocks need to be tightly packed after each other in the source buffer.
- Note
- The
IRDMA_buffer
can be located either in CPU or GPU memory. If a GPU-memory buffer is passed additional memory copy operations may occur.
- Parameters
-
[in] | tile_subset_indices | Subset height-field data tile indices for which to write pixel data. |
[in] | nb_input_tiles | The number of dst_range bounding boxes. |
[in] | src_rdma_buffer_offsets | Array defining the offsets of the individual height-field sub-blocks in the linear source buffer. These offsets need to be defined as numbers of typed elements according the the pixel type of the height-field tiles. If this parameter is 0, the offsets will be derived from the dst_ranges parameter assuming a tight packing of the tile sub-tiles in the source buffer. |
[in] | src_rdma_buffer | Source RDMA buffer of pixel values that will be written to this subset buffer. |
[in] | tile_data_transform | Transformation to apply to the data that is written. |
- Returns
- True if the write operation was successful, false otherwise.
The documentation for this class was generated from the following file: