Commit c491a429 authored by maitre's avatar maitre

Cuda rc version (should be macos compliant)

parent 389b46d5
......@@ -831,7 +831,9 @@ exponent ([Ee][+-]?[0-9]+)
}
if( fileNameLength != -1 ){
// add "Makefile" at the end of path
char* cdn = get_current_dir_name();
//char* cdn = get_current_dir_name();
char cdn[4096];
getcwd(cdn,4096);
size_t cdnLength = strlen(cdn);
strcpy(sFullFileName,cdn);
strcat(sFullFileName,"/\0");
......
......@@ -68,7 +68,7 @@ int main(int argc, char** argv){
#include <sys/time.h>
#include "EASEATools.hpp"
#define STD_TPL
#define CUDA_TPL
extern RandomGenerator* globalRandomGenerator;
......@@ -1856,7 +1856,7 @@ LDFLAGS=-lboost_program_options -lboost_serialization
\INSERT_MAKEFILE_OPTION#END OF USER MAKEFILE OPTIONS
CPPFLAGS+=
NVFLAGS+=
NVCCFLAGS+=
EASEA_SRC= EASEATools.cpp EASEAIndividual.cpp
......@@ -1878,7 +1878,7 @@ $(BIN):$(OBJ)
$(NVCC) $^ -o $@ $(LDFLAGS)
%.o:%.cu
$(NVCC) $(NVFLAGS) -o $@ $< -c -DTIMING $(CPPFLAGS) -g -Xcompiler -Wall
$(NVCC) $(NVCCFLAGS) -o $@ $< -c -DTIMING $(CPPFLAGS) -g -Xcompiler -Wall
easeaclean: clean
rm -f Makefile EASEA.prm $(SRC) $(HDR) EASEA.mak $(CUDA_SRC)
......
......@@ -916,12 +916,12 @@ void Population::produceOffspringPopulation(){
selectionOperator->initialize(parents,selectionPressure,actualParentPopulationSize);
for( size_t i=0 ; i<offspringPopulationSize ; i++ ){
size_t index = selectionOperator->selectNext(offspringPopulationSize);
size_t index = selectionOperator->selectNext(parentPopulationSize);
p1 = parents[index];
if( rg->tossCoin(pCrossover) ){
for( size_t j=0 ; j<crossoverArrity-1 ; j++ ){
index = selectionOperator->selectNext(offspringPopulationSize);
index = selectionOperator->selectNext(parentPopulationSize);
ps[j] = parents[index];
}
child = p1->crossover(ps);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment