cuda::experimental::stf::to_tuple#

template<typename Array>
auto cuda::experimental::stf::to_tuple(
Array &&array,
)#

Converts an array-like object (such as an std::array) to an std::tuple.

This function template takes an array-like object and returns a tuple containing the same elements. If the input array has a size of zero, an empty tuple is returned.

Example usage:

std::array<int, 3> arr = {1, 2, 3};
auto t = to_tuple(arr); // t is a std::tuple<int, int, int>

Template Parameters:

Array – Type of the array-like object. Must have std::tuple_size_v<Array> specialization.

Parameters:

array – The array-like object to be converted to a tuple.

Returns:

A tuple containing the elements of the input array.