<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
tlapack::starpu::Matrix< T > Class Template Reference

Class for representing a matrix in StarPU that is split into tiles. More...

#include <Matrix.hpp>

Inheritance diagram for tlapack::starpu::Matrix< T >:
Collaboration diagram for tlapack::starpu::Matrix< T >:

Public Member Functions

Matrix< const T > get_const_tiles (idx_t ix, idx_t iy, idx_t nx, idx_t ny) const noexcept
 Create a const submatrix from a list of tiles.
 
constexpr idx_t get_nx () const noexcept
 Get number of tiles in x direction.
 
constexpr idx_t get_ny () const noexcept
 Get number of tiles in y direction.
 
Matrix< T > get_tiles (idx_t ix, idx_t iy, idx_t nx, idx_t ny) noexcept
 Create a submatrix from a list of tiles.
 
Matrix< const T > map_to_const_tiles (idx_t rowStart, idx_t rowEnd, idx_t colStart, idx_t colEnd) const noexcept
 Create a const submatrix from starting and ending indices.
 
Matrix< T > map_to_tiles (idx_t rowStart, idx_t rowEnd, idx_t colStart, idx_t colEnd) noexcept
 Create a submatrix from starting and ending indices.
 
constexpr Matrix (const std::shared_ptr< starpu_data_handle_t > &pHandle, idx_t ix, idx_t iy, idx_t nx, idx_t ny, idx_t row0, idx_t col0, idx_t lastRows, idx_t lastCols) noexcept
 Create a submatrix from a handle and a grid.
 
 Matrix (T *ptr, idx_t m, idx_t n, idx_t ld, idx_t mt, idx_t nt) noexcept
 Create a matrix of size m-by-n from a pointer in main memory.
 
constexpr Matrix (T *ptr, idx_t m, idx_t n, idx_t mt, idx_t nt) noexcept
 Create a matrix of size m-by-n from contiguous data in main memory.
 
constexpr idx_t nblockcols () const noexcept
 Get the maximum number of columns of a tile.
 
constexpr idx_t nblockrows () const noexcept
 Get the maximum number of rows of a tile.
 
constexpr idx_t ncols () const noexcept override
 Get the number of columns in the matrix.
 
constexpr idx_t nrows () const noexcept override
 Get the number of rows in the matrix.
 
Matrixoperator= (const Matrix &)=delete
 
Tile tile (idx_t ix, idx_t iy) noexcept
 Get the data handle of a tile in the matrix or the data handle of the matrix if it is not partitioned.
 

Friends

std::ostream & operator<< (std::ostream &out, const starpu::Matrix< T > &A)
 Display matrix in output stream.
 

Detailed Description

template<class T>
class tlapack::starpu::Matrix< T >

Class for representing a matrix in StarPU that is split into tiles.

This class is a wrapper around a StarPU data handle. The grid is created by the StarPU map filters. In order to be able to extract submatrices, this class stores a virtual partition in addition to the StarPU data handle.

Template Parameters
TType of the elements of the matrix

Constructor & Destructor Documentation

◆ Matrix() [1/2]

template<class T >
tlapack::starpu::Matrix< T >::Matrix ( T *  ptr,
idx_t  m,
idx_t  n,
idx_t  ld,
idx_t  mt,
idx_t  nt 
)
inlinenoexcept

Create a matrix of size m-by-n from a pointer in main memory.

Parameters
[in]ptrPointer to the data
[in]mNumber of rows
[in]nNumber of columns
[in]ldLeading dimension of the matrix
[in]mtNumber of rows in a tile
[in]ntNumber of columns in a tile

◆ Matrix() [2/2]

template<class T >
constexpr tlapack::starpu::Matrix< T >::Matrix ( T *  ptr,
idx_t  m,
idx_t  n,
idx_t  mt,
idx_t  nt 
)
inlineconstexprnoexcept

Create a matrix of size m-by-n from contiguous data in main memory.

See also
Matrix(T*, idx_t, idx_t, idx_t, idx_t, idx_t)

Member Function Documentation

◆ get_const_tiles()

template<class T >
Matrix< const T > tlapack::starpu::Matrix< T >::get_const_tiles ( idx_t  ix,
idx_t  iy,
idx_t  nx,
idx_t  ny 
) const
inlinenoexcept

Create a const submatrix from a list of tiles.

Parameters
[in]ixIndex of the first tile in x
[in]iyIndex of the first tile in y
[in]nxNumber of tiles in x
[in]nyNumber of tiles in y

◆ get_tiles()

template<class T >
Matrix< T > tlapack::starpu::Matrix< T >::get_tiles ( idx_t  ix,
idx_t  iy,
idx_t  nx,
idx_t  ny 
)
inlinenoexcept

Create a submatrix from a list of tiles.

Parameters
[in]ixIndex of the first tile in x
[in]iyIndex of the first tile in y
[in]nxNumber of tiles in x
[in]nyNumber of tiles in y

◆ map_to_const_tiles()

template<class T >
Matrix< const T > tlapack::starpu::Matrix< T >::map_to_const_tiles ( idx_t  rowStart,
idx_t  rowEnd,
idx_t  colStart,
idx_t  colEnd 
) const
inlinenoexcept

Create a const submatrix from starting and ending indices.

Parameters
[in]rowStartStarting row index
[in]rowEndEnding row index
[in]colStartStarting column index
[in]colEndEnding column index

◆ map_to_tiles()

template<class T >
Matrix< T > tlapack::starpu::Matrix< T >::map_to_tiles ( idx_t  rowStart,
idx_t  rowEnd,
idx_t  colStart,
idx_t  colEnd 
)
inlinenoexcept

Create a submatrix from starting and ending indices.

Parameters
[in]rowStartStarting row index
[in]rowEndEnding row index
[in]colStartStarting column index
[in]colEndEnding column index

◆ ncols()

template<class T >
constexpr idx_t tlapack::starpu::Matrix< T >::ncols ( ) const
inlineconstexproverridenoexcept

Get the number of columns in the matrix.

Returns
Number of columns in the matrix

◆ nrows()

template<class T >
constexpr idx_t tlapack::starpu::Matrix< T >::nrows ( ) const
inlineconstexproverridenoexcept

Get the number of rows in the matrix.

Returns
Number of rows in the matrix

Friends And Related Symbol Documentation

◆ operator<<

template<class T >
std::ostream & operator<< ( std::ostream &  out,
const starpu::Matrix< T > &  A 
)
friend

Display matrix in output stream.

Parameters
[in,out]outOutput stream
[in]AMatrix to display

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