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

#include <CudaTypesBase.h>

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

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

Collaboration graph
[legend]

Public Member Functions

CudaVector< T > & getCudaVector ()
T & operator[] (int i)
const T & operator[] (int i) const
void resize (int nbRow)
 Resize the vector, and reset all values to 0.
void resize (int nbRow, int warp_size)
int size () const
 Number of elements.
SReal element (int i) const
 Read the value of element i.
void clear ()
 Reset all values to 0.
void set (int i, SReal val)
 Write the value of element i.
void add (int i, SReal val)
 Add v to the existing value of element i.

Private Attributes

CudaVector< T > v

Detailed Description

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

Definition at line 100 of file CudaTypesBase.h.


Member Function Documentation

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

Add v to the existing value of element i.

Implements sofa::defaulttype::BaseVector.

Definition at line 139 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

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

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

Read the value of element i.

Implements sofa::defaulttype::BaseVector.

Definition at line 127 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

template<class T >
CudaVector<T>& sofa::gpu::cuda::CudaBaseVector< T >::getCudaVector (  )  [inline]

Definition at line 103 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

template<class T >
const T& sofa::gpu::cuda::CudaBaseVector< T >::operator[] ( int  i  )  const [inline]

Definition at line 111 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

template<class T >
T& sofa::gpu::cuda::CudaBaseVector< T >::operator[] ( int  i  )  [inline]

Definition at line 107 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

template<class T >
void sofa::gpu::cuda::CudaBaseVector< T >::resize ( int  nbRow,
int  warp_size 
) [inline]

Definition at line 119 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

template<class T >
void sofa::gpu::cuda::CudaBaseVector< T >::resize ( int  dim  )  [inline, virtual]

Resize the vector, and reset all values to 0.

Implements sofa::defaulttype::BaseVector.

Definition at line 115 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

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

Write the value of element i.

Implements sofa::defaulttype::BaseVector.

Definition at line 135 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

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

Number of elements.

Implements sofa::defaulttype::BaseVector.

Definition at line 123 of file CudaTypesBase.h.

References sofa::gpu::cuda::CudaBaseVector< T >::v.

Referenced by sofa::gpu::cuda::CudaBaseVector< T >::clear().


Field Documentation

template<class T >
CudaVector<T> sofa::gpu::cuda::CudaBaseVector< T >::v [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