diff --git a/branches/ParadisEO-GPU/src/GPUType/moGPURealVector.h b/branches/ParadisEO-GPU/src/GPUType/moGPURealVector.h index b9004a645..786ea60aa 100644 --- a/branches/ParadisEO-GPU/src/GPUType/moGPURealVector.h +++ b/branches/ParadisEO-GPU/src/GPUType/moGPURealVector.h @@ -70,15 +70,6 @@ public: create(); } - /** - *Assignment operator - *@param _vector The vector passed to the function to fix the new content. - *@return a new vector. - */ - - moGPURealVector& operator=(const moGPURealVector & _vector) { - moGPUVector::operator=(_vector); - } /** *Initializer of random real vector. @@ -88,6 +79,31 @@ public: vect[i] = (float) rng.rand() / RAND_MAX; } + /** + *Function inline to set the size of vector, called from host. + *@param _size the vector size + */ + + virtual inline __host__ void setSize(unsigned _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) { + moGPURealVector tmp_vect(_size); + for (unsigned i = 0; i