Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
easea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Arnaud Kress
easea
Commits
12a5e569
Commit
12a5e569
authored
Dec 21, 2009
by
kruger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correction d'erreurs mineures et mise a jour des tpl
parent
5e121a27
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
35 deletions
+48
-35
examples/cmaes_cuda_test/cigtabGPU.ez
examples/cmaes_cuda_test/cigtabGPU.ez
+3
-1
examples/cmaes_tests/cigtab.ez
examples/cmaes_tests/cigtab.ez
+4
-2
examples/weierstrass_gpu/weierstrass.ez
examples/weierstrass_gpu/weierstrass.ez
+1
-1
examples/weierstrass_std/weierstrass.ez
examples/weierstrass_std/weierstrass.ez
+1
-1
libeasea/CEvolutionaryAlgorithm.cpp
libeasea/CEvolutionaryAlgorithm.cpp
+5
-0
tpl/CMAES.tpl
tpl/CMAES.tpl
+6
-4
tpl/CMAES_CUDA.tpl
tpl/CMAES_CUDA.tpl
+18
-13
tpl/CUDA.tpl
tpl/CUDA.tpl
+6
-10
tpl/STD.tpl
tpl/STD.tpl
+4
-3
No files found.
examples/cmaes_cuda_test/cigtabGPU.ez
View file @
12a5e569
...
...
@@ -114,7 +114,9 @@ CPPFLAGS+=
Elitism: Strong //Weak or Strong
Elite: 5
Print stats:1 //Default: 1
Print stats to file:0
Generate csv stats file:0
Generate gnuplot script:0
Generate R script:0
Plot stats:0 //Default: 0
\end
examples/cmaes_tests/cigtab.ez
View file @
12a5e569
*_________________________________________________________
/
*_________________________________________________________
Test functions
__________________________________________________________*/
...
...
@@ -119,7 +119,9 @@ LIBS+=
Elitism: Strong //Weak or Strong
Elite: 5
Print stats:1 //Default: 1
Print stats to file:0
Generate csv stats file:0
Generate gnuplot script:0
Generate R script:0
Plot stats:0 //Default: 0
\end
examples/weierstrass_gpu/weierstrass.ez
View file @
12a5e569
...
...
@@ -165,7 +165,7 @@ CPPFLAGS+=
Print stats:1 //Default: 1
Plot stats:0 //Default: 0
Generate c
vs
stats file:0
Generate c
sv
stats file:0
Generate gnuplot script:0
Generate R script:0
...
...
examples/weierstrass_std/weierstrass.ez
View file @
12a5e569
...
...
@@ -167,7 +167,7 @@ CPPFLAGS+=
Elitism: Strong //Weak or Strong
Elite: 1
Print stats:1 //Default: 1
Generate c
vs
stats file:0
Generate c
sv
stats file:0
Generate gnuplot script:0
Generate R script:0
Plot stats:0 //Default: 0
...
...
libeasea/CEvolutionaryAlgorithm.cpp
View file @
12a5e569
...
...
@@ -292,7 +292,12 @@ void CEvolutionaryAlgorithm::showPopulationStats(struct timeval beginTime){
#endif
#ifdef WIN32
params
->
timeCriterion
->
setElapsedTime
(
duration
);
#else
params
->
timeCriterion
->
setElapsedTime
(
res
.
tv_sec
);
#endif
}
void
CEvolutionaryAlgorithm
::
outputGraph
(){
...
...
tpl/CMAES.tpl
View file @
12a5e569
...
...
@@ -2,6 +2,7 @@
#ifdef WIN32
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "libEasea.lib")
#pragma comment(lib, "Winmm.lib")
#endif
/**
This is program entry for CMAES template for EASEA
...
...
@@ -28,6 +29,7 @@ float* pEZ_MUT_PROB = NULL;
float* pEZ_XOVER_PROB = NULL;
size_t *EZ_NB_GEN;
size_t *EZ_current_generation;
CEvolutionaryAlgorithm* EA;
CCmaes *cma;
//CMA cma;
...
...
@@ -85,7 +87,7 @@ using namespace std;
CRandomGenerator* globalRandomGenerator;
extern CEvolutionaryAlgorithm* EA;
#define STD_TPL
\INSERT_USER_DECLARATIONS
...
...
@@ -280,7 +282,7 @@ void ParametersImpl::setDefaultParameters(int argc, char** argv){
this->randomGenerator = globalRandomGenerator;
this->printStats = setVariable("printStats",\PRINT_STATS);
this->generateCVSFile = setVariable("generateC
VS
File",\GENERATE_CVS_FILE);
this->generateCVSFile = setVariable("generateC
SV
File",\GENERATE_CVS_FILE);
this->generateGnuplotScript = setVariable("generateGnuplotScript",\GENERATE_GNUPLOT_SCRIPT);
this->generateRScript = setVariable("generateRScript",\GENERATE_R_SCRIPT);
this->plotStats = setVariable("plotStats",\PLOT_STATS);
...
...
@@ -477,7 +479,7 @@ easeaclean:
EnableIntrinsicFunctions=
"true"
AdditionalIncludeDirectories=
""\EZ_PATHlibEasea""
PreprocessorDefinitions=
"WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary=
"
2
"
RuntimeLibrary=
"
0
"
EnableFunctionLevelLinking=
"true"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
...
...
@@ -591,7 +593,7 @@ easeaclean:
--plotStats=\PLOT_STATS #plot Stats with gnuplot (requires Gnuplot)
--printInitialPopulation=0 #Print initial population
--printFinalPopulation=0 #Print final population
--generateC
VS
File=\GENERATE_CVS_FILE
--generateC
SV
File=\GENERATE_CVS_FILE
--generateGnuplotScript=\GENERATE_GNUPLOT_SCRIPT
--generateRScript=\GENERATE_R_SCRIPT
...
...
tpl/CMAES_CUDA.tpl
View file @
12a5e569
...
...
@@ -2,6 +2,7 @@
#ifdef WIN32
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "libEasea.lib")
#pragma comment(lib, "Winmm.lib")
#endif
/**
This is program entry for CMAES_CUDA template for EASEA
...
...
@@ -28,6 +29,7 @@ float* pEZ_MUT_PROB = NULL;
float* pEZ_XOVER_PROB = NULL;
size_t *EZ_NB_GEN;
size_t *EZ_current_generation;
CEvolutionaryAlgorithm *EA;
CCmaesCuda *cma;
...
...
@@ -88,7 +90,7 @@ using namespace std;
CRandomGenerator* globalRandomGenerator;
extern CEvolutionaryAlgorithm* EA;
#define CUDA_TPL
void* d_offspringPopulationcuda;
...
...
@@ -138,7 +140,7 @@ void EASEAInit(int argc, char** argv){
}
void
EASEAFinal
(
CPopulation*
pop
){
\
INSERT_FINALIZATION_FCT_CALL
\
INSERT_FINALIZATION_FCT_CALL
;
delete
(
cma
);
}
...
...
@@ -230,7 +232,7 @@ CIndividual* IndividualImpl::crossover(CIndividual** ps){
IndividualImpl** tmp = (IndividualImpl**)ps;
IndividualImpl parent1(*this);
IndividualImpl parent2(*tmp[0]);
IndividualImpl child(*this);
IndividualImpl child
1
(*this);
////DEBUG_PRT("Xover");
/* cout
<
<
"
p1
:
"
<<
parent1
<<
endl
;
*
/
...
...
@@ -241,9 +243,9 @@ CIndividual* IndividualImpl::crossover(CIndividual** ps){
for
(
int
i=
0;
i
<\
PROBLEM_DIM
;
++
i
)
cma-
>
rgdTmp[i] = (float)(cma->rgD[i] * cma->alea.alea_Gauss());
child.valid = false;
/* cout
<
<
"
child
:
"
<<
child
<<
endl
;
*
/
return
new
IndividualImpl
(
child
);
child
1
.valid = false;
/* cout
<
<
"
child
1
:
"
<<
child1
<<
endl
;
*
/
return
new
IndividualImpl
(
child
1
);
}
...
...
@@ -411,7 +413,7 @@ void ParametersImpl::setDefaultParameters(int argc, char** argv){
this->elitSize = 0;
offspringReduction = parentReduction = false;
offspringReduction = parentReduction = false;
generationalCriterion = new CGenerationalCriterion(setVariable("nbGen",(int)\NB_GEN));
controlCStopingCriterion = new CControlCStopingCriterion();
...
...
@@ -423,7 +425,9 @@ void ParametersImpl::setDefaultParameters(int argc, char** argv){
this->randomGenerator = globalRandomGenerator;
this->printStats = setVariable("printStats",\PRINT_STATS);
this->printStatsFile = setVariable("printStatsFile",\PRINT_STATS_FILE);
this->generateCVSFile = setVariable("generateCSVFile",\GENERATE_CVS_FILE);
this->generateGnuplotScript = setVariable("generateGnuplotScript",\GENERATE_GNUPLOT_SCRIPT);
this->generateRScript = setVariable("generateRScript",\GENERATE_R_SCRIPT);
this->plotStats = setVariable("plotStats",\PLOT_STATS);
this->printInitialPopulation = setVariable("printInitialPopulation",0);
this->printFinalPopulation = setVariable("printFinalPopulation",0);
...
...
@@ -617,7 +621,7 @@ $(BIN):$(OBJ)
$(
NVCC
)
$(
NVCCFLAGS
)
-o
$@
$<
-c
-DTIMING
$(
CPPFLAGS
)
-g
-Xcompiler
-Wall
easeaclean:
clean
rm
-f
Makefile
EASEA.prm
$(
SRC
)
$(
HDR
)
EASEA.mak
$(
CUDA_SRC
)
*.linkinfo
EASEA.png
EASEA.dat
EASEA.vcproj
EASEA.plot
EASEA.r
EASEA.csv
rm
-f
Makefile
EASEA.prm
$(
SRC
)
$(
HDR
)
EASEA.mak
$(
CUDA_SRC
)
*.linkinfo
EASEA.png
EASEA.dat
EASEA.vcproj
clean:
rm
-f
$(
OBJ
)
$(
BIN
)
...
...
@@ -660,7 +664,7 @@ clean:
Name=
"CUDA Build Rule"
Include=
"\EZ_PATHlibEasea"
Keep=
"false"
Runtime=
"
2
"
Runtime=
"
0
"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
...
...
@@ -677,7 +681,7 @@ clean:
EnableIntrinsicFunctions=
"true"
AdditionalIncludeDirectories=
""\EZ_PATHlibEasea""
PreprocessorDefinitions=
"WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary=
"
2
"
RuntimeLibrary=
"
0
"
EnableFunctionLevelLinking=
"true"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
...
...
@@ -792,7 +796,8 @@ clean:
--plotStats=\PLOT_STATS #plot Stats with gnuplot (requires Gnuplot)
--printInitialPopulation=0 #Print initial population
--printFinalPopulation=0 #Print final population
--printStatsFile=\PRINT_STATS_FILE #Print stats to File (filename: ProjetName.dat)
--generateCSVFile=\GENERATE_CVS_FILE
--generateGnuplotScript=\GENERATE_GNUPLOT_SCRIPT
--generateRScript=\GENERATE_R_SCRIPT
\TEMPLATE_END
tpl/CUDA.tpl
View file @
12a5e569
...
...
@@ -2,6 +2,7 @@
#ifdef WIN32
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "libEasea.lib")
#pragma comment(lib, "Winmm.lib")
#endif
/**
This is program entry for STD template for EASEA
...
...
@@ -79,7 +80,7 @@ int main(int argc, char** argv){
using namespace std;
#include "EASEAIndividual.hpp"
bool INSTEAD_EVAL_STEP = false;
CRandomGenerator* globalRandomGenerator;
...
...
@@ -126,11 +127,6 @@ void cudaPreliminaryProcess(size_t populationSize, dim3* dimBlock, dim3* dimGrid
\
INSERT_BOUND_CHECKING
void
evale_pop_chunk
(
CIndividual**
population
,
int
popSize
){
printf
("
evalPopChunk
\
n
");
\
INSTEAD_EVAL_FUNCTION
}
void
EASEAInit
(
int
argc
,
char**
argv
){
\
INSERT_INIT_FCT_CALL
}
...
...
@@ -418,7 +414,7 @@ void ParametersImpl::setDefaultParameters(int argc, char** argv){
this-
>
randomGenerator = globalRandomGenerator;
this->printStats = setVariable("printStats",\PRINT_STATS);
this->generateCVSFile = setVariable("generateC
VS
File",\GENERATE_CVS_FILE);
this->generateCVSFile = setVariable("generateC
SV
File",\GENERATE_CVS_FILE);
this->generateGnuplotScript = setVariable("generateGnuplotScript",\GENERATE_GNUPLOT_SCRIPT);
this->generateRScript = setVariable("generateRScript",\GENERATE_R_SCRIPT);
this->plotStats = setVariable("plotStats",\PLOT_STATS);
...
...
@@ -655,7 +651,7 @@ clean:
Name=
"CUDA Build Rule"
Include=
"\EZ_PATHlibEasea"
Keep=
"false"
Runtime=
"
2
"
Runtime=
"
0
"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
...
...
@@ -672,7 +668,7 @@ clean:
EnableIntrinsicFunctions=
"true"
AdditionalIncludeDirectories=
""\EZ_PATHlibEasea""
PreprocessorDefinitions=
"WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary=
"
2
"
RuntimeLibrary=
"
0
"
EnableFunctionLevelLinking=
"true"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
...
...
@@ -795,7 +791,7 @@ clean:
--plotStats=\PLOT_STATS #plot Stats with gnuplot (requires Gnuplot)
--printInitialPopulation=0 #Print initial population
--printFinalPopulation=0 #Print final population
--generateC
VS
File=\GENERATE_CVS_FILE
--generateC
SV
File=\GENERATE_CVS_FILE
--generateGnuplotScript=\GENERATE_GNUPLOT_SCRIPT
--generateRScript=\GENERATE_R_SCRIPT
...
...
tpl/STD.tpl
View file @
12a5e569
...
...
@@ -2,6 +2,7 @@
#ifdef WIN32
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "libEasea.lib")
#pragma comment(lib, "Winmm.lib")
#endif
/**
This is program entry for STD template for EASEA
...
...
@@ -281,7 +282,7 @@ void ParametersImpl::setDefaultParameters(int argc, char** argv){
this-
>
randomGenerator = globalRandomGenerator;
this->printStats = setVariable("printStats",\PRINT_STATS);
this->generateCVSFile = setVariable("generateC
VS
File",\GENERATE_CVS_FILE);
this->generateCVSFile = setVariable("generateC
SV
File",\GENERATE_CVS_FILE);
this->generateGnuplotScript = setVariable("generateGnuplotScript",\GENERATE_GNUPLOT_SCRIPT);
this->generateRScript = setVariable("generateRScript",\GENERATE_R_SCRIPT);
this->plotStats = setVariable("plotStats",\PLOT_STATS);
...
...
@@ -470,7 +471,7 @@ easeaclean:
EnableIntrinsicFunctions=
"true"
AdditionalIncludeDirectories=
""\EZ_PATHlibEasea""
PreprocessorDefinitions=
"WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary=
"
2
"
RuntimeLibrary=
"
0
"
EnableFunctionLevelLinking=
"true"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
...
...
@@ -592,7 +593,7 @@ easeaclean:
--plotStats=\PLOT_STATS #plot Stats with gnuplot (requires Gnuplot)
--printInitialPopulation=0 #Print initial population
--printFinalPopulation=0 #Print final population
--generateC
VS
File=\GENERATE_CVS_FILE
--generateC
SV
File=\GENERATE_CVS_FILE
--generateGnuplotScript=\GENERATE_GNUPLOT_SCRIPT
--generateRScript=\GENERATE_R_SCRIPT
\TEMPLATE_END
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment