![]() |
Shamrock 2025.10.0
Astrophysical Code
|
namespace containing the numeric algorithms of shamalgs More...
Classes | |
| struct | BinnedCompute |
| Structure holding the result of binning values for further computation. More... | |
| struct | histogram_result |
Functions | |
| template<class T > | |
| sycl::buffer< T > | scan_exclusive (sycl::queue &q, sycl::buffer< T > &buf1, u32 len) |
| Computes the exclusive sum of elements in a SYCL buffer. | |
| template<class T > | |
| sham::DeviceBuffer< T > | scan_exclusive (sham::DeviceScheduler_ptr sched, sham::DeviceBuffer< T > &buf1, u32 len) |
| Compute the exclusive sum of a buffer on the device. | |
| template<class T > | |
| sycl::buffer< T > | scan_inclusive (sycl::queue &q, sycl::buffer< T > &buf1, u32 len) |
| template<class T > | |
| void | scan_exclusive_in_place (sycl::queue &q, sycl::buffer< T > &buf, u32 len) |
| template<class T > | |
| void | scan_inclusive_in_place (sycl::queue &q, sycl::buffer< T > &buf, u32 len) |
| std::tuple< std::optional< sycl::buffer< u32 > >, u32 > | stream_compact (sycl::queue &q, sycl::buffer< u32 > &buf_flags, u32 len) |
| Stream compaction algorithm. | |
| sham::DeviceBuffer< u32 > | stream_compact (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< u32 > &buf_flags, u32 len) |
| Stream compaction algorithm. | |
| template<class Tret , class T > | |
| sham::DeviceBuffer< Tret > | device_histogram (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| Compute the histogram of values between bin_edges. | |
| template<class T > | |
| sham::DeviceBuffer< u64 > | device_histogram_u64 (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| template<class T > | |
| sham::DeviceBuffer< u32 > | device_histogram_u32 (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| template<class T > | |
| histogram_result< T > | device_histogram_full (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| Compute the histogram and bin properties (center, width) for a set of values and bin edges. | |
| template<class T > | |
| BinnedCompute< T > | binned_init_compute (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len) |
| Prepare binned data for per-bin computation. | |
| template<class Tret , class T , class Fct > | |
| sham::DeviceBuffer< Tret > | binned_compute (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len, Fct &&fct) |
| Perform a custom reduction or computation over values in each bin. | |
| template<class T > | |
| sham::DeviceBuffer< T > | binned_sum (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len) |
| Compute the sum of values in each bin. | |
| template<class T > | |
| sham::DeviceBuffer< T > | binned_average (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len) |
| Compute the average of values in each bin. | |
| template<class Tret , class T > | |
| sham::DeviceBuffer< Tret > | device_histogram_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| Compute the histogram of values between bin_edges across all MPI ranks. | |
| template<class T > | |
| sham::DeviceBuffer< u64 > | device_histogram_u64_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| Compute the u64 histogram of values between bin_edges across all MPI ranks. | |
| template<class T > | |
| sham::DeviceBuffer< u32 > | device_histogram_u32_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| Compute the u32 histogram of values between bin_edges across all MPI ranks. | |
| template<class T > | |
| sham::DeviceBuffer< T > | binned_sum_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len) |
| Compute the sum of values in each bin across all MPI ranks. | |
| template<class T > | |
| sham::DeviceBuffer< T > | binned_average_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len, const sham::DeviceBuffer< u32 > &bin_counts_global) |
| Compute the average of values in each bin across all MPI ranks (with pre-computed global counts). | |
| template<class T > | |
| sham::DeviceBuffer< T > | binned_average_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, const sham::DeviceBuffer< T > &keys, u32 len) |
| Compute the average of values in each bin across all MPI ranks. | |
| template<class T > | |
| histogram_result< T > | device_histogram_full_mpi (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< T > &bin_edges, u64 nbins, const sham::DeviceBuffer< T > &values, u32 len) |
| Compute the histogram and bin properties (center, width) for a set of values and bin edges. | |
| template sycl::buffer< u32 > | scan_exclusive (sycl::queue &q, sycl::buffer< u32 > &buf1, u32 len) |
| template sham::DeviceBuffer< u32 > | scan_exclusive (sham::DeviceScheduler_ptr sched, sham::DeviceBuffer< u32 > &buf1, u32 len) |
| template sycl::buffer< u32 > | scan_inclusive (sycl::queue &q, sycl::buffer< u32 > &buf1, u32 len) |
| template void | scan_exclusive_in_place (sycl::queue &q, sycl::buffer< u32 > &buf1, u32 len) |
| template void | scan_inclusive_in_place (sycl::queue &q, sycl::buffer< u32 > &buf1, u32 len) |
| template sham::DeviceBuffer< u64 > | device_histogram< u64, f64 > (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< f64 > &bin_edges, u64 nbins, const sham::DeviceBuffer< f64 > &values, u32 len) |
| template sham::DeviceBuffer< u64 > | device_histogram< u64, f32 > (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< f32 > &bin_edges, u64 nbins, const sham::DeviceBuffer< f32 > &values, u32 len) |
| template sham::DeviceBuffer< u32 > | device_histogram< u32, f64 > (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< f64 > &bin_edges, u64 nbins, const sham::DeviceBuffer< f64 > &values, u32 len) |
| template sham::DeviceBuffer< u32 > | device_histogram< u32, f32 > (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< f32 > &bin_edges, u64 nbins, const sham::DeviceBuffer< f32 > &values, u32 len) |
| template BinnedCompute< f64 > | binned_init_compute (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< f64 > &bin_edges, u64 nbins, const sham::DeviceBuffer< f64 > &values, const sham::DeviceBuffer< f64 > &keys, u32 len) |
| template BinnedCompute< f32 > | binned_init_compute (const sham::DeviceScheduler_ptr &sched, const sham::DeviceBuffer< f32 > &bin_edges, u64 nbins, const sham::DeviceBuffer< f32 > &values, const sham::DeviceBuffer< f32 > &keys, u32 len) |
namespace containing the numeric algorithms of shamalgs
| sham::DeviceBuffer< T > shamalgs::numeric::binned_average | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len | ||
| ) |
Compute the average of values in each bin.
This function calculates the average of all values in each bin, using the keys to assign values to bins. It returns a buffer containing the average for each bin.
| T | The data type of the values and keys. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). |
| nbins | The number of bins. |
| values | The values to be averaged (e.g., f(r)). |
| keys | The keys used for binning (e.g., r). |
| len | The number of elements in values/keys. |
Example:
Definition at line 411 of file numeric.hpp.
| sham::DeviceBuffer< T > shamalgs::numeric::binned_average_mpi | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len | ||
| ) |
Compute the average of values in each bin across all MPI ranks.
This function computes the global binned average across all MPI ranks. It first computes the global histogram counts using the keys, then computes the global binned sum, and finally divides the sums by the counts to obtain the averages. This is a convenience function that automatically computes the global bin counts.
| T | The data type of the values, keys, and bin edges. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order and identical across all ranks. |
| nbins | The number of bins. |
| values | The local values for this rank to be averaged (e.g., f(r)). |
| keys | The local keys for this rank used for binning (e.g., r). |
| len | The number of elements in local values/keys arrays. |
Example:
If rank 0 has keys={0.5,1.5}, values={10,30} and rank 1 has keys={0.3,1.7}, values={20,10} with bin_edges={0.0,1.0,2.0}, the result={15,20} ((10+20)/2 in bin 0, (30+10)/2 in bin 1)
Definition at line 723 of file numeric.hpp.
Here is the call graph for this function:| sham::DeviceBuffer< T > shamalgs::numeric::binned_average_mpi | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len, | ||
| const sham::DeviceBuffer< u32 > & | bin_counts_global | ||
| ) |
Compute the average of values in each bin across all MPI ranks (with pre-computed global counts).
This function computes the global binned average using pre-computed global bin counts. It first computes the global binned sum across all MPI ranks and then divides by the provided global counts to obtain the average. This variant is useful when the global bin counts are already known or computed separately.
| T | The data type of the values, keys, and bin edges. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order and identical across all ranks. |
| nbins | The number of bins. |
| values | The local values for this rank to be averaged (e.g., f(r)). |
| keys | The local keys for this rank used for binning (e.g., r). |
| len | The number of elements in local values/keys arrays. |
| bin_counts_global | The global counts for each bin across all ranks. |
Example:
Definition at line 659 of file numeric.hpp.
Here is the call graph for this function:| sham::DeviceBuffer< Tret > shamalgs::numeric::binned_compute | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len, | ||
| Fct && | fct | ||
| ) |
Perform a custom reduction or computation over values in each bin.
This function applies a user-provided function to all values in each bin, allowing for flexible per-bin reductions (e.g., sum, mean, min, max, etc.).
| T | The data type of the values and keys. |
| Tret | The return type of the per-bin computation. |
| Fct | The type of the function to apply per bin. The function should have the signature: Tret f(for_each_values, u32 bin_count) where for_each_values is a callable that applies a function to each value in the bin. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). |
| nbins | The number of bins. |
| values | The values to be binned (e.g., f(r)). |
| keys | The keys used for binning (e.g., r). |
| len | The number of elements in values/keys. |
| fct | The function to apply to each bin's values. |
Example (per-bin sum):
Definition at line 296 of file numeric.hpp.
Here is the call graph for this function:| BinnedCompute< T > shamalgs::numeric::binned_init_compute | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len | ||
| ) |
Prepare binned data for per-bin computation.
Filters and sorts the input values and keys into bins defined by bin_edges, returning the valid values and the offsets for each bin. This is useful for custom per-bin reductions or statistics.
| T | The data type of the values and keys. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). |
| nbins | The number of bins. |
| values | The values to be binned (e.g., f(r)). |
| keys | The keys used for binning (e.g., r). |
| len | The number of elements in values/keys. |
Example:
Definition at line 183 of file numeric.cpp.
Here is the call graph for this function:| sham::DeviceBuffer< T > shamalgs::numeric::binned_sum | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len | ||
| ) |
Compute the sum of values in each bin.
This function computes the sum of all values in each bin, using the keys to assign values to bins.
| T | The data type of the values and keys. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). |
| nbins | The number of bins. |
| values | The values to be summed (e.g., f(r)). |
| keys | The keys used for binning (e.g., r). |
| len | The number of elements in values/keys. |
Example:
Definition at line 366 of file numeric.hpp.
| sham::DeviceBuffer< T > shamalgs::numeric::binned_sum_mpi | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| const sham::DeviceBuffer< T > & | keys, | ||
| u32 | len | ||
| ) |
Compute the sum of values in each bin across all MPI ranks.
This function computes the local binned sum on each MPI rank and then performs an MPI reduction to sum the results across all ranks, producing the global binned sum. Each rank processes its own subset of keys and values, and the final result contains the combined sums from all processes.
| T | The data type of the values, keys, and bin edges. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order and identical across all ranks. |
| nbins | The number of bins. |
| values | The local values for this rank to be summed (e.g., f(r)). |
| keys | The local keys for this rank used for binning (e.g., r). |
| len | The number of elements in local values/keys arrays. |
Example:
If rank 0 has keys={0.5,1.5}, values={10,20} and rank 1 has keys={0.3,1.7}, values={5,15} with bin_edges={0.0,1.0,2.0}, the result={15,35} (10+5 in bin 0, 20+15 in bin 1)
Definition at line 606 of file numeric.hpp.
Here is the call graph for this function:| sham::DeviceBuffer< Tret > shamalgs::numeric::device_histogram | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| u32 | len | ||
| ) |
Compute the histogram of values between bin_edges.
This function computes the histogram of the input values, counting how many values fall into each bin defined by the bin_edges array. Only values within [bin_edges[0], bin_edges[nbins]) are counted; values outside this range are ignored.
| T | The data type of the values and bin edges (e.g., float, double). |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order. |
| nbins | The number of bins (must be > 0, nbins = bin_edges.size() - 1). |
| values | The values to compute the histogram on. |
| len | The length of the values array. |
Example:
bin_edges = {0.0, 1.0, 2.0, 3.0, 4.0} (4 bins: [0,1), [1,2), [2,3), [3,4)) values = {0.5, 1.5, 2.5, 3.5, 2.1, 1.9, 0.1, 3.9} result = {2, 2, 2, 2}
Definition at line 95 of file numeric.cpp.
Here is the call graph for this function:| histogram_result< T > shamalgs::numeric::device_histogram_full | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| u32 | len | ||
| ) |
Compute the histogram and bin properties (center, width) for a set of values and bin edges.
This function returns the histogram counts, the center of each bin, and the width of each bin.
| T | The data type of the values and bin edges. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). |
| nbins | The number of bins. |
| values | The values to compute the histogram on. |
| len | The length of the values array. |
Definition at line 174 of file numeric.hpp.
Here is the call graph for this function:| histogram_result< T > shamalgs::numeric::device_histogram_full_mpi | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| u32 | len | ||
| ) |
Compute the histogram and bin properties (center, width) for a set of values and bin edges.
This function returns the histogram counts, the center of each bin, and the width of each bin.
| T | The data type of the values and bin edges. |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). |
| nbins | The number of bins. |
| values | The values to compute the histogram on. |
| len | The length of the values array. |
Definition at line 753 of file numeric.hpp.
Here is the call graph for this function:| sham::DeviceBuffer< Tret > shamalgs::numeric::device_histogram_mpi | ( | const sham::DeviceScheduler_ptr & | sched, |
| const sham::DeviceBuffer< T > & | bin_edges, | ||
| u64 | nbins, | ||
| const sham::DeviceBuffer< T > & | values, | ||
| u32 | len | ||
| ) |
Compute the histogram of values between bin_edges across all MPI ranks.
This function computes the local histogram on each MPI rank and then performs an MPI reduction to sum the counts across all ranks, producing the global histogram. Each rank processes its own subset of data, and the final result contains the combined counts from all processes.
| Tret | The data type for the return counts (e.g., u32, u64). |
| T | The data type of the values and bin edges (e.g., float, double). |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order and identical across all ranks. |
| nbins | The number of bins (must be > 0, nbins = bin_edges.size() - 1). |
| values | The local values for this rank to compute the histogram on. |
| len | The length of the local values array. |
Example:
If rank 0 has values = {0.5, 1.5} and rank 1 has values = {2.5, 3.5} with bin_edges = {0.0, 1.0, 2.0, 3.0, 4.0}, the result = {1, 1, 1, 1}
Definition at line 475 of file numeric.hpp.
|
inline |
Definition at line 149 of file numeric.hpp.
|
inline |
Compute the u32 histogram of values between bin_edges across all MPI ranks.
Convenience wrapper for device_histogram_mpi with u32 return type. This function computes the local histogram on each MPI rank and then performs an MPI reduction to sum the counts across all ranks, producing the global histogram with 32-bit unsigned integer counts.
| T | The data type of the values and bin edges (e.g., float, double). |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order and identical across all ranks. |
| nbins | The number of bins (must be > 0, nbins = bin_edges.size() - 1). |
| values | The local values for this rank to compute the histogram on. |
| len | The length of the local values array. |
Example:
Definition at line 561 of file numeric.hpp.
|
inline |
Definition at line 139 of file numeric.hpp.
|
inline |
Compute the u64 histogram of values between bin_edges across all MPI ranks.
Convenience wrapper for device_histogram_mpi with u64 return type. This function computes the local histogram on each MPI rank and then performs an MPI reduction to sum the counts across all ranks, producing the global histogram with 64-bit unsigned integer counts.
| T | The data type of the values and bin edges (e.g., float, double). |
| sched | The device scheduler to run on. |
| bin_edges | The edges of the bins (length == nbins + 1). Must be sorted in ascending order and identical across all ranks. |
| nbins | The number of bins (must be > 0, nbins = bin_edges.size() - 1). |
| values | The local values for this rank to compute the histogram on. |
| len | The length of the local values array. |
Example:
Definition at line 521 of file numeric.hpp.
| sham::DeviceBuffer< T > shamalgs::numeric::scan_exclusive | ( | sham::DeviceScheduler_ptr | sched, |
| sham::DeviceBuffer< T > & | buf1, | ||
| u32 | len | ||
| ) |
Compute the exclusive sum of a buffer on the device.
| sched | The scheduler to use for the computation |
| buf1 | The buffer to sum |
| len | The length of the sum |
Definition at line 48 of file numeric.cpp.
| sycl::buffer< T > shamalgs::numeric::scan_exclusive | ( | sycl::queue & | q, |
| sycl::buffer< T > & | buf1, | ||
| u32 | len | ||
| ) |
Computes the exclusive sum of elements in a SYCL buffer.
| T | The data type of elements in the buffer. |
| q | The SYCL queue to use for computation. |
| buf1 | The input buffer whose exclusive sum is to be computed. |
| len | The number of elements in the buffer. |
Definition at line 35 of file numeric.cpp.
| void shamalgs::numeric::scan_exclusive_in_place | ( | sycl::queue & | q, |
| sycl::buffer< T > & | buf, | ||
| u32 | len | ||
| ) |
Definition at line 67 of file numeric.cpp.
| sycl::buffer< T > shamalgs::numeric::scan_inclusive | ( | sycl::queue & | q, |
| sycl::buffer< T > & | buf1, | ||
| u32 | len | ||
| ) |
Definition at line 62 of file numeric.cpp.
| void shamalgs::numeric::scan_inclusive_in_place | ( | sycl::queue & | q, |
| sycl::buffer< T > & | buf, | ||
| u32 | len | ||
| ) |
Definition at line 72 of file numeric.cpp.
| sham::DeviceBuffer< u32 > shamalgs::numeric::stream_compact | ( | const sham::DeviceScheduler_ptr & | sched, |
| sham::DeviceBuffer< u32 > & | buf_flags, | ||
| u32 | len | ||
| ) |
Stream compaction algorithm.
| sched | the device scheduler to run on |
| buf_flags | buffer of only 0 and ones |
| len | the length of the buffer considered |
Definition at line 89 of file numeric.cpp.
| std::tuple< std::optional< sycl::buffer< u32 > >, u32 > shamalgs::numeric::stream_compact | ( | sycl::queue & | q, |
| sycl::buffer< u32 > & | buf_flags, | ||
| u32 | len | ||
| ) |
Stream compaction algorithm.
| q | the queue to run on |
| buf_flags | buffer of only 0 and ones |
| len | the length of the buffer considered |
Definition at line 84 of file numeric.cpp.