Distributed data storage class for sparse volume subsets. More...
#include <isparse_volume_subset.h>
Inherits mi::base::Interface_declare< 0x1dfa0274, ... >.
Classes | |
struct | Data_brick_buffer_info |
Definition of internal buffer information. More... | |
Public Types | |
enum | Data_transformation { DATA_TRANSFORMATION_NONE = 0 , DATA_TRANSFORMATION_FLIP_AXIS_ORDER = 1 } |
Transformation that should be applied on the written data. More... | |
enum | Data_brick_state |
Definition of the state of a data-brick in the subset. More... | |
enum | Sub_data_gen_flags { SUB_DATA_GEN_DEFAULT = 0x00u , SUB_DATA_GEN_INCLUDE_BORDER_VOXELS = 0x01u , SUB_DATA_GEN_NO_CLIP_REQUEST_VOLUME = 0x02u } |
Flags used for specifying the data generation process. More... | |
Public Member Functions | |
virtual const ISparse_volume_attribute_set_descriptor * | get_attribute_set_descriptor () const =0 |
Returns the attribute-set descriptor of the subset. More... | |
virtual const ISparse_volume_subset_data_descriptor * | get_subset_data_descriptor () const =0 |
Returns the data subset descriptor of the subset. More... | |
virtual bool | write_brick_data (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, const void *src_values, mi::Sint32 gpu_device_id, Data_transformation brick_data_transform=DATA_TRANSFORMATION_NONE)=0 |
Write a volume-data brick to the subset from a memory block in main memory. More... | |
virtual bool | write_brick_data (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, const mi::neuraylib::IRDMA_buffer *src_rdma_buffer, Data_transformation brick_data_transform=DATA_TRANSFORMATION_NONE)=0 |
Write a volume-data brick to the subset from a IRDMA_buffer . More... | |
virtual bool | write_brick_data_multiple (const mi::Uint32 *brick_subset_indices, const mi::Uint32 *brick_attrib_indices, mi::Uint32 nb_input_bricks, const mi::Size *src_rdma_buffer_offsets, const mi::neuraylib::IRDMA_buffer *src_rdma_buffer, Data_transformation brick_data_transform=DATA_TRANSFORMATION_NONE)=0 |
Write multiple volume-data bricks to the subset from a single IRDMA_buffer . More... | |
virtual const Data_brick_buffer_info | access_brick_data_buffer (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx)=0 |
Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations. More... | |
virtual const Data_brick_buffer_info | access_brick_data_buffer (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx) const =0 |
Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations. More... | |
virtual mi::neuraylib::IRDMA_buffer * | access_brick_data_buffer_rdma (mi::neuraylib::IRDMA_context *rdma_ctx, mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx)=0 |
Creates an RDMA buffer that is a wrapper for the internal buffer. More... | |
virtual bool | set_brick_homogeneous_value (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, const void *brick_homog_value)=0 |
Write a single homogeneous value for a volume-data brick to the subset from a memory block in main memory. More... | |
virtual bool | set_background_value (mi::Uint32 attrib_idx, const void *background_value)=0 |
Set a background value used in volume areas not covered by voxel or homogeneous brick data. More... | |
virtual void | set_brick_state (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, Data_brick_state brick_state)=0 |
Explicitly set the state of a data-brick in the subset. More... | |
virtual Data_brick_state | get_brick_state (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx) const =0 |
Query the state of a data-brick in the subset. 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 a data subset. More... | |
virtual IVolume_device_data_buffer * | allocate_volume_sub_data_device (mi::Uint32 subdata_attrib_idx, mi::math::Vector_struct< mi::Sint32, 3 > subdata_position, mi::math::Vector_struct< mi::Uint32, 3 > subdata_extent, mi::Uint32 subdata_flags=SUB_DATA_GEN_DEFAULT) const =0 |
Generating a volume data buffer for use by the application. More... | |
virtual bool | fill_volume_sub_data_buffer (IVolume_device_data_buffer *subdata_volume_buffer) const =0 |
Fill a volume data buffer with subset-volume data for use by the application. More... | |
virtual bool | write_from_volume_sub_data_buffer (const IVolume_device_data_buffer *subdata_volume_buffer) const =0 |
Write back volume date from a volume data buffer. More... | |
Distributed data storage class for sparse volume subsets.
The data import for sparse volume data associated with ISparse_volume_scene_element
instances using NVIDIA IndeX is performed through instances of this subset class. A subset of a sparse volume is defined by all the volume-data bricks associated with a rectangular subregion of the entire scene/dataset. This interface class provides methods to input volume data for one or multiple attributes of a dataset.
Definition of the state of a data-brick in the subset.
Data-bricks are empty by default. They can be set to a filled state, meaning that they are filled with voxel data, or homogeneous state, which means that they do not explicitly store voxel data but are defined by a constant value.
|
pure virtual |
Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations.
ISparse_volume_subset
implementation untouched.[in] | brick_subset_idx | Volume-data brick subset index for which to query internal buffer. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to query the internal buffer information |
Internal_buffer_info
describing the internal buffer data for direct use.
|
pure virtual |
Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations.
[in] | brick_subset_idx | Volume-data brick subset index for which to query internal buffer. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to query the internal buffer information |
Internal_buffer_info
describing the internal buffer data for direct use.
|
pure virtual |
Creates an RDMA buffer that is a wrapper for the internal buffer.
[in] | rdma_ctx | The RDMA context used for wrapping the internal buffer. |
[in] | brick_subset_idx | Volume-data brick subset index for which to query internal buffer. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to query the internal buffer information |
|
pure virtual |
Generating a volume data buffer for use by the application.
[in] | subdata_attrib_idx | The attribute index. |
[in] | subdata_position | The position as an anchor that specifies a request bounding box together with the extent. |
[in] | subdata_extent | The extent that specifies a request bounding box together with the position. |
[in] | subdata_flags | Flags specifying a generation mode. |
IVolume_device_data_buffer
interface implementation.
|
pure virtual |
Fill a volume data buffer with subset-volume data for use by the application.
[in] | subdata_volume_buffer | The volume data buffer to fill. |
|
pure virtual |
Returns the attribute-set descriptor of the subset.
|
pure virtual |
Query the state of a data-brick in the subset.
[in] | brick_subset_idx | Volume-data brick subset index for which to query the state. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to query the state. |
|
pure virtual |
Returns the data subset descriptor of the subset.
|
pure virtual |
This method allows to load a compact cache file of a data subset.
[in] | input_filename | The file name of the cache file to be loaded. |
true
if the cache file import was successful.
|
pure virtual |
Set a background value used in volume areas not covered by voxel or homogeneous brick data.
The default background value is a zero value according to the attributes voxel format.
[in] | attrib_idx | The attribute index of the volume for which to set the background value. |
[in] | background_value | Pointer to source value of background value that will be written to this data-subset. |
|
pure virtual |
Write a single homogeneous value for a volume-data brick to the subset from a memory block in main memory.
The passed value pointer needs to match the type and size of the attribute voxel-format.
[in] | brick_subset_idx | Volume-data brick subset index for which to write homogeneous data value. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to write homogeneous data value. |
[in] | brick_homog_value | Pointer to source value of homogeneous data value that will be written to this data-subset. |
|
pure virtual |
Explicitly set the state of a data-brick in the subset.
[in] | brick_subset_idx | Volume-data brick subset index for which to set the state. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to set the state. |
[in] | brick_state | The state to set for the selected data-brick. |
|
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.
[in] | output_filename | The file name for the data subset memory dump. |
true
if the memory dump was successful.
|
pure virtual |
Write a volume-data brick to the subset from a IRDMA_buffer
.
IRDMA_buffer
can be located either in CPU or GPU memory. If a GPU-memory buffer is passed additional memory copy operations may occur.[in] | brick_subset_idx | Volume-data brick subset index for which to write voxel data. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to write voxel data. |
[in] | src_rdma_buffer | Source RDMA buffer of voxel values that will be written to this data-subset buffer. |
[in] | brick_data_transform | Transformation to apply to the data that is written |
|
pure virtual |
Write a volume-data brick to the subset from a memory block in main memory.
[in] | brick_subset_idx | Volume-data brick subset index for which to write voxel data. |
[in] | brick_attrib_idx | The attribute index of the volume-data brick for which to write voxel data. |
[in] | src_values | Source array of voxel 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] | brick_data_transform | Transformation to apply to the data that is written |
true
if the write operation was successful and false
otherwise.
|
pure virtual |
Write multiple volume-data bricks to the subset from a single IRDMA_buffer
.
The packing of the volume-data bricks to be written from the IRDMA_buffer
is defined in the passed src_rdma_buffer_offsets
parameter. If this parameter is 0, the volume sub-blocks need to be tightly packed after each other in the source buffer.
IRDMA_buffer
can be located either in CPU or GPU memory. If a GPU-memory buffer is passed additional memory copy operations may occur.[in] | brick_subset_indices | Subset volume-data brick indices for which to write voxel data. |
[in] | brick_attrib_indices | The attribute indices of the volume-data bricks for which to write voxel data. |
[in] | nb_input_bricks | The number of dst_range bounding boxes. |
[in] | src_rdma_buffer_offsets | Array defining the offsets of the individual volume sub-blocks in the linear source buffer. These offsets need to be defined as numbers of typed elements according the voxel type of the volume brick. If this parameter is 0, the offsets will be derived from the dst_ranges parameter assuming a tight packing of the volume sub-blocks in the source buffer. |
[in] | src_rdma_buffer | Source RDMA buffer of voxel values that will be written to this subset buffer. |
[in] | brick_data_transform | Transformation to apply to the data that is written |
true
if the write operation was successful and false
otherwise.
|
pure virtual |
Write back volume date from a volume data buffer.
[in] | subdata_volume_buffer | The volume data buffer to fill. |