sofa::gpu::cuda::CudaBaseMatrix< T > Class Template Reference

#include <CudaTypesBase.h>

Inheritance diagram for sofa::gpu::cuda::CudaBaseMatrix< T >:

Inheritance graph
[legend]
Collaboration diagram for sofa::gpu::cuda::CudaBaseMatrix< T >:

Collaboration graph
[legend]

Public Member Functions

CudaMatrix< T > & getCudaMatrix ()
void resize (int nbCol, int nbRow)
 Resize the matrix and reset all values to 0.
void resize (int nbCol, int nbRow, int ws)
int rowSize () const
 Number of rows.
int colSize () const
 Number of columns.
SReal element (int i, int j) const
 Read the value of the element at row i, column j (using 0-based indices).
void clear ()
 Reset all values to 0.
void set (int j, int i, double v)
 Write the value of the element at row i, column j (using 0-based indices).
void add (int j, int i, double v)
 Add v to the existing value of the element at row i, column j (using 0-based indices).

Private Attributes

CudaMatrix< T > m

Detailed Description

template<class T>
class sofa::gpu::cuda::CudaBaseMatrix< T >

Definition at line 40 of file CudaTypesBase.h.


Member Function Documentation

template<class T >
void sofa::gpu::cuda::CudaBaseMatrix< T >::add ( int  i,
int  j,
double  v 
) [inline, virtual]

Add v to the existing value of the element at row i, column j (using 0-based indices).

Implements sofa::defaulttype::BaseMatrix.

Definition at line 85 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseMatrix< T >::colSize(), sofa::gpu::cuda::CudaBaseMatrix< T >::m, and sofa::gpu::cuda::CudaBaseMatrix< T >::rowSize().

template<class T >
void sofa::gpu::cuda::CudaBaseMatrix< T >::clear (  )  [inline, virtual]

Reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 67 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseMatrix< T >::m.

template<class T >
int sofa::gpu::cuda::CudaBaseMatrix< T >::colSize (  )  const [inline, virtual]

template<class T >
SReal sofa::gpu::cuda::CudaBaseMatrix< T >::element ( int  i,
int  j 
) const [inline, virtual]

Read the value of the element at row i, column j (using 0-based indices).

Implements sofa::defaulttype::BaseMatrix.

Definition at line 63 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseMatrix< T >::m.

template<class T >
CudaMatrix<T>& sofa::gpu::cuda::CudaBaseMatrix< T >::getCudaMatrix (  )  [inline]

Definition at line 43 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseMatrix< T >::m.

template<class T >
void sofa::gpu::cuda::CudaBaseMatrix< T >::resize ( int  nbCol,
int  nbRow,
int  ws 
) [inline]

Definition at line 51 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseMatrix< T >::m.

template<class T >
void sofa::gpu::cuda::CudaBaseMatrix< T >::resize ( int  nbRow,
int  nbCol 
) [inline, virtual]

Resize the matrix and reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 47 of file CudaTypesBase.h.

References BSIZE, and sofa::gpu::cuda::CudaBaseMatrix< T >::m.

template<class T >
int sofa::gpu::cuda::CudaBaseMatrix< T >::rowSize (  )  const [inline, virtual]

template<class T >
void sofa::gpu::cuda::CudaBaseMatrix< T >::set ( int  i,
int  j,
double  v 
) [inline, virtual]

Write the value of the element at row i, column j (using 0-based indices).

Implements sofa::defaulttype::BaseMatrix.

Definition at line 75 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseMatrix< T >::colSize(), sofa::gpu::cuda::CudaBaseMatrix< T >::m, and sofa::gpu::cuda::CudaBaseMatrix< T >::rowSize().


Field Documentation

template<class T >
CudaMatrix<T> sofa::gpu::cuda::CudaBaseMatrix< T >::m [private]


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

Generated on Sun Nov 23 04:24:06 2008 for Sofa by  doxygen 1.5.7.1