MPI: const correctness in Static Assignment constructor and reinit functions.
This commit is contained in:
parent
d8edf16189
commit
026764215f
2 changed files with 4 additions and 4 deletions
|
|
@ -99,7 +99,7 @@ namespace eo
|
||||||
* STATIC ASSIGNMENT ALGORITHM **************************
|
* STATIC ASSIGNMENT ALGORITHM **************************
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
|
|
||||||
StaticAssignmentAlgorithm::StaticAssignmentAlgorithm( std::vector<int>& workers, int runs )
|
StaticAssignmentAlgorithm::StaticAssignmentAlgorithm( const std::vector<int>& workers, int runs )
|
||||||
{
|
{
|
||||||
init( workers, runs );
|
init( workers, runs );
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +138,7 @@ namespace eo
|
||||||
init( workers, runs );
|
init( workers, runs );
|
||||||
}
|
}
|
||||||
|
|
||||||
void StaticAssignmentAlgorithm::init( std::vector<int> & workers, int runs )
|
void StaticAssignmentAlgorithm::init( const std::vector<int> & workers, int runs )
|
||||||
{
|
{
|
||||||
unsigned int nbWorkers = workers.size();
|
unsigned int nbWorkers = workers.size();
|
||||||
freeWorkers = nbWorkers;
|
freeWorkers = nbWorkers;
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ namespace eo
|
||||||
* @param workers std::vector of MPI ranks of workers which will be used.
|
* @param workers std::vector of MPI ranks of workers which will be used.
|
||||||
* @param runs Fixed amount of runs, strictly positive.
|
* @param runs Fixed amount of runs, strictly positive.
|
||||||
*/
|
*/
|
||||||
StaticAssignmentAlgorithm( std::vector<int>& workers, int runs );
|
StaticAssignmentAlgorithm( const std::vector<int>& workers, int runs );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Uses a range of workers.
|
* @brief Uses a range of workers.
|
||||||
|
|
@ -215,7 +215,7 @@ namespace eo
|
||||||
* @param workers Vector of hosts' ranks
|
* @param workers Vector of hosts' ranks
|
||||||
* @param runs Fixed amount of runs, strictly positive.
|
* @param runs Fixed amount of runs, strictly positive.
|
||||||
*/
|
*/
|
||||||
void init( std::vector<int> & workers, int runs );
|
void init( const std::vector<int> & workers, int runs );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int get( );
|
int get( );
|
||||||
|
|
|
||||||
Reference in a new issue