LLVM 22.0.0git
llvm::PBQP::Matrix Class Reference

PBQP Matrix class. More...

#include "llvm/CodeGen/PBQP/Math.h"

Inheritance diagram for llvm::PBQP::Matrix:
[legend]

Public Member Functions

 Matrix (unsigned Rows, unsigned Cols)
 Construct a PBQP Matrix with the given dimensions.
 Matrix (unsigned Rows, unsigned Cols, PBQPNum InitVal)
 Construct a PBQP Matrix with the given dimensions and initial value.
 Matrix (const Matrix &M)
 Copy construct a PBQP matrix.
 Matrix (Matrix &&M)
 Move construct a PBQP matrix.
bool operator== (const Matrix &M) const
 Comparison operator.
unsigned getRows () const
 Return the number of rows in this matrix.
unsigned getCols () const
 Return the number of cols in this matrix.
PBQPNumoperator[] (unsigned R)
 Matrix element access.
const PBQPNumoperator[] (unsigned R) const
 Matrix element access.
Vector getRowAsVector (unsigned R) const
 Returns the given row as a vector.
Vector getColAsVector (unsigned C) const
 Returns the given column as a vector.
Matrix transpose () const
 Matrix transpose.
Matrixoperator+= (const Matrix &M)
 Add the given matrix to this one.
Matrix operator+ (const Matrix &M)

Friends

hash_code hash_value (const Matrix &M)
 Return a hash_code for the given matrix.

Detailed Description

PBQP Matrix class.

Definition at line 110 of file Math.h.

Constructor & Destructor Documentation

◆ Matrix() [1/4]

llvm::PBQP::Matrix::Matrix ( unsigned Rows,
unsigned Cols )
inline

◆ Matrix() [2/4]

llvm::PBQP::Matrix::Matrix ( unsigned Rows,
unsigned Cols,
PBQPNum InitVal )
inline

Construct a PBQP Matrix with the given dimensions and initial value.

Definition at line 122 of file Math.h.

◆ Matrix() [3/4]

llvm::PBQP::Matrix::Matrix ( const Matrix & M)
inline

Copy construct a PBQP matrix.

Definition at line 129 of file Math.h.

References Matrix().

◆ Matrix() [4/4]

llvm::PBQP::Matrix::Matrix ( Matrix && M)
inline

Move construct a PBQP matrix.

Definition at line 136 of file Math.h.

References Matrix(), and llvm::move().

Member Function Documentation

◆ getColAsVector()

Vector llvm::PBQP::Matrix::getColAsVector ( unsigned C) const
inline

Returns the given column as a vector.

Definition at line 185 of file Math.h.

References assert(), and llvm::CallingConv::C.

Referenced by llvm::PBQP::backpropagate().

◆ getCols()

unsigned llvm::PBQP::Matrix::getCols ( ) const
inline

Return the number of cols in this matrix.

Definition at line 156 of file Math.h.

References assert().

◆ getRowAsVector()

Vector llvm::PBQP::Matrix::getRowAsVector ( unsigned R) const
inline

Returns the given row as a vector.

Definition at line 176 of file Math.h.

References assert(), and llvm::CallingConv::C.

Referenced by llvm::PBQP::backpropagate().

◆ getRows()

unsigned llvm::PBQP::Matrix::getRows ( ) const
inline

Return the number of rows in this matrix.

Definition at line 150 of file Math.h.

References assert().

Referenced by llvm::PBQP::applyR2().

◆ operator+()

Matrix llvm::PBQP::Matrix::operator+ ( const Matrix & M)
inline

Definition at line 213 of file Math.h.

References assert(), and Matrix().

◆ operator+=()

Matrix & llvm::PBQP::Matrix::operator+= ( const Matrix & M)
inline

Add the given matrix to this one.

Definition at line 204 of file Math.h.

References assert(), and Matrix().

◆ operator==()

bool llvm::PBQP::Matrix::operator== ( const Matrix & M) const
inline

Comparison operator.

Definition at line 142 of file Math.h.

References assert(), and Matrix().

◆ operator[]() [1/2]

PBQPNum * llvm::PBQP::Matrix::operator[] ( unsigned R)
inline

Matrix element access.

Definition at line 162 of file Math.h.

References assert().

◆ operator[]() [2/2]

const PBQPNum * llvm::PBQP::Matrix::operator[] ( unsigned R) const
inline

Matrix element access.

Definition at line 169 of file Math.h.

References assert().

◆ transpose()

Matrix llvm::PBQP::Matrix::transpose ( ) const
inline

Matrix transpose.

Definition at line 194 of file Math.h.

References assert(), and Matrix().

◆ hash_value

hash_code hash_value ( const Matrix & M)
friend

Return a hash_code for the given matrix.

Definition at line 226 of file Math.h.

References llvm::hash_combine(), llvm::hash_combine_range(), and Matrix().


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