From 6f594cb0c820c75a81004978223bfdc36b33588e Mon Sep 17 00:00:00 2001 From: boufaras Date: Wed, 14 Sep 2011 13:15:26 +0000 Subject: [PATCH] add asignement operator & update setSize method git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2368 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/GPUType/moGPUIntVector.h | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/branches/ParadisEO-GPU/src/GPUType/moGPUIntVector.h b/branches/ParadisEO-GPU/src/GPUType/moGPUIntVector.h index f6c2d0386..918f73c35 100644 --- a/branches/ParadisEO-GPU/src/GPUType/moGPUIntVector.h +++ b/branches/ParadisEO-GPU/src/GPUType/moGPUIntVector.h @@ -70,17 +70,6 @@ public: create(); } - /** - *Assignment operator - *@param _vector The vector passed to the function to fix the new content. - *@return a new vector. - */ - - moGPUIntVector& operator=(const moGPUIntVector & _vector) { - moGPUVector::operator=(_vector); - return (*this); - } - /** *Initializer of random integer vector. */ @@ -98,20 +87,19 @@ public: virtual inline __host__ void setSize(unsigned _size) { + if(N==_size) + return; + moGPUIntVector tmp_vect(_size); if(_size tmp_vect(_size); for (unsigned i = 0; i < tmp_vect.N; i++) tmp_vect.vect[i]= vect[i]; - (tmp_vect).invalidate(); - (*this)=tmp_vect; } else if(_size>N) { - moGPUIntVector tmp_vect(_size); for (unsigned i = 0; i