linbox
Public Member Functions
OpenCLMatrixDomain< Field_ > Class Template Reference

Interface for all functionnalities provided for BlasMatrix using GPUs. More...

#include <opencl-domain.h>

Public Member Functions

 OpenCLMatrixDomain (const Field &F)
 Constructor of OpenCLDomain.
 
 OpenCLMatrixDomain (const OpenCLMatrixDomain< Field > &OMD)
 Copy constructor.
 
 ~OpenCLMatrixDomain ()
 Deconstructor.
 
const Field & field () const
 Field accessor.
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & mul (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 multiplication. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & add (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 addition. More...
 
template<class Operand1 , class Operand2 >
Operand1 & copy (Operand1 &B, const Operand2 &A) const
 copy. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & sub (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 substraction C = A-B
 
template<class Operand1 , class Operand3 >
Operand1 & subin (Operand1 &C, const Operand3 &B) const
 substraction (in place) C -= B
 
template<class Operand1 , class Operand3 >
Operand1 & addin (Operand1 &C, const Operand3 &B) const
 addition (in place) C += B
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & mul (Operand1 &C, const Element &alpha, const Operand2 &A, const Operand3 &B) const
 multiplication with scaling. More...
 
template<class Operand1 , class Operand2 >
Operand1 & mulin_left (Operand1 &A, const Operand2 &B) const
 In place multiplication. More...
 
template<class Operand1 , class Operand2 >
Operand2 & mulin_right (const Operand1 &A, Operand2 &B) const
 In place multiplication. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & axpy (Operand1 &D, const Operand2 &A, const Operand3 &B, const Operand1 &C) const
 axpy. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & axpyin (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 axpyin. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & maxpy (Operand1 &D, const Operand2 &A, const Operand3 &B, const Operand1 &C) const
 maxpy. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & maxpyin (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 maxpyin. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & axmy (Operand1 &D, const Operand2 &A, const Operand3 &B, const Operand1 &C) const
 axmy. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & axmyin (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 axmyin. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & muladd (Operand1 &D, const Element &beta, const Operand1 &C, const Element &alpha, const Operand2 &A, const Operand3 &B) const
 general matrix-matrix multiplication and addition with scaling. More...
 
template<class Operand1 , class Operand2 , class Operand3 >
Operand1 & muladdin (const Element &beta, Operand1 &C, const Element &alpha, const Operand2 &A, const Operand3 &B) const
 muladdin. More...
 
template<class Matrix1 , class Matrix2 >
bool areEqual (const Matrix1 &A, const Matrix2 &B)
 
template<class Matrix1 >
bool isZero (const Matrix1 &A)
 
template<class Matrix1 >
bool isIdentity (const Matrix1 &A)
 
template<class Matrix1 >
bool isIdentityGeneralized (const Matrix1 &A)
 
template<class Matrix >
std::ostream & write (std::ostream &os, const Matrix &A) const
 Print matrix. More...
 
template<class Matrix >
std::istream & read (std::istream &is, Matrix &A) const
 Read matrix. More...
 
Solutions available for matrix respecting BlasMatrix interface
template<class Matrix >
Matrixinv (Matrix &Ainv, const Matrix &A) const
 Inversion.
 
template<class Matrix >
Matrixinvin (Matrix &Ainv, Matrix &A) const
 Inversion (in place)
 
template<class Matrix >
Matrixinvin (Matrix &A) const
 Inversion (the matrix A is modified)
 
template<class Matrix >
Matrixdiv (Matrix &C, const Matrix &A, const Matrix &B) const
 Division. More...
 
template<class Matrix >
Matrixinv (Matrix &Ainv, const Matrix &A, int &nullity) const
 Inversion w singular check.
 
template<class Matrix >
Matrixinvin (Matrix &Ainv, Matrix &A, int &nullity) const
 Inversion (the matrix A is modified) w singular check.
 
template<class Matrix >
unsigned int rank (const Matrix &A) const
 Rank.
 
template<class Matrix >
unsigned int rankInPlace (Matrix &A) const
 in-place Rank (the matrix is modified)
 
template<class Matrix >
Element det (const Matrix &A) const
 determinant
 
template<class Matrix >
Element detInPlace (Matrix &A) const
 in-place Determinant (the matrix is modified)
 
Solvers for Matrix (respecting BlasMatrix interface)

with Operand as right or left hand side

template<class Operand , class Matrix >
Operand & left_solve (Operand &X, const Matrix &A, const Operand &B) const
 linear solve with matrix right hand side. More...
 
template<class Operand , class Matrix >
Operand & left_solve (const Matrix &A, Operand &B) const
 linear solve with matrix right hand side, the result is stored in-place in B. More...
 
template<class Operand , class Matrix >
Operand & right_solve (Operand &X, const Matrix &A, const Operand &B) const
 linear solve with matrix right hand side. More...
 
template<class Operand , class Matrix >
Operand & right_solve (const Matrix &A, Operand &B) const
 linear solve with matrix right hand side, the result is stored in-place in B. More...
 
template<class Polynomial , class Matrix >
Polynomial & minpoly (Polynomial &P, const Matrix &A) const
 minimal polynomial computation.
 
template<class Polynomial , class Matrix >
Polynomial & charpoly (Polynomial &P, const Matrix &A) const
 characteristic polynomial computation.
 
template<class Polynomial , class Matrix >
std::list< Polynomial > & charpoly (std::list< Polynomial > &P, const Matrix &A) const
 characteristic polynomial computation.
 
template<class Polynomial >
Polynomial & mulpoly (Polynomial &res, const Polynomial &P1, const Polynomial &P2) const
 

Detailed Description

template<class Field_>
class LinBox::OpenCLMatrixDomain< Field_ >

Interface for all functionnalities provided for BlasMatrix using GPUs.

Member Function Documentation

◆ mul() [1/2]

Operand1& mul ( Operand1 &  C,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

multiplication.

C = A*B

◆ add()

Operand1& add ( Operand1 &  C,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

addition.

C = A+B

◆ copy()

Operand1& copy ( Operand1 &  B,
const Operand2 &  A 
) const
inline

copy.

B = A

◆ mul() [2/2]

Operand1& mul ( Operand1 &  C,
const Element &  alpha,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

multiplication with scaling.

C = alpha.A*B

◆ mulin_left()

Operand1& mulin_left ( Operand1 &  A,
const Operand2 &  B 
) const
inline

In place multiplication.

A = A*B

◆ mulin_right()

Operand2& mulin_right ( const Operand1 &  A,
Operand2 &  B 
) const
inline

In place multiplication.

B = A*B

◆ axpy()

Operand1& axpy ( Operand1 &  D,
const Operand2 &  A,
const Operand3 &  B,
const Operand1 &  C 
) const
inline

axpy.

D = A*B + C

◆ axpyin()

Operand1& axpyin ( Operand1 &  C,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

axpyin.

C += A*B

◆ maxpy()

Operand1& maxpy ( Operand1 &  D,
const Operand2 &  A,
const Operand3 &  B,
const Operand1 &  C 
) const
inline

maxpy.

D = C - A*B

◆ maxpyin()

Operand1& maxpyin ( Operand1 &  C,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

maxpyin.

C -= A*B

◆ axmy()

Operand1& axmy ( Operand1 &  D,
const Operand2 &  A,
const Operand3 &  B,
const Operand1 &  C 
) const
inline

axmy.

D= A*B - C

◆ axmyin()

Operand1& axmyin ( Operand1 &  C,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

axmyin.

C = A*B - C

◆ muladd()

Operand1& muladd ( Operand1 &  D,
const Element &  beta,
const Operand1 &  C,
const Element &  alpha,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

general matrix-matrix multiplication and addition with scaling.

D= beta.C + alpha.A*B

◆ muladdin()

Operand1& muladdin ( const Element &  beta,
Operand1 &  C,
const Element &  alpha,
const Operand2 &  A,
const Operand3 &  B 
) const
inline

muladdin.

C= beta.C + alpha.A*B.

◆ div()

Matrix& div ( Matrix C,
const Matrix A,
const Matrix B 
) const
inline

Division.

C = A B^{-1} ==> C . B = A

◆ left_solve() [1/2]

Operand& left_solve ( Operand &  X,
const Matrix A,
const Operand &  B 
) const
inline

linear solve with matrix right hand side.

AX=B

◆ left_solve() [2/2]

Operand& left_solve ( const Matrix A,
Operand &  B 
) const
inline

linear solve with matrix right hand side, the result is stored in-place in B.

Precondition
A must be square AX=B , (B<-X)

◆ right_solve() [1/2]

Operand& right_solve ( Operand &  X,
const Matrix A,
const Operand &  B 
) const
inline

linear solve with matrix right hand side.

XA=B

◆ right_solve() [2/2]

Operand& right_solve ( const Matrix A,
Operand &  B 
) const
inline

linear solve with matrix right hand side, the result is stored in-place in B.

Precondition
A must be square XA=B , (B<-X)

◆ mulpoly()

Polynomial& mulpoly ( Polynomial &  res,
const Polynomial &  P1,
const Polynomial &  P2 
) const
inline
Todo:
Temporary: waiting for an implementation of a domain of polynomial

◆ areEqual()

bool areEqual ( const Matrix1 &  A,
const Matrix2 &  B 
)
inline
Bug:
use refs

◆ isZero()

bool isZero ( const Matrix1 &  A)
inline
Bug:
use refs

◆ isIdentity()

bool isIdentity ( const Matrix1 &  A)
inline
Bug:
use refs
Bug:
use refs

◆ isIdentityGeneralized()

bool isIdentityGeneralized ( const Matrix1 &  A)
inline
Bug:
use refs
Bug:
use refs

◆ write()

std::ostream& write ( std::ostream &  os,
const Matrix A 
) const
inline

Print matrix.

Parameters
osOutput stream to which matrix is written.
AMatrix.
Returns
reference to os.

◆ read()

std::istream& read ( std::istream &  is,
Matrix A 
) const
inline

Read matrix.

Parameters
isInput stream from which matrix is read.
AMatrix.
Returns
reference to is.

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