Data layouts#
Overview#
MPL message exchange methods come in several overloaded variants with signatures of different complexity. The most simple overloads allow to send or receive one object only, e.g., a single integer. As sending and receiving single data items would be too limiting for a message passing library, MPL introduces the concept of data layouts. Data layouts specify the memory layout of a set of objects to be sent or received (similar to derived data types in MPI). The layout may be continuous, a strided vector etc. The layouts on the sending and on the receiving sides need not to be identical but compatible, e.g., represent the same number of elements with the same types on both communication ends. See section Layouts for some usage examples of layouts.
The MPL layout classes wrap MPI generalized data types into a flexible RAII interface and inherit their semantics. See the MPI Standard for details.
Class documentation#
Data layout base class#
-
template<typename T>
class layout# Inheritence diagram for mpl::layout:
Collaboration diagram for mpl::layout:
Base class for a family of classes that describe where objects are located in memory when several objects of the same type T are exchanged in a single message.
- Template Parameters:
T – type of the objects that the layout refers to (the base element type)
Subclassed by contiguous_layout< T >, empty_layout< T >, hindexed_block_layout< T >, hindexed_layout< T >, indexed_block_layout< T >, indexed_layout< T >, iterator_layout< T >, null_layout< T >, strided_vector_layout< T >, subarray_layout< T >, vector_layout< T >
Public Functions
-
layout() = default#
Default constructor creates a layout of zero objects.
-
inline layout(const layout &l)#
Copy constructor creates a new layout that describes the same memory layout as the other one.
- Parameters:
l – the layout to copy from
-
inline layout(layout &&l) noexcept#
Move constructor creates a new layout that describes the same memory layout as the other one.
- Parameters:
l – the layout to move from
-
inline layout &operator=(const layout &l)#
Copy assignment operator creates a new layout that describes the same memory layout as the other one.
- Parameters:
l – the layout to copy from
-
inline layout &operator=(layout &&l) noexcept#
Move assignment operator creates a new layout that describes the same memory layout as the other one.
- Parameters:
l – the layout to move from
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
inline void resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true lower bound
extent – the layout’s new true extent
-
inline ~layout()#
Destroy layout.
Friends
- friend class detail::datatype_traits< layout< T > >
- friend class null_layout< T >
- friend class empty_layout< T >
- friend class contiguous_layout< T >
- friend class vector_layout< T >
- friend class strided_vector_layout< T >
- friend class indexed_layout< T >
- friend class hindexed_layout< T >
- friend class indexed_block_layout< T >
- friend class hindexed_block_layout< T >
- friend class iterator_layout< T >
- friend class subarray_layout< T >
- friend class heterogeneous_layout
-
friend absolute_data<T*> make_absolute(T*, const layout<T>&)#
Helper function for the class heterogeneous_layout.
See also
make_absolute(T *x, const layout<T> &l)
function andheterogeneous_layout
class- Template Parameters:
T – data type
- Parameters:
x – address of data
l – layout of data at address x
-
friend absolute_data<const T*> make_absolute(const T*, const layout<T>&)#
Helper function for the class heterogeneous_layout.
See also
make_absolute(const T *x, const layout<T> &l)
function andheterogeneous_layout
class- Template Parameters:
T – data type
- Parameters:
x – address of data
l – layout of data at address x
Null layout#
-
template<typename T>
class null_layout : public mpl::layout<T># Inheritence diagram for mpl::null_layout:
Collaboration diagram for mpl::null_layout:
Layout with zero elements.
See also
inherits all member methods of
layout
Note
This type corresponds to the MPI datatype
MPI_DATATYPE_NULL
. The template parameterT
is required for syntactical reasons but does not affect the class’ behaviour.- Template Parameters:
T – base element type
Public Functions
-
inline null_layout() noexcept#
default constructor
-
inline null_layout(const null_layout &l) noexcept#
copy constructor
-
inline null_layout(null_layout &&l) noexcept#
-
inline void swap(null_layout<T> &other)#
swap two instances of null_layout
Note
This a no-op, as all instances of
null_layout
are equal.
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
Empty layout#
-
template<typename T>
class empty_layout : public mpl::layout<T># Inheritence diagram for mpl::empty_layout:
Collaboration diagram for mpl::empty_layout:
Layout with zero elements.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline empty_layout()#
default constructor
-
inline empty_layout(const empty_layout &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline empty_layout(empty_layout &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
empty_layout<T> &operator=(const empty_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
empty_layout<T> &operator=(empty_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(empty_layout<T> &other)#
exchanges two empty layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
Contiguous layout#
-
template<typename T>
class contiguous_layout : public mpl::layout<T># Inheritence diagram for mpl::contiguous_layout:
Collaboration diagram for mpl::contiguous_layout:
Layout representing contiguous storage several objects.
See also
inherits all member methods of
layout
,vector_layout
,contiguous_layouts
Note
Both types
contiguous_layout
andvector_layout
represent contiguous storage.contiguous_layout
implements some additional bookkeeping as one important difference between both classes. The classvector_layout
is slightly more flexible and should be used to represent contiguous storage unless the MPL library requires the usage ofcontiguous_layout
, e.g., incommunicator::reduce
.- Template Parameters:
T – base element type
Public Functions
-
inline explicit contiguous_layout(size_t count = 0)#
constructs layout for contiguous storage several objects of type T
- Parameters:
count – number of objects
-
inline explicit contiguous_layout(size_t count, const contiguous_layout<T> &l)#
constructs layout for data with memory layout that is a homogenous sequence of some other contiguous layout
- Parameters:
count – number of layouts in sequence
l – the layout of a single element
-
inline contiguous_layout(const contiguous_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline contiguous_layout(contiguous_layout &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
inline contiguous_layout<T> &operator=(const contiguous_layout<T> &l)#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
inline contiguous_layout<T> &operator=(contiguous_layout<T> &&l) noexcept#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(contiguous_layout<T> &other)#
exchanges two contiguous layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
Friends
- friend class impl::base_communicator
- friend class communicator
- friend class contiguous_layouts< T >
Vector layout#
-
template<typename T>
class vector_layout : public mpl::layout<T># Inheritence diagram for mpl::vector_layout:
Collaboration diagram for mpl::vector_layout:
Layout representing contiguous storage several objects.
See also
inherits all member methods of
layout
,contiguous_layout
Note
Both types contiguous_layout and
vector_layout
represent contiguous storage.contiguous_layout
implements some additional bookkeeping as one important difference between both classes. The classvector_layout
is slightly more flexible and should be used to represent contiguous storage unless the MPL library requires the usage ofcontiguous_layout
, e.g., incommunicator::reduce
.- Template Parameters:
T – base element type
Public Functions
-
inline explicit vector_layout(size_t count = 0)#
constructs layout for contiguous storage several objects of type T
- Parameters:
count – number of objects
-
inline explicit vector_layout(size_t count, const layout<T> &l)#
constructs layout for data with memory layout that is a homogenous sequence of some other layout
- Parameters:
count – number of layouts in sequence
l – the layout of a single element
-
inline vector_layout(const vector_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline vector_layout(vector_layout &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
vector_layout<T> &operator=(const vector_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
vector_layout<T> &operator=(vector_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(vector_layout<T> &other)#
exchanges two contiguous layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
Strided vector layout#
-
template<typename T>
class strided_vector_layout : public mpl::layout<T># Inheritence diagram for mpl::strided_vector_layout:
Collaboration diagram for mpl::strided_vector_layout:
Layout representing uniform storage of several objects with a possibly non-unit stride between consecutive elements.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline strided_vector_layout()#
constructs a layout with no data
-
inline explicit strided_vector_layout(int count, int blocklength, int stride)#
constructs a layout with several strided objects of type T
- Parameters:
count – the number of blocks (non-negative)
blocklength – number of data elements in each block (non-negative)
stride – number or elements between start of each block
-
inline explicit strided_vector_layout(int count, int blocklength, int stride, const layout<T> &l)#
constructs a layout with several strided objects of some other layout
- Parameters:
count – the number of blocks (non-negative)
blocklength – number of data elements in each block (non-negative)
stride – number or elements between start of each block, each element having the size given by the extend of the layout given by parameter
l
l – the layout of a single element in each block
-
inline strided_vector_layout(const strided_vector_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline strided_vector_layout(strided_vector_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
strided_vector_layout<T> &operator=(const strided_vector_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
strided_vector_layout<T> &operator=(strided_vector_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(strided_vector_layout<T> &other)#
exchanges two contiguous layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
Indexed layout#
-
template<typename T>
class indexed_layout : public mpl::layout<T># Inheritence diagram for mpl::indexed_layout:
Collaboration diagram for mpl::indexed_layout:
Layout representing data in a sequence of consecutive homogenous blocks of varying lengths.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline indexed_layout()#
constructs a layout with no data
-
inline explicit indexed_layout(const parameter &par)#
constructs indexed layout for data of type
T
- Parameters:
par – parameter containing information about the layout
-
inline explicit indexed_layout(const parameter &par, const layout<T> &l)#
constructs indexed layout for data with some other layout
- Parameters:
par – parameter containing information about the layout
l – the layout of a single element
-
inline indexed_layout(const indexed_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline indexed_layout(indexed_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
indexed_layout<T> &operator=(const indexed_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
indexed_layout<T> &operator=(indexed_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(indexed_layout<T> &other)#
exchanges two indexed layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
class parameter#
Collaboration diagram for mpl::indexed_layout::parameter:
Class representing the parameters to characterize an indexed layout.
Public Functions
-
parameter() = default#
creates parameters for an indexed layout representing an empty sequence
-
template<typename List_T>
inline parameter(const List_T &list)# converts a container into an indexed layout parameter
- Template Parameters:
List_T – container type, must work with range-based for loops, value type must have two elements (the block length and the displacement), each convertible to int
- Parameters:
list – container
-
inline parameter(std::initializer_list<std::tuple<int, int>> list)#
converts an initializer list into a parameters
- Parameters:
list – initializer list with two-element tuples of block lengths and displacements
-
inline void add(int blocklength, int displacement)#
add an additional block
- Parameters:
blocklength – block length
displacement – displacement (relative to the beginning of the first block)
Friends
- friend class indexed_layout
-
parameter() = default#
Heterogeneous indexed layout#
-
template<typename T>
class hindexed_layout : public mpl::layout<T># Inheritence diagram for mpl::hindexed_layout:
Collaboration diagram for mpl::hindexed_layout:
Layout representing data in a sequence of consecutive homogenous blocks of varying lengths.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline hindexed_layout()#
constructs a layout with no data
-
inline explicit hindexed_layout(const parameter &par)#
constructs heterogeneously indexed layout for data of type
T
Note
displacements are given in bytes
- Parameters:
par – parameter containing information about the layout
-
inline explicit hindexed_layout(const parameter &par, const layout<T> &l)#
constructs heterogeneously indexed layout for data with some other layout
Note
displacements are given bytes
- Parameters:
par – parameter containing information about the layout
l – the layout of a single element
-
inline hindexed_layout(const hindexed_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline hindexed_layout(hindexed_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
hindexed_layout<T> &operator=(const hindexed_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
hindexed_layout<T> &operator=(hindexed_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(hindexed_layout<T> &other)#
exchanges two indexed layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
class parameter#
Collaboration diagram for mpl::hindexed_layout::parameter:
Class representing the parameters to characterize a heterogeneously indexed layout.
Public Functions
-
parameter() = default#
creates parameters for an empty sequence
-
template<typename List_T>
inline explicit parameter(const List_T &list)# converts a container into a hindexed layout parameter
- Template Parameters:
List_T – container type, must work with range-based for loops, value type must have two elements (the block length and the displacement), each convertible to int
- Parameters:
list – container
Friends
- friend class hindexed_layout
-
parameter() = default#
Indexed block layout#
-
template<typename T>
class indexed_block_layout : public mpl::layout<T># Layout representing data in a sequence of consecutive homogenous blocks of uniform lengths.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline indexed_block_layout()#
constructs a layout with no data
-
inline explicit indexed_block_layout(int blocklength, const parameter &par)#
constructs indexed layout for data of type T
Note
displacements are given in multiples of the extent of
T
- Parameters:
blocklength – the length of each block
par – parameter containing information about the layout
-
inline explicit indexed_block_layout(int blocklength, const parameter &par, const layout<T> &l)#
constructs indexed layout for data with some other layout
Note
displacements are given in multiples of the extent of
l
- Parameters:
blocklength – the length of each block
par – parameter containing information about the layout
l – the layout of a single element
-
inline indexed_block_layout(const indexed_block_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline indexed_block_layout(indexed_block_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
indexed_block_layout<T> &operator=(const indexed_block_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
indexed_block_layout<T> &operator=(indexed_block_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(indexed_block_layout<T> &other)#
exchanges two indexed layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
class parameter#
Class representing the parameters to characterize an indexed layout.
Public Functions
-
parameter() = default#
creates parameters for an indexed layout representing an empty sequence
-
template<typename List_T>
inline explicit parameter(const List_T &list)# converts a container into an indexed block layout parameter
- Template Parameters:
List_T – container type, must work with range-based for loops, value type must have a single element (the displacement), convertible to int
- Parameters:
list – container
-
inline parameter(std::initializer_list<int> list)#
converts an initializer list into an indexed block layout parameter
- Parameters:
list – initializer list with integers representing displacements
-
inline void add(int displacement)#
add an additional block
- Parameters:
displacement – displacement (relative to the beginning of the first block)
Friends
- friend class indexed_block_layout
-
parameter() = default#
Heterogeneous indexed block layout#
-
template<typename T>
class hindexed_block_layout : public mpl::layout<T># Layout representing data in a sequence of consecutive homogenous blocks of uniform lengths.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline hindexed_block_layout()#
constructs a layout with no data
-
inline explicit hindexed_block_layout(int blocklength, const parameter &par)#
constructs heterogeneously indexed layout for data of type T
Note
displacements are given in bytes
- Parameters:
blocklength – the length of each block
par – parameter containing information about the layout
-
inline explicit hindexed_block_layout(int blocklength, const parameter &par, const layout<T> &l)#
constructs heterogeneously indexed layout for data with some other layout
Note
displacements are given bytes
- Parameters:
blocklength – the length of each block
par – parameter containing information about the layout
l – the layout of a single element
-
inline hindexed_block_layout(const hindexed_block_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline hindexed_block_layout(hindexed_block_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
hindexed_block_layout<T> &operator=(const hindexed_block_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
hindexed_block_layout<T> &operator=(hindexed_block_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(hindexed_block_layout<T> &other)#
exchanges two indexed layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
class parameter#
Class representing the parameters to characterize a heterogeneously indexed layout.
Public Functions
-
parameter() = default#
creates an hindexed block layout parameter for an empty sequence
-
template<typename List_T>
inline explicit parameter(const List_T &list)# converts a container into a parameters
- Template Parameters:
List_T – container type, must work with range-based for loops, value type must have a single element (the displacement), convertible to int
- Parameters:
list – container
Friends
- friend class hindexed_block_layout
-
parameter() = default#
Iterator layout#
-
template<typename T>
class iterator_layout : public mpl::layout<T># Layout representing data at non-consecutive memory locations, which can be addressed via an iterator.
See also
inherits all member methods of
layout
Note
Iterators that have been used to create objects of this type must not become invalid during the object’s life time. Iterator must allow read access.
- Template Parameters:
T – base element type
Public Functions
-
inline iterator_layout()#
constructs a layout with no data
-
template<typename iter_T>
inline explicit iterator_layout(iter_T first, iter_T last)# constructs iterator layout for data of type T
- Template Parameters:
iter_T – iterator type
- Parameters:
first – iterator to the first element
last – iterator pointing after the last element
-
inline explicit iterator_layout(const parameter &par)#
constructs iterator layout for data of type T
- Parameters:
par – parameter containing information about the layout
-
template<typename iter_T>
inline explicit iterator_layout(iter_T first, iter_T last, const layout<T> &l)# constructs iterator layout for data with some other layout
- Template Parameters:
itert_T – iterator type
- Parameters:
first – iterator to the first element
last – iterator pointing after the last element
l – the layout of a single element
-
inline explicit iterator_layout(const parameter &par, const layout<T> &l)#
constructs iterator layout for data with some other layout
- Parameters:
par – parameter containing information about the layout
l – the layout of a single element
-
inline iterator_layout(const iterator_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline iterator_layout(iterator_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
iterator_layout<T> &operator=(const iterator_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
iterator_layout<T> &operator=(iterator_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(iterator_layout<T> &other)#
exchanges two iterator layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
Subarray layout#
-
template<typename T>
class subarray_layout : public mpl::layout<T># Layout representing data of a subset multi dimensional array.
See also
inherits all member methods of
layout
- Template Parameters:
T – base element type
Public Functions
-
inline subarray_layout()#
constructs a layout with no data
-
inline explicit subarray_layout(const parameter &par)#
constructs subarray layout for data of type T
- Parameters:
par – parameter containing information about the layout
-
inline explicit subarray_layout(const parameter &par, const layout<T> &l)#
constructs subarray layout for data with some other layout
- Parameters:
par – parameter containing information about the layout
l – the layout of a single element
-
inline subarray_layout(const subarray_layout<T> &l)#
copy constructor
- Parameters:
l – layout to copy from
-
inline subarray_layout(subarray_layout<T> &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
subarray_layout<T> &operator=(const subarray_layout<T> &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
subarray_layout<T> &operator=(subarray_layout<T> &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(subarray_layout<T> &other)#
exchanges two subarray layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
class parameter#
Class representing the parameters to characterize a subarray layout.
Public Functions
-
parameter() = default#
creates parameters for a subarray layout representing an empty subarray
-
template<typename List_T>
inline explicit parameter(const List_T &V)# creates parameters for a subarray layout
Note
Each element of parameter V describes the subarray in one dimension. The first component of each value gives the total size of the dimension, the second one equals the size of the subarray, the third value gives the index of the first element of the subarray. Array order is C order.
- Template Parameters:
List_T – container type holding three-element values, must support range-based for loops
- Parameters:
V – container type holding three-element values
-
inline parameter(std::initializer_list<std::array<int, 3>> list)#
creates parameters for a subarray layout
Note
Each element of parameter list describes the subarray in one dimension. The first component of each value gives the total size of the dimension, the second one equals the size of the subarray, the third value gives the index of the first element of the subarray. Array order is C order.
- Parameters:
list – list describing the subarray geometry
-
inline void add(int size, int subsize, int start)#
add parameters for an additional array dimension
- Parameters:
size – total size of the array along the current dimension
subsize – size of the subarray
start – the index of the first element of the subarray
-
inline void order(array_orders new_order)#
set the array order
- Parameters:
new_order – the array order
-
inline array_orders order() const#
get the array order
- Returns:
array order
Friends
- friend class subarray_layout
-
parameter() = default#
Helper functions and classes#
-
enum class mpl::array_orders#
Represents order of elements in a multi dimensional array.
See also
Values:
-
enumerator C_order#
row-major order, also known as lexographical access order or as C order
-
enumerator Fortran_order#
column-major order, also known as colexographical access order or as Fortran order
-
enumerator C_order#
Heterogeneous layout#
-
class heterogeneous_layout : public layout<void>#
Layout representing heterogeneous data at specific memory locations.
See also
inherits all member methods of the class layout
Note
absolute
must be used as send/receive buffer argument when sending or receiving data of heterogeneous layout.Public Functions
-
inline heterogeneous_layout()#
constructs a layout with no data
-
inline explicit heterogeneous_layout(const parameter &par)#
constructs heterogeneous layout
- Parameters:
par – parameter containing information about the layout
-
template<typename T, typename ...Ts>
inline explicit heterogeneous_layout(const T &x, const Ts&... xs)# constructs heterogeneous layout
- Template Parameters:
T – type of the first heterogeneous data element
Ts – types of further heterogeneous data elements
- Parameters:
x – the first data element
xs – further data elements (parameter pack)
-
heterogeneous_layout(const heterogeneous_layout &l) = default#
copy constructor
- Parameters:
l – layout to copy from
-
inline heterogeneous_layout(heterogeneous_layout &&l) noexcept#
move constructor
- Parameters:
l – layout to move from
-
heterogeneous_layout &operator=(const heterogeneous_layout &l) = default#
copy assignment operator
- Parameters:
l – layout to copy from
- Returns:
reference to this object
-
heterogeneous_layout &operator=(heterogeneous_layout &&l) noexcept = default#
move assignment operator
- Parameters:
l – layout to move from
- Returns:
reference to this object
-
inline void swap(heterogeneous_layout &other)#
exchanges two heterogeneous layouts
- Parameters:
other – the layout to swap with
-
inline MPI_Datatype native_handle() const#
Get the underlying MPI handle of the data type.
Note
This function returns a non-owning handle to the underlying MPI data type, which may be useful when refactoring legacy MPI applications to MPL.
Warning
The handle must not be used to modify the MPI data type that the handle points to. This method will be removed in a future version.
- Returns:
MPI handle of the data type
-
inline ssize_t byte_extent() const#
Get the byte extent of the layout.
See also
extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent in bytes
-
inline ssize_t byte_lower_bound() const#
Get the byte lower bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound in bytes
-
inline ssize_t byte_upper_bound() const#
Get the byte upper bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t extent() const#
Get the extent of the layout.
See also
byte_extent
Note
The extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the extent
-
inline ssize_t lower_bound() const#
Get the lower bound of the layout.
See also
byte_lower_bound
,upper_bound
Note
The lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the lower bound
-
inline ssize_t upper_bound() const#
Get the upper bound of the layout.
See also
byte_upper_bound
,lower_bound
Note
The upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the upper bound in bytes
-
inline ssize_t true_byte_extent() const#
Get the true byte extent of the layout.
See also
true_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent in bytes
-
inline ssize_t true_byte_lower_bound() const#
Get the true byte lower bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound in bytes
-
inline ssize_t true_byte_upper_bound() const#
Get the true byte upper bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline ssize_t true_extent() const#
Get the true extent of the layout.
See also
true_byte_extent
Note
The true extent of a layout correspondents to the extent of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true extent
-
inline ssize_t true_lower_bound() const#
Get the true lower bound of the layout.
See also
true_byte_lower_bound
,true_upper_bound
Note
The true lower bound of a layout correspondents to the lower bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true lower bound
-
inline ssize_t true_upper_bound() const#
Get the true upper bound of the layout.
See also
true_byte_upper_bound
,true_lower_bound
Note
The true upper bound of a layout correspondents to the upper bound of the underlying MPI datatype. See MPI documentation for details.
- Returns:
the true upper bound in bytes
-
inline void byte_resize(ssize_t lb, ssize_t extent)#
Resize the layout.
- Parameters:
lb – the layout’s new true byte lower bound
extent – the layout’s new true byte extent
-
class parameter#
Class representing the parameters to characterize a heterogeneous layout.
Public Functions
-
parameter() = default#
creates parameters for a heterogeneous layout representing an empty data set
-
template<typename ...Ts>
inline explicit parameter(const Ts&... xs)# creates parameters for a heterogeneous layout
- Template Parameters:
Ts – types of the heterogeneous data
- Parameters:
xs – heterogeneous data elements (parameter pack)
-
template<typename T, typename ...Ts>
inline void add(const T &x, const Ts&... xs)# adds one or more values to a heterogeneous layout
- Template Parameters:
T – type of the first heterogeneous data element
Ts – types of further heterogeneous data elements
- Parameters:
x – the first data element
xs – further data elements (parameter pack)
-
template<typename T, typename ...Ts>
inline void add(const absolute_data<T*> &x, const Ts&... xs)# adds one or more values to a heterogeneous layout
- Template Parameters:
T – type of the first heterogeneous data element
Ts – types of further heterogeneous data elements
- Parameters:
x – the first data element given by its absolute memory address, return value of
make_absolute
xs – further data elements (parameter pack)
Friends
- friend class heterogeneous_layout
-
parameter() = default#
-
inline heterogeneous_layout()#
Helper functions and classes#
-
template<typename T>
class absolute_data# Helper class for
heterogeneous_layout
,make_absolute(T *x, const layout<T> &l)
andmake_absolute(const T *x, const layout<T> &l)
.- Template Parameters:
T – data type
-
template<typename T>
class absolute_data<const T*># Helper class for
heterogeneous_layout
,make_absolute(T *x, const layout<T> &l)
andmake_absolute(const T *x, const layout<T> &l)
.- Template Parameters:
T – data type
-
template<typename T>
class absolute_data<T*># Helper class for
heterogeneous_layout
,make_absolute(T *x, const layout<T> &l)
andmake_absolute(const T *x, const layout<T> &l)
.- Template Parameters:
T – data type
-
template<typename T>
absolute_data<const T*> mpl::make_absolute(const T *x, const layout<T> &l)# Helper function for the class heterogeneous_layout.
See also
make_absolute(const T *x, const layout<T> &l)
function andheterogeneous_layout
class- Template Parameters:
T – data type
- Parameters:
x – address of data
l – layout of data at address x
-
template<typename T>
absolute_data<T*> mpl::make_absolute(T *x, const layout<T> &l)# Helper function for the class heterogeneous_layout.
See also
make_absolute(T *x, const layout<T> &l)
function andheterogeneous_layout
class- Template Parameters:
T – data type
- Parameters:
x – address of data
l – layout of data at address x
Layouts#
-
template<typename T>
class layouts : private std::vector<layout<T>># container for storing layouts
- Template Parameters:
T – base element type of the layouts
Public Functions
-
inline layouts()#
constructs a layout container with no data
-
inline explicit layouts(size_type n)#
constructs a layout container of empty layouts
- Parameters:
n – number of initial layouts in container
Friends
- friend class impl::base_communicator
- friend class impl::topology_communicator
- friend class communicator
Contiguous layouts#
-
template<typename T>
class contiguous_layouts : private std::vector<contiguous_layout<T>># container for storing contiguous layouts
- Template Parameters:
T – base element type of the contiguous layouts
Public Functions
-
inline contiguous_layouts()#
constructs a layout container with no data
-
inline explicit contiguous_layouts(size_type n)#
constructs a layout container of empty layouts
- Parameters:
n – number of initial layouts in container
Friends
- friend class impl::base_communicator
- friend class impl::topology_communicator