git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2153 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
boufaras 2011-02-10 13:57:17 +00:00
commit 8e9fbc85ce

View file

@ -1,8 +1,8 @@
/*
/*
<t-moCudaBitNeighbor.cu>
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
Thé Van LUONG, Karima Boufaras
Karima Boufaras, Thé Van LUONG
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
@ -30,42 +30,42 @@
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
Contact: paradiseo-help@lists.gforge.inria.fr
*/
*/
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <cudaType/moCudaBitVector.h>
#include <neighborhood/moCudaBitNeighbor.h>
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <cudaType/moCudaBitVector.h>
#include <neighborhood/moCudaBitNeighbor.h>
typedef moCudaBitVector<eoMaximizingFitness> Solution;
typedef moCudaBitNeighbor<Solution,eoMaximizingFitness> Neighbor;
typedef moCudaBitVector<eoMaximizingFitness> Solution;
typedef moCudaBitNeighbor<Solution,eoMaximizingFitness> Neighbor;
int main() {
int main() {
std::cout << "[t-moCudaBitNeighbor] => START" << std::endl;
//test constructor
Neighbor test1, test2;
std::cout << "[t-moCudaBitNeighbor] => START" << std::endl;
//test constructor
Neighbor test1, test2;
test1.fitness(3);
//test operateur d'affectation
test2=test1;
assert(test1.fitness()==test2.fitness());
test1.fitness(3);
//test operateur d'affectation
test2=test1;
assert(test1.fitness()==test2.fitness());
//test operateur de copy
Neighbor test3(test1);
assert(test1.fitness()==test3.fitness());
//test operateur de copy
Neighbor test3(test1);
assert(test1.fitness()==test3.fitness());
test1.printOn(std::cout);
test2.printOn(std::cout);
test3.printOn(std::cout);
test1.printOn(std::cout);
test2.printOn(std::cout);
test3.printOn(std::cout);
assert(test1.className()=="moCudaBitNeighbor");
assert(test1.className()=="moCudaBitNeighbor");
std::cout << "[t-moCudaBitNeighbor] => OK" << std::endl;
std::cout << "[t-moCudaBitNeighbor] => OK" << std::endl;
return EXIT_SUCCESS;
}
return EXIT_SUCCESS;
}