Showing content from https://stotko.github.io/stdgpu/doxygen/group__numeric_ga6084e7001f21bc5247e9e9cea9d6db75.html below:
transform_reduce_index — stdgpu Latest documentation
transform_reduce_index# stdgpu: stdgpu::transform_reduce_index
stdgpu Latest
Efficient STL-like Data Structures on the GPU
◆ transform_reduce_index()
template<typename IndexType , typename ExecutionPolicy , typename T , typename BinaryFunction , typename UnaryFunction , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
T stdgpu::transform_reduce_index ( ExecutionPolicy && policy, IndexType size, T init, BinaryFunction reduce, UnaryFunction f )
Calls the given unary function with an index from the range [0, size) and performs a reduction afterwards.
-
Template Parameters
-
IndexType The type of the index values ExecutionPolicy The type of the execution policy T The type of the reduced value BinaryFunction The type of the binary function for the reduction UnaryFunction The type of the unary function applied before reduction
-
Parameters
-
[in] policy The execution policy, e.g. host or device [in] size The number of indices, i.e. the upper bound of [0, size) [in] init The initial value which also participates in the reduction [in] reduce The binary function to reduce the values f(i) [in] f The unary function to call with an index i
-
Returns
-
The result of the reduction of f(i) over the index range [0, size) along with the initial value
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4