update size setter and vector accessors

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2225 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2011-05-12 13:51:37 +00:00
commit fbd546906b

View file

@ -134,7 +134,7 @@ template<class ElemT, class Fitness>
*/ */
inline __host__ __device__ const ElemType & operator[](unsigned _i) const { inline __host__ __device__ const ElemType & operator[](unsigned _i) const {
if(_i<N)
return vect[_i]; return vect[_i];
} }
@ -145,7 +145,7 @@ template<class ElemT, class Fitness>
*/ */
inline __host__ __device__ ElemType & operator[](unsigned _i) { inline __host__ __device__ ElemType & operator[](unsigned _i) {
if(_i<N)
return vect[_i]; return vect[_i];
} }
@ -165,7 +165,7 @@ template<class ElemT, class Fitness>
*@param _size the vector size *@param _size the vector size
*/ */
virtual inline __host__ void setSize(unsigned _size)=0; virtual void setSize(unsigned _size)=0;
/** /**
* Write object. Called printOn since it prints the object _on_ a stream. * Write object. Called printOn since it prints the object _on_ a stream.