Optimized Code (Polymorphism)

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2191 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2011-03-14 17:00:31 +00:00
commit e7f40af5f7

View file

@ -64,12 +64,8 @@ class moCudaIntVector: public moCudaVector<int, Fitness> {
*@param _size The neighborhood size. *@param _size The neighborhood size.
*/ */
moCudaIntVector(unsigned _size) { moCudaIntVector(unsigned _size):
moCudaVector<int, Fitness> (_size) {
N = _size;
vect = new int[_size];
create(); create();
} }
@ -80,14 +76,7 @@ class moCudaIntVector: public moCudaVector<int, Fitness> {
*/ */
moCudaIntVector& operator=(const moCudaIntVector & _vector) { moCudaIntVector& operator=(const moCudaIntVector & _vector) {
moCudaVector<int, Fitness> :: operator=(_vector);
N = _vector.N;
vect = new int[N];
for (unsigned i = 0; i < N; i++)
vect[i] = _vector.vect[i];
fitness(_vector.fitness());
return (*this);
} }
/** /**