Open3D (C++ API)
Functions
open3d::ml::detail Namespace Reference

Functions

template<class T >
void ReduceSubarraysSumCPU (const T *const values, const size_t values_size, const int64_t *const prefix_sum, const size_t prefix_sum_size, T *out_sums)
 

Function Documentation

◆ ReduceSubarraysSumCPU()

template<class T >
void open3d::ml::detail::ReduceSubarraysSumCPU ( const T *const  values,
const size_t  values_size,
const int64_t *const  prefix_sum,
const size_t  prefix_sum_size,
T *  out_sums 
)

Reduces subarrays in linear memory with the sum operation. The sum for empty subarrays is 0.

Parameters
valuesThe linear array with all values
values_sizeNumber of elements of values
prefix_sumThe exclusive prefix sum of the number of elements for each array
prefix_sum_sizeThe number of subarrays
out_sumsThe preallocated output array with size prefix_sum_size