Allows passing values that are not yet known at launch time as paramters to device algorithms.
More...
template<typename T, typename Iter = T*>
class future_value< T, Iter >
Allows passing values that are not yet known at launch time as paramters to device algorithms.
- Note
- It is the users responsibility to ensure that value is available when the algorithm executes. This can be guaranteed with stream dependencies or explicit external synchronization.
int* intermediate_result = nullptr;
hipMalloc(reinterpret_cast<void**>(&intermediate_result), sizeof(intermediate_result));
hipLaunchKernelGGL(compute_intermediate, blocks, threads, 0, stream, arg1, arg2, itermediate_result);
const auto initial_value = rocprim::future_value<int>{intermediate_result};
storage_size,
input,
output,
initial_value,
size);
hipFree(intermediate_result)
- Template Parameters
-