Update for new version
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2667 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
83cdf11938
commit
aff23f2a6e
10 changed files with 34 additions and 32 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
<moGPUMappingNeighborhood.h>
|
<moGPUMappingNeighborhood.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Karima Boufaras, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
|
|
||||||
|
|
@ -30,11 +30,11 @@
|
||||||
#ifndef __moGPUMappingNeighborhood_h
|
#ifndef __moGPUMappingNeighborhood_h
|
||||||
#define __moGPUMappingNeighborhood_h
|
#define __moGPUMappingNeighborhood_h
|
||||||
|
|
||||||
#include <neighborhood/moMappingNeighborhood.h>
|
#include <neighborhood/moGPUMapping.h>
|
||||||
#include <eval/moGPUEval.h>
|
#include <eval/moGPUEval.h>
|
||||||
|
|
||||||
template<class N>
|
template<class N>
|
||||||
class moGPUMappingNeighborhood: public moMappingNeighborhood<N> {
|
class moGPUMappingNeighborhood: public moGPUMapping<N> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -45,12 +45,12 @@ public:
|
||||||
typedef N Neighbor;
|
typedef N Neighbor;
|
||||||
typedef typename Neighbor::EOT EOT;
|
typedef typename Neighbor::EOT EOT;
|
||||||
|
|
||||||
using moMappingNeighborhood<Neighbor>::neighborhoodSize;
|
using moGPUMapping<Neighbor>::neighborhoodSize;
|
||||||
using moMappingNeighborhood<Neighbor>::currentIndex;
|
using moGPUMapping<Neighbor>::currentIndex;
|
||||||
using moMappingNeighborhood<Neighbor>::indices;
|
using moGPUMapping<Neighbor>::indices;
|
||||||
using moMappingNeighborhood<Neighbor>::mapping;
|
using moGPUMapping<Neighbor>::mapping;
|
||||||
using moMappingNeighborhood<Neighbor>::xChange;
|
using moGPUMapping<Neighbor>::xChange;
|
||||||
using moMappingNeighborhood<Neighbor>::mutex;
|
using moGPUMapping<Neighbor>::mutex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
|
@ -60,7 +60,7 @@ public:
|
||||||
|
|
||||||
moGPUMappingNeighborhood(unsigned int _neighborhoodSize,
|
moGPUMappingNeighborhood(unsigned int _neighborhoodSize,
|
||||||
unsigned int _xChange) :
|
unsigned int _xChange) :
|
||||||
moMappingNeighborhood<Neighbor> (_neighborhoodSize, _xChange) {
|
moGPUMapping<Neighbor> (_neighborhoodSize, _xChange) {
|
||||||
sendMapping = false;
|
sendMapping = false;
|
||||||
cudaMalloc((void**) &device_Mapping, sizeof(unsigned int)
|
cudaMalloc((void**) &device_Mapping, sizeof(unsigned int)
|
||||||
* neighborhoodSize * _xChange);
|
* neighborhoodSize * _xChange);
|
||||||
|
|
@ -84,7 +84,7 @@ public:
|
||||||
|
|
||||||
virtual void init(EOT& _solution, Neighbor& _current) {
|
virtual void init(EOT& _solution, Neighbor& _current) {
|
||||||
|
|
||||||
moMappingNeighborhood<Neighbor>::init(_solution, _current);
|
moGPUMapping<Neighbor>::init(_solution, _current);
|
||||||
if (!sendMapping) {
|
if (!sendMapping) {
|
||||||
cudaMemcpy(device_Mapping, mapping,xChange * neighborhoodSize
|
cudaMemcpy(device_Mapping, mapping,xChange * neighborhoodSize
|
||||||
* sizeof(unsigned int), cudaMemcpyHostToDevice);
|
* sizeof(unsigned int), cudaMemcpyHostToDevice);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
<moGPUMappingNeighborhoodByCpy.h>
|
<moGPUMappingNeighborhoodByCpy.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Boufaras Karima, Thé Van Luong
|
Boufaras Karima, Thé Van Luong
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
<moGPUMappingNeighborhoodByModif.h>
|
<moGPUMappingNeighborhoodByModif.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Karima Boufaras, Thé Van Luong
|
Karima Boufaras, Thé Van Luong
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
<moNeighborhoodSizeUtils.h>
|
<moGPUNeighborhoodSizeUtils.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Karima Boufaras, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
|
|
||||||
|
|
@ -32,8 +32,8 @@
|
||||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _moNeighborhoodSizeUtils_h
|
#ifndef _moGPUNeighborhoodSizeUtils_h
|
||||||
#define _moNeighborhoodSizeUtils_h
|
#define _moGPUNeighborhoodSizeUtils_h
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the factorial of an integer
|
* @return the factorial of an integer
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
<moGPUOrderNeighborhoodByCpy.h>
|
<moGPUOrderNeighborhoodByCpy.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Karima Boufaras, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
<moGPUOrderNeighborhoodByModif.h>
|
<moGPUOrderNeighborhoodByModif.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Jerémie Humeau, Thé Van LUONG, Karima Boufaras
|
Karima Boufaras, Thé Van LUONG
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
This software is governed by the CeCILL license under French law and
|
||||||
abiding by the rules of distribution of free software. You can use,
|
abiding by the rules of distribution of free software. You can use,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
<moGPURndWithReplNeighborhoodByCpy.h>
|
<moGPURndWithReplNeighborhoodByCpy.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Jerémie Humeau, Karima Boufaras, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
This software is governed by the CeCILL license under French law and
|
||||||
abiding by the rules of distribution of free software. You can use,
|
abiding by the rules of distribution of free software. You can use,
|
||||||
|
|
@ -70,7 +70,7 @@ class moGPURndWithReplNeighborhoodByCpy: public moRndWithReplNeighborhood<Neighb
|
||||||
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
||||||
moRndWithReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
moRndWithReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
||||||
//Compute all neighbors fitness at one time
|
//Compute all neighbors fitness at one time
|
||||||
eval.neighborhoodEval(_solution,0,1);
|
eval.neighborhoodEval(_solution,0,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
<moGPURndWithReplNeighborhoodByModif.h>
|
<moGPURndWithReplNeighborhoodByModif.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Jerémie Humeau, Karima Boufaras, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
This software is governed by the CeCILL license under French law and
|
||||||
abiding by the rules of distribution of free software. You can use,
|
abiding by the rules of distribution of free software. You can use,
|
||||||
|
|
@ -69,7 +69,7 @@ class moGPURndWithReplNeighborhoodByModif: public moRndWithReplNeighborhood<Neig
|
||||||
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
||||||
moRndWithReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
moRndWithReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
||||||
//Compute all neighbors fitness at one time
|
//Compute all neighbors fitness at one time
|
||||||
eval.neighborhoodEval(_solution,0,1);
|
eval.neighborhoodEval(_solution,0,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
<moGPURndWithoutReplNeighborhood.h>
|
<moGPURndWithoutReplNeighborhood.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Jerémie Humeau, Boufaras Karima, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
This software is governed by the CeCILL license under French law and
|
This software is governed by the CeCILL license under French law and
|
||||||
abiding by the rules of distribution of free software. You can use,
|
abiding by the rules of distribution of free software. You can use,
|
||||||
modify and/ or redistribute the software under the terms of the CeCILL
|
modify and/ or redistribute the software under the terms of the CeCILL
|
||||||
|
|
@ -52,11 +52,13 @@ class moGPURndWithoutReplNeighborhood: public moRndWithoutReplNeighborhood<Neigh
|
||||||
using moRndWithoutReplNeighborhood<Neighbor>::neighborhoodSize;
|
using moRndWithoutReplNeighborhood<Neighbor>::neighborhoodSize;
|
||||||
using moRndWithoutReplNeighborhood<Neighbor>::maxIndex;
|
using moRndWithoutReplNeighborhood<Neighbor>::maxIndex;
|
||||||
using moRndWithoutReplNeighborhood<Neighbor>::indexVector;
|
using moRndWithoutReplNeighborhood<Neighbor>::indexVector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param _neighborhoodSize the size of the neighborhood
|
* @param _neighborhoodSize the size of the neighborhood
|
||||||
* @param _eval show how to evaluate neighborhood of a solution at one time
|
* @param _eval show how to evaluate neighborhood of a solution at one time
|
||||||
*/
|
*/
|
||||||
|
|
||||||
moGPURndWithoutReplNeighborhood(unsigned int _neighborhoodSize,moGPUEval<
|
moGPURndWithoutReplNeighborhood(unsigned int _neighborhoodSize,moGPUEval<
|
||||||
Neighbor>& _eval) :
|
Neighbor>& _eval) :
|
||||||
moRndWithoutReplNeighborhood<Neighbor> (_neighborhoodSize),eval(_eval) {
|
moRndWithoutReplNeighborhood<Neighbor> (_neighborhoodSize),eval(_eval) {
|
||||||
|
|
@ -72,7 +74,7 @@ class moGPURndWithoutReplNeighborhood: public moRndWithoutReplNeighborhood<Neigh
|
||||||
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
||||||
moRndWithoutReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
moRndWithoutReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
||||||
//Compute all neighbors fitness at one time
|
//Compute all neighbors fitness at one time
|
||||||
eval.neighborhoodEval(_solution,0,1);
|
eval.neighborhoodEval(_solution,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
<moGPURndWithoutReplNeighborhood.h>
|
<moGPURndWithoutReplNeighborhood.h>
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012
|
||||||
|
|
||||||
Jerémie Humeau, Boufaras Karima, Thé Van LUONG
|
Karima Boufaras, Thé Van LUONG
|
||||||
This software is governed by the CeCILL license under French law and
|
This software is governed by the CeCILL license under French law and
|
||||||
abiding by the rules of distribution of free software. You can use,
|
abiding by the rules of distribution of free software. You can use,
|
||||||
modify and/ or redistribute the software under the terms of the CeCILL
|
modify and/ or redistribute the software under the terms of the CeCILL
|
||||||
|
|
@ -72,7 +72,7 @@ class moGPURndWithoutReplNeighborhood: public moRndWithoutReplNeighborhood<Neigh
|
||||||
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
||||||
moRndWithoutReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
moRndWithoutReplNeighborhood<Neighbor>::init(_solution, _neighbor);
|
||||||
//Compute all neighbors fitness at one time
|
//Compute all neighbors fitness at one time
|
||||||
eval.neighborhoodEval(_solution,0,1);
|
eval.neighborhoodEval(_solution,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue