TVM  0.9.4
tvm::utils::internal::BufferedMatrix Class Reference

#include <tvm/utils/internal/BufferedMatrix.h>

Public Member Functions

 BufferedMatrix (Eigen::DenseIndex m, Eigen::DenseIndex n)
 
Eigen::Map< const Eigen::MatrixXd, Eigen::Aligned > get () const
 
Eigen::Map< Eigen::MatrixXd, Eigen::Aligned > get ()
 
void resize (Eigen::DenseIndex m, Eigen::DenseIndex n)
 
template<typename Derived >
Eigen::Map< Eigen::MatrixXd, Eigen::Aligned > & operator= (const Eigen::EigenBase< Derived > &xpr)
 

Detailed Description

This class provides a matrix with resizable buffer, so that allocations are made only if there is not enough space.

Constructor & Destructor Documentation

◆ BufferedMatrix()

tvm::utils::internal::BufferedMatrix::BufferedMatrix ( Eigen::DenseIndex  m,
Eigen::DenseIndex  n 
)
inline

Build a m-by-n BufferedMatrix. A buffer twice as big as needed is created.

Member Function Documentation

◆ get() [1/2]

Eigen::Map< Eigen::MatrixXd, Eigen::Aligned > tvm::utils::internal::BufferedMatrix::get ( )
inline

Get a map to the matrix. The matrix has the size specified at construction or during the last resize.

◆ get() [2/2]

Eigen::Map< const Eigen::MatrixXd, Eigen::Aligned > tvm::utils::internal::BufferedMatrix::get ( ) const
inline

Get a map to the matrix. The matrix has the size specified at construction or during the last resize.\

◆ operator=()

template<typename Derived >
Eigen::Map< Eigen::MatrixXd, Eigen::Aligned > & tvm::utils::internal::BufferedMatrix::operator= ( const Eigen::EigenBase< Derived > &  xpr)
inline

◆ resize()

void tvm::utils::internal::BufferedMatrix::resize ( Eigen::DenseIndex  m,
Eigen::DenseIndex  n 
)
inline

Resize the matrix. If the buffer is not big enough, reallocate memory to twice the needed size.


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