Commit d74e0ce0 authored by kruger's avatar kruger

Modele en ilot final ?

parent b7cdcc01
...@@ -20,16 +20,14 @@ Centre de Math ...@@ -20,16 +20,14 @@ Centre de Math
#define CUDA 4 #define CUDA 4
#define STD 5 #define STD 5
#define CMAES 6
#define MEMETIC 7
#define STD_FLAVOR_SO 0 #define STD_FLAVOR_SO 0
#define STD_FLAVOR_MO 1 #define STD_FLAVOR_MO 1
#define STD_FLAVOR_CMAES 2
#define STD_FLAVOR_MEMETIC 3
#define CUDA_FLAVOR_SO 0 #define CUDA_FLAVOR_SO 0
#define CUDA_FLAVOR_MO 1 #define CUDA_FLAVOR_MO 1
#define CUDA_FLAVOR_CMAES 2 #define CUDA_FLAVOR_GP 2
#define CUDA_FLAVOR_GP 3
#define CUDA_FLAVOR_MEMETIC 4
#define UNIX 1 #define UNIX 1
...@@ -44,22 +42,23 @@ extern int nClasses_nb; ...@@ -44,22 +42,23 @@ extern int nClasses_nb;
extern FILE *fpOutputFile, *fpTemplateFile, *fpGenomeFile, *fpExplodedGenomeFile; extern FILE *fpOutputFile, *fpTemplateFile, *fpGenomeFile, *fpExplodedGenomeFile;
extern char sRAW_PROJECT_NAME[], sPROJECT_NAME[], sEO_DIR[], sEZ_PATH[1000], sTPL_DIR[1000], sEZ_FILE_NAME[]; extern char sRAW_PROJECT_NAME[], sPROJECT_NAME[], sEO_DIR[], sEZ_PATH[1000], sTPL_DIR[1000], sEZ_FILE_NAME[];
extern char sLOWER_CASE_PROJECT_NAME[]; extern char sLOWER_CASE_PROJECT_NAME[];
extern float fSELECT_PRM, fRED_PAR_PRM, fRED_FINAL_PRM, fRED_OFF_PRM;
extern char sSELECTOR[], sSELECTOR_OPERATOR[], sRED_PAR[], sRED_PAR_OPERATOR[], sRED_FINAL[], sRED_FINAL_OPERATOR[], sRED_OFF[], sRED_OFF_OPERATOR[]; extern char sSELECTOR[], sSELECTOR_OPERATOR[], sRED_PAR[], sRED_PAR_OPERATOR[], sRED_FINAL[], sRED_FINAL_OPERATOR[], sRED_OFF[], sRED_OFF_OPERATOR[];
extern int nMINIMISE,nELITE; extern char sIP_FILE[];
extern bool bELITISM, bVERBOSE; extern bool bELITISM, bVERBOSE;
extern bool bBALDWINISM; extern bool bBALDWINISM;
extern bool bPRINT_STATS, bPLOT_STATS, bGENERATE_CSV_FILE, bGENERATE_GNUPLOT_SCRIPT, bGENERATE_R_SCRIPT; extern bool bPRINT_STATS, bPLOT_STATS, bGENERATE_CSV_FILE, bGENERATE_GNUPLOT_SCRIPT, bGENERATE_R_SCRIPT;
extern bool bSAVE_POPULATION, bSTART_FROM_FILE; extern bool bSAVE_POPULATION, bSTART_FROM_FILE;
extern bool bREMOTE_ISLAND_MODEL;
extern bool bLINE_NUM_EZ_FILE;
extern char* nGENOME_NAME; extern char* nGENOME_NAME;
extern int nPOP_SIZE, nNB_GEN, nNB_OPT_IT, nOFF_SIZE, nPROBLEM_DIM, nTIME_LIMIT; extern int nPOP_SIZE, nNB_GEN, nNB_OPT_IT, nOFF_SIZE, nPROBLEM_DIM, nTIME_LIMIT;
extern float fMUT_PROB, fXOVER_PROB, fSURV_PAR_SIZE, fSURV_OFF_SIZE;
extern bool bREMOTE_ISLAND_MODEL;
extern int nWARNINGS, nERRORS; extern int nWARNINGS, nERRORS;
extern int TARGET, OPERATING_SYSTEM; extern int TARGET, OPERATING_SYSTEM;
extern int TARGET_FLAVOR; extern int TARGET_FLAVOR;
extern bool bLINE_NUM_EZ_FILE; extern int nMINIMISE,nELITE;
extern float fMUT_PROB, fXOVER_PROB, fSURV_PAR_SIZE, fSURV_OFF_SIZE;
extern float fSELECT_PRM, fRED_PAR_PRM, fRED_FINAL_PRM, fRED_OFF_PRM;
extern unsigned iMAX_INIT_TREE_D,iMIN_INIT_TREE_D,iMAX_TREE_D,iNB_GPU,iPRG_BUF_SIZE,iMAX_TREE_DEPTH,iNO_FITNESS_CASES; extern unsigned iMAX_INIT_TREE_D,iMIN_INIT_TREE_D,iMAX_TREE_D,iNB_GPU,iPRG_BUF_SIZE,iMAX_TREE_DEPTH,iNO_FITNESS_CASES;
// Prototypes // Prototypes
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1115,6 +1115,7 @@ if(OPERATING_SYSTEM=WINDOWS) ...@@ -1115,6 +1115,7 @@ if(OPERATING_SYSTEM=WINDOWS)
<TEMPLATE_ANALYSIS>"\\BALDWINISM" {fprintf(fpOutputFile,"%d",bBALDWINISM);} <TEMPLATE_ANALYSIS>"\\BALDWINISM" {fprintf(fpOutputFile,"%d",bBALDWINISM);}
<TEMPLATE_ANALYSIS>"\\REMOTE_ISLAND_MODEL" {fprintf(fpOutputFile,"%d",bREMOTE_ISLAND_MODEL);} <TEMPLATE_ANALYSIS>"\\REMOTE_ISLAND_MODEL" {fprintf(fpOutputFile,"%d",bREMOTE_ISLAND_MODEL);}
<TEMPLATE_ANALYSIS>"\\IP_FILE" {if(strlen(sIP_FILE)>0)fprintf(fpOutputFile,"%s",sIP_FILE); else fprintf(fpOutputFile,"NULL");}
<TEMPLATE_ANALYSIS>"\\PRINT_STATS" {fprintf(fpOutputFile,"%d",bPRINT_STATS);} <TEMPLATE_ANALYSIS>"\\PRINT_STATS" {fprintf(fpOutputFile,"%d",bPRINT_STATS);}
<TEMPLATE_ANALYSIS>"\\PLOT_STATS" {fprintf(fpOutputFile,"%d",bPLOT_STATS);} <TEMPLATE_ANALYSIS>"\\PLOT_STATS" {fprintf(fpOutputFile,"%d",bPLOT_STATS);}
...@@ -2121,6 +2122,7 @@ if(OPERATING_SYSTEM=WINDOWS) ...@@ -2121,6 +2122,7 @@ if(OPERATING_SYSTEM=WINDOWS)
<GET_PARAMETERS>"Baldwinism"[ \t\n]*":"[ \t\n]* {if (bVERBOSE) printf ("\tBaldwinism...\n");return BALDWINISM;} <GET_PARAMETERS>"Baldwinism"[ \t\n]*":"[ \t\n]* {if (bVERBOSE) printf ("\tBaldwinism...\n");return BALDWINISM;}
<GET_PARAMETERS>"Remote"[ \t\n]+"island"[ \t\n]+"model"[ \t\n]*":"[ \t\n]* {if(bVERBOSE) printf ("\tRemote Island Model...\n"); return REMOTE_ISLAND_MODEL;} <GET_PARAMETERS>"Remote"[ \t\n]+"island"[ \t\n]+"model"[ \t\n]*":"[ \t\n]* {if(bVERBOSE) printf ("\tRemote Island Model...\n"); return REMOTE_ISLAND_MODEL;}
<GET_PARAMETERS>"IP"[ \t\n]+"file"[ \t\n]*":"[ \t\n]* {if(bVERBOSE) printf("\tIP File...\n"); return IP_FILE;}
// number // number
...@@ -2274,11 +2276,11 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable) ...@@ -2274,11 +2276,11 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable)
if (TARGET==CUDA){ if (TARGET==CUDA){
if(TARGET_FLAVOR == CUDA_FLAVOR_SO ) if(TARGET_FLAVOR == CUDA_FLAVOR_SO )
strcat(sTemp,"CUDA.tpl"); strcat(sTemp,"CUDA.tpl");
else if(TARGET_FLAVOR == CUDA_FLAVOR_CMAES ) else if(TARGET_FLAVOR == CMAES )
strcat(sTemp,"CMAES_CUDA.tpl"); strcat(sTemp,"CMAES_CUDA.tpl");
else if( TARGET_FLAVOR == CUDA_FLAVOR_GP ) else if( TARGET_FLAVOR == CUDA_FLAVOR_GP )
strcat(sTemp,"CUDA_GP.tpl"); strcat(sTemp,"CUDA_GP.tpl");
else if(TARGET_FLAVOR == CUDA_FLAVOR_MEMETIC ) else if(TARGET_FLAVOR == MEMETIC )
strcat(sTemp,"CUDA_MEM.tpl"); strcat(sTemp,"CUDA_MEM.tpl");
else else
strcat(sTemp,"CUDA_MO.tpl"); strcat(sTemp,"CUDA_MO.tpl");
...@@ -2292,9 +2294,9 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable) ...@@ -2292,9 +2294,9 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable)
if (TARGET==STD){ if (TARGET==STD){
if(TARGET_FLAVOR == STD_FLAVOR_SO) if(TARGET_FLAVOR == STD_FLAVOR_SO)
strcat(sTemp,"STD.tpl"); strcat(sTemp,"STD.tpl");
else if (TARGET_FLAVOR == STD_FLAVOR_CMAES) else if (TARGET_FLAVOR == CMAES)
strcat(sTemp,"CMAES.tpl"); strcat(sTemp,"CMAES.tpl");
else if (TARGET_FLAVOR == STD_FLAVOR_MEMETIC ) else if (TARGET_FLAVOR == MEMETIC )
strcat(sTemp,"STD_MEM.tpl"); strcat(sTemp,"STD_MEM.tpl");
else else
strcat(sTemp,"STD_MO.tpl"); strcat(sTemp,"STD_MO.tpl");
......
...@@ -50,8 +50,9 @@ bool bPRINT_STATS=1; ...@@ -50,8 +50,9 @@ bool bPRINT_STATS=1;
bool bPLOT_STATS=0; bool bPLOT_STATS=0;
bool bGENERATE_CSV_FILE=0, bGENERATE_R_SCRIPT=0, bGENERATE_GNUPLOT_SCRIPT=0; bool bGENERATE_CSV_FILE=0, bGENERATE_R_SCRIPT=0, bGENERATE_GNUPLOT_SCRIPT=0;
bool bSAVE_POPULATION=0, bSTART_FROM_FILE=0; bool bSAVE_POPULATION=0, bSTART_FROM_FILE=0;
bool bBALDWINISM=0; bool bBALDWINISM=0; //memetic
bool bREMOTE_ISLAND_MODEL=0; bool bREMOTE_ISLAND_MODEL=0; //remote island model
char sIP_FILE[128]; //remote island model
int nPOP_SIZE, nOFF_SIZE; int nPOP_SIZE, nOFF_SIZE;
float fSURV_PAR_SIZE=-1.0, fSURV_OFF_SIZE=-1.0; float fSURV_PAR_SIZE=-1.0, fSURV_OFF_SIZE=-1.0;
char *nGENOME_NAME; char *nGENOME_NAME;
...@@ -65,7 +66,7 @@ FILE *fpOutputFile, *fpTemplateFile, *fpGenomeFile;//, *fpExplodedGenomeFile; ...@@ -65,7 +66,7 @@ FILE *fpOutputFile, *fpTemplateFile, *fpGenomeFile;//, *fpExplodedGenomeFile;
unsigned iMAX_INIT_TREE_D,iMIN_INIT_TREE_D,iMAX_TREE_D,iNB_GPU,iPRG_BUF_SIZE,iMAX_TREE_DEPTH,iMAX_XOVER_DEPTH,iNO_FITNESS_CASES; unsigned iMAX_INIT_TREE_D,iMIN_INIT_TREE_D,iMAX_TREE_D,iNB_GPU,iPRG_BUF_SIZE,iMAX_TREE_DEPTH,iMAX_XOVER_DEPTH,iNO_FITNESS_CASES;
#line 69 "EaseaParse.cpp" #line 70 "EaseaParse.cpp"
// repeated because of possible precompiled header // repeated because of possible precompiled header
#include <cyacc.h> #include <cyacc.h>
...@@ -77,7 +78,7 @@ FILE *fpOutputFile, *fpTemplateFile, *fpGenomeFile;//, *fpExplodedGenomeFile; ...@@ -77,7 +78,7 @@ FILE *fpOutputFile, *fpTemplateFile, *fpGenomeFile;//, *fpExplodedGenomeFile;
YYPARSENAME::YYPARSENAME() YYPARSENAME::YYPARSENAME()
{ {
yytables(); yytables();
#line 177 "EaseaParse.y" #line 179 "EaseaParse.y"
CSymbol *pNewBaseType; CSymbol *pNewBaseType;
...@@ -111,7 +112,7 @@ YYPARSENAME::YYPARSENAME() ...@@ -111,7 +112,7 @@ YYPARSENAME::YYPARSENAME()
pNewBaseType->ObjectType=oBaseClass; pNewBaseType->ObjectType=oBaseClass;
SymbolTable.insert(pNewBaseType); SymbolTable.insert(pNewBaseType);
#line 115 "EaseaParse.cpp" #line 116 "EaseaParse.cpp"
} }
#ifndef YYSTYPE #ifndef YYSTYPE
...@@ -156,12 +157,12 @@ void YYPARSENAME::yyaction(int action) ...@@ -156,12 +157,12 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 217 "EaseaParse.y" #line 219 "EaseaParse.y"
if (bVERBOSE){ printf(" _______________________________________\n"); if (bVERBOSE){ printf(" _______________________________________\n");
printf ("\nGeneration of the C++ source file for %s.\n\n",sPROJECT_NAME);} printf ("\nGeneration of the C++ source file for %s.\n\n",sPROJECT_NAME);}
#line 165 "EaseaParse.cpp" #line 166 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -172,12 +173,12 @@ void YYPARSENAME::yyaction(int action) ...@@ -172,12 +173,12 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 222 "EaseaParse.y" #line 224 "EaseaParse.y"
if (bVERBOSE) printf(" _______________________________________\n"); if (bVERBOSE) printf(" _______________________________________\n");
if (bVERBOSE) printf ("\nGeneration of the C++ source file for %s.\n\n",sPROJECT_NAME); if (bVERBOSE) printf ("\nGeneration of the C++ source file for %s.\n\n",sPROJECT_NAME);
#line 181 "EaseaParse.cpp" #line 182 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -188,10 +189,10 @@ void YYPARSENAME::yyaction(int action) ...@@ -188,10 +189,10 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 230 "EaseaParse.y" #line 232 "EaseaParse.y"
if (bVERBOSE) printf("Declaration of user classes :\n\n"); if (bVERBOSE) printf("Declaration of user classes :\n\n");
#line 195 "EaseaParse.cpp" #line 196 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -202,10 +203,10 @@ void YYPARSENAME::yyaction(int action) ...@@ -202,10 +203,10 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 233 "EaseaParse.y" #line 235 "EaseaParse.y"
if (bVERBOSE) printf("No user class declaration found other than GenomeClass.\n"); if (bVERBOSE) printf("No user class declaration found other than GenomeClass.\n");
#line 209 "EaseaParse.cpp" #line 210 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -216,7 +217,7 @@ void YYPARSENAME::yyaction(int action) ...@@ -216,7 +217,7 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 243 "EaseaParse.y" #line 245 "EaseaParse.y"
pCURRENT_CLASS=SymbolTable.insert(yyattribute(1 - 1).pSymbol); pCURRENT_CLASS=SymbolTable.insert(yyattribute(1 - 1).pSymbol);
pCURRENT_CLASS->pSymbolList=new CLList<CSymbol *>(); pCURRENT_CLASS->pSymbolList=new CLList<CSymbol *>();
...@@ -224,7 +225,7 @@ void YYPARSENAME::yyaction(int action) ...@@ -224,7 +225,7 @@ void YYPARSENAME::yyaction(int action)
//DEBUG_PRT("Yacc Symbol declaration %s %d",$1->sName,$1->nSize); //DEBUG_PRT("Yacc Symbol declaration %s %d",$1->sName,$1->nSize);
pCLASSES[nClasses_nb++] = yyattribute(1 - 1).pSymbol; pCLASSES[nClasses_nb++] = yyattribute(1 - 1).pSymbol;
#line 228 "EaseaParse.cpp" #line 229 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -235,12 +236,12 @@ void YYPARSENAME::yyaction(int action) ...@@ -235,12 +236,12 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 6); yyinitdebug((void YYFAR**)yya, 6);
#endif #endif
{ {
#line 250 "EaseaParse.y" #line 252 "EaseaParse.y"
if (bVERBOSE) printf("Class %s declared for %d bytes.\n\n",yyattribute(1 - 5).pSymbol->sName,yyattribute(1 - 5).pSymbol->nSize); if (bVERBOSE) printf("Class %s declared for %d bytes.\n\n",yyattribute(1 - 5).pSymbol->sName,yyattribute(1 - 5).pSymbol->nSize);
//DEBUG_PRT("Yacc variable declaration %s %d",$1->sName,$1->nSize); //DEBUG_PRT("Yacc variable declaration %s %d",$1->sName,$1->nSize);
#line 244 "EaseaParse.cpp" #line 245 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -251,9 +252,9 @@ void YYPARSENAME::yyaction(int action) ...@@ -251,9 +252,9 @@ void YYPARSENAME::yyaction(int action)
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 263 "EaseaParse.y" #line 265 "EaseaParse.y"
pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattribute(1 - 2).ObjectQualifier; pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattribute(1 - 2).ObjectQualifier;
#line 257 "EaseaParse.cpp" #line 258 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -264,9 +265,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -264,9 +265,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 5); yyinitdebug((void YYFAR**)yya, 5);
#endif #endif
{ {
#line 263 "EaseaParse.y" #line 265 "EaseaParse.y"
#line 270 "EaseaParse.cpp" #line 271 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -277,9 +278,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -277,9 +278,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 264 "EaseaParse.y" #line 266 "EaseaParse.y"
pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattribute(1 - 2).ObjectQualifier; pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattribute(1 - 2).ObjectQualifier;
#line 283 "EaseaParse.cpp" #line 284 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -290,9 +291,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -290,9 +291,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 5); yyinitdebug((void YYFAR**)yya, 5);
#endif #endif
{ {
#line 264 "EaseaParse.y" #line 266 "EaseaParse.y"
#line 296 "EaseaParse.cpp" #line 297 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -303,13 +304,13 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -303,13 +304,13 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 269 "EaseaParse.y" #line 271 "EaseaParse.y"
pCURRENT_CLASS->sString = new char[strlen(yyattribute(2 - 2).szString) + 1]; pCURRENT_CLASS->sString = new char[strlen(yyattribute(2 - 2).szString) + 1];
strcpy(pCURRENT_CLASS->sString, yyattribute(2 - 2).szString); strcpy(pCURRENT_CLASS->sString, yyattribute(2 - 2).szString);
if (bVERBOSE) printf("\n The following methods have been declared:\n\n%s\n\n",pCURRENT_CLASS->sString); if (bVERBOSE) printf("\n The following methods have been declared:\n\n%s\n\n",pCURRENT_CLASS->sString);
#line 313 "EaseaParse.cpp" #line 314 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -320,17 +321,17 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -320,17 +321,17 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 277 "EaseaParse.y" #line 279 "EaseaParse.y"
(*(YYSTYPE YYFAR*)yyvalptr).ObjectQualifier=1; (*(YYSTYPE YYFAR*)yyvalptr).ObjectQualifier=1;
#line 326 "EaseaParse.cpp" #line 327 "EaseaParse.cpp"
} }
} }
break; break;
case 12: case 12:
{ {
#line 278 "EaseaParse.y" #line 280 "EaseaParse.y"
(*(YYSTYPE YYFAR*)yyvalptr).ObjectQualifier=0; (*(YYSTYPE YYFAR*)yyvalptr).ObjectQualifier=0;
#line 334 "EaseaParse.cpp" #line 335 "EaseaParse.cpp"
} }
break; break;
case 13: case 13:
...@@ -340,9 +341,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -340,9 +341,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 5); yyinitdebug((void YYFAR**)yya, 5);
#endif #endif
{ {
#line 283 "EaseaParse.y" #line 285 "EaseaParse.y"
#line 346 "EaseaParse.cpp" #line 347 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -353,9 +354,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -353,9 +354,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 287 "EaseaParse.y" #line 289 "EaseaParse.y"
#line 359 "EaseaParse.cpp" #line 360 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -366,9 +367,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -366,9 +367,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 5); yyinitdebug((void YYFAR**)yya, 5);
#endif #endif
{ {
#line 288 "EaseaParse.y" #line 290 "EaseaParse.y"
#line 372 "EaseaParse.cpp" #line 373 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -379,7 +380,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -379,7 +380,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 302 "EaseaParse.y" #line 304 "EaseaParse.y"
CSymbol *pSym=SymbolTable.find(yyattribute(1 - 1).pSymbol->sName); CSymbol *pSym=SymbolTable.find(yyattribute(1 - 1).pSymbol->sName);
if (pSym==NULL) { if (pSym==NULL) {
...@@ -389,7 +390,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -389,7 +390,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
} }
else (*(YYSTYPE YYFAR*)yyvalptr).pSymbol=pSym; else (*(YYSTYPE YYFAR*)yyvalptr).pSymbol=pSym;
#line 393 "EaseaParse.cpp" #line 394 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -400,7 +401,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -400,7 +401,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);
#endif #endif
{ {
#line 323 "EaseaParse.y" #line 325 "EaseaParse.y"
// CSymbol *pSym; // CSymbol *pSym;
// pSym=$1; // pSym=$1;
...@@ -413,7 +414,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -413,7 +414,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(1 - 1).pSymbol)); pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(1 - 1).pSymbol));
if (bVERBOSE) printf(" %s variable declared (%d bytes)\n",yyattribute(1 - 1).pSymbol->sName,yyattribute(1 - 1).pSymbol->nSize); if (bVERBOSE) printf(" %s variable declared (%d bytes)\n",yyattribute(1 - 1).pSymbol->sName,yyattribute(1 - 1).pSymbol->nSize);
#line 417 "EaseaParse.cpp" #line 418 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -424,7 +425,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -424,7 +425,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 335 "EaseaParse.y" #line 337 "EaseaParse.y"
yyattribute(2 - 2).pSymbol->nSize=sizeof (char *); yyattribute(2 - 2).pSymbol->nSize=sizeof (char *);
yyattribute(2 - 2).pSymbol->pClass=pCURRENT_CLASS; yyattribute(2 - 2).pSymbol->pClass=pCURRENT_CLASS;
...@@ -435,7 +436,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -435,7 +436,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(2 - 2).pSymbol)); pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(2 - 2).pSymbol));
if (bVERBOSE) printf(" %s pointer declared (%d bytes)\n",yyattribute(2 - 2).pSymbol->sName,yyattribute(2 - 2).pSymbol->nSize); if (bVERBOSE) printf(" %s pointer declared (%d bytes)\n",yyattribute(2 - 2).pSymbol->sName,yyattribute(2 - 2).pSymbol->nSize);
#line 439 "EaseaParse.cpp" #line 440 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -446,7 +447,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -446,7 +447,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 3); yyinitdebug((void YYFAR**)yya, 3);
#endif #endif
{ {
#line 345 "EaseaParse.y" #line 347 "EaseaParse.y"
yyattribute(2 - 2).pSymbol->nSize=sizeof (char *); yyattribute(2 - 2).pSymbol->nSize=sizeof (char *);
yyattribute(2 - 2).pSymbol->pClass=pCURRENT_CLASS; yyattribute(2 - 2).pSymbol->pClass=pCURRENT_CLASS;
...@@ -457,7 +458,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -457,7 +458,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(2 - 2).pSymbol)); pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(2 - 2).pSymbol));
if (bVERBOSE) printf(" %s NULL pointer declared (%d bytes)\n",yyattribute(2 - 2).pSymbol->sName,yyattribute(2 - 2).pSymbol->nSize); if (bVERBOSE) printf(" %s NULL pointer declared (%d bytes)\n",yyattribute(2 - 2).pSymbol->sName,yyattribute(2 - 2).pSymbol->nSize);
#line 461 "EaseaParse.cpp" #line 462 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -468,7 +469,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -468,7 +469,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 4); yyinitdebug((void YYFAR**)yya, 4);
#endif #endif
{ {
#line 355 "EaseaParse.y" #line 357 "EaseaParse.y"
yyattribute(3 - 3).pSymbol->nSize=sizeof (char *); yyattribute(3 - 3).pSymbol->nSize=sizeof (char *);
yyattribute(3 - 3).pSymbol->pClass=pCURRENT_CLASS; yyattribute(3 - 3).pSymbol->pClass=pCURRENT_CLASS;
...@@ -481,7 +482,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -481,7 +482,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
fprintf(stderr,"Pointer of pointer doesn't work properly yet\n"); fprintf(stderr,"Pointer of pointer doesn't work properly yet\n");
exit(-1); exit(-1);
#line 485 "EaseaParse.cpp" #line 486 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -492,9 +493,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -492,9 +493,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 5); yyinitdebug((void YYFAR**)yya, 5);
#endif #endif
{ {
#line 368 "EaseaParse.y" #line 370 "EaseaParse.y"
if((TARGET_FLAVOR==STD_FLAVOR_CMAES || TARGET_FLAVOR==CUDA_FLAVOR_CMAES) && nPROBLEM_DIM==0 && strcmp(pCURRENT_CLASS->sName,"Genome")==0) { nGENOME_NAME=yyattribute(1 - 4).pSymbol->sName; nPROBLEM_DIM=(int)yyattribute(3 - 4).dValue;} if((TARGET_FLAVOR==CMAES) && nPROBLEM_DIM==0 && strcmp(pCURRENT_CLASS->sName,"Genome")==0) { nGENOME_NAME=yyattribute(1 - 4).pSymbol->sName; nPROBLEM_DIM=(int)yyattribute(3 - 4).dValue;}
printf("DEBUG : size of $3 %d nSize %d\n",(int)yyattribute(3 - 4).dValue,pCURRENT_TYPE->nSize); printf("DEBUG : size of $3 %d nSize %d\n",(int)yyattribute(3 - 4).dValue,pCURRENT_TYPE->nSize);
...@@ -507,7 +508,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -507,7 +508,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(1 - 4).pSymbol)); pCURRENT_CLASS->pSymbolList->addFirst((CSymbol *)(yyattribute(1 - 4).pSymbol));
if (bVERBOSE) printf(" %s array declared (%d bytes)\n",yyattribute(1 - 4).pSymbol->sName,yyattribute(1 - 4).pSymbol->nSize); if (bVERBOSE) printf(" %s array declared (%d bytes)\n",yyattribute(1 - 4).pSymbol->sName,yyattribute(1 - 4).pSymbol->nSize);
#line 511 "EaseaParse.cpp" #line 512 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -518,11 +519,11 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -518,11 +519,11 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 6); yyinitdebug((void YYFAR**)yya, 6);
#endif #endif
{ {
#line 382 "EaseaParse.y" #line 384 "EaseaParse.y"
// this is for support of pointer array. This should be done in a more generic way in a later version // this is for support of pointer array. This should be done in a more generic way in a later version
if((TARGET_FLAVOR==STD_FLAVOR_CMAES || TARGET_FLAVOR==CUDA_FLAVOR_CMAES) && nPROBLEM_DIM==0 && strcmp(pCURRENT_CLASS->sName,"Genome")==0) { if((TARGET_FLAVOR==CMAES) && nPROBLEM_DIM==0 && strcmp(pCURRENT_CLASS->sName,"Genome")==0) {
nGENOME_NAME=yyattribute(2 - 5).pSymbol->sName; nPROBLEM_DIM=(int)yyattribute(4 - 5).dValue; nGENOME_NAME=yyattribute(2 - 5).pSymbol->sName; nPROBLEM_DIM=(int)yyattribute(4 - 5).dValue;
} }
...@@ -539,7 +540,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -539,7 +540,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
printf("DEBUG : size of $4 %d nSize %d\n",(int)yyattribute(4 - 5).dValue,pCURRENT_TYPE->nSize); printf("DEBUG : size of $4 %d nSize %d\n",(int)yyattribute(4 - 5).dValue,pCURRENT_TYPE->nSize);
if (bVERBOSE) printf(" %s array of pointers declared (%d bytes)\n",yyattribute(2 - 5).pSymbol->sName,yyattribute(2 - 5).pSymbol->nSize); if (bVERBOSE) printf(" %s array of pointers declared (%d bytes)\n",yyattribute(2 - 5).pSymbol->sName,yyattribute(2 - 5).pSymbol->nSize);
#line 543 "EaseaParse.cpp" #line 544 "EaseaParse.cpp"
} }
} }
break; break;
...@@ -550,9 +551,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri ...@@ -550,9 +551,9 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
yyinitdebug((void YYFAR**)yya, 2); yyinitdebug((void YYFAR**)yya, 2);