rocPRIM
Public Member Functions | Public Attributes | List of all members
detail::temp_storage::linear_partition< Ts > Struct Template Reference

A partition that represents a linear sequence of sub-partitions. More...

#include <temp_storage.hpp>

Public Member Functions

 linear_partition (Ts... sub_partitions)
 Constructor.
 
layout get_layout ()
 Compute the required layout for this type and return it.
 
void set_storage (void *const storage)
 Assigns the final storage for this partition. More...
 

Public Attributes

::rocprim::tuple< Ts... > sub_partitions
 The sub-partitions in this linear_partition.
 

Detailed Description

template<typename... Ts>
struct detail::temp_storage::linear_partition< Ts >

A partition that represents a linear sequence of sub-partitions.

This structure can be used to allocate multiple sub-partitions, each of which are sequentially allocated in order, and packed such that the only padding between memory of different sub-partitions is due to required alignment.

Template Parameters
Ts- The sub-partitions to allocate temporary memory for. Each should have the following member functions: layout get_layout() - Compute the required storage layout for the partition. void set_storage(void* const storage) - Update the internal destination pointer or the destination pointers of sub-partitions with the given pointer. storage has at least the required size and alignment as described by the result of get_layout().

Member Function Documentation

◆ set_storage()

template<typename... Ts>
void detail::temp_storage::linear_partition< Ts >::set_storage ( void *const  storage)
inline

Assigns the final storage for this partition.

storage is assumed to have the required alignment and size as described by the layout returned by get_layout().

Parameters
storage- Base pointer to the storage to be used for this partition.

The documentation for this struct was generated from the following file: