#include "Init.h"


/****f* init.c/InitData
* NAME
*   InitData
* USAGE
*   void InitData(int argc, char** argv,
*                 int &size,  int &maxBlocks, int &maxThreads, int &seed
*                )
* DESCRIPTION
*   Initialisation de donnees a partir de la ligne de commandes.
*   Options :
*	-n=<value>, <value> nombre entier
*	-threads=<value>, <value> nombre de threads max.,
*	-blocks=<value>, <value> nombre de blocks max.,
* EXAMPLE
*   
* INPUTS
*   
* OUTPUT
*    
* RETURN VALUE
*   
* CREATION DATE
*   03 avril 2013 (a partir de sources NVIDIA)
* MODIFICATION HISTORY
*   None
* NOTES
*   
* AUTHOR
*   Cuvelier F., cuvelier@math.univ-paris13.fr
* SOURCE
*/
void InitData(int argc, char** argv,
              int &size, int &maxBlocks ,int &maxThreads, int &seed
	     ){
  if (checkCmdLineFlag(argc, (const char **) argv, "seed"))
    seed = getCmdLineArgumentInt(argc, (const char **) argv, "seed");
  if (checkCmdLineFlag(argc, (const char **) argv, "n"))
    size = getCmdLineArgumentInt(argc, (const char **) argv, "n");
  if (checkCmdLineFlag(argc, (const char **) argv, "threads"))
    maxThreads = getCmdLineArgumentInt(argc, (const char **) argv, "threads");
  if (checkCmdLineFlag(argc, (const char **) argv, "blocks"))
    maxBlocks = getCmdLineArgumentInt(argc, (const char **) argv, "blocks");
  
}
/*****/