diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 08063040c..c0576397f 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -44,6 +44,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-Wunknown-pragmas -O2" CACHE STRING "" FORCE) if(SMP) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -pthread" CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -pthread" CACHE STRING "" FORCE) + add_definitions(-D_GLIBCXX_USE_NANOSLEEP) endif(SMP) ###################################################################################### diff --git a/cmake/Target.cmake b/cmake/Target.cmake index a2cd0e584..06fc26162 100644 --- a/cmake/Target.cmake +++ b/cmake/Target.cmake @@ -47,6 +47,10 @@ if(PROFILING) COMMAND lcov -r output.info '*/tutorial*' -o output.info COMMAND lcov -r output.info '/usr*' -o output.info COMMAND lcov -r output.info '*/test*' -o output.info + COMMAND lcov -r output.info '*/eo*' -o output.info + COMMAND lcov -r output.info '*/mo*' -o output.info + COMMAND lcov -r output.info '*/moeo*' -o output.info + COMMAND lcov -r output.info '*/problems*' -o output.info COMMAND genhtml output.info -o coverage/ --highlight --legend ) else(LCOV) diff --git a/eo/src/eoInvertedContinue.h b/eo/src/eoInvertedContinue.h new file mode 100644 index 000000000..0f677cc08 --- /dev/null +++ b/eo/src/eoInvertedContinue.h @@ -0,0 +1,62 @@ +/* + +Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2012 + +Alexandre Quemy + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can ue, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. + +ParadisEO WebSite : http://paradiseo.gforge.inria.fr +Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef _eoInvertedContinue_h +#define _eoInvertedContinue_h + +#include + +/** + * Return the opposite of the wrapped continuator + * + * @ingroup Continuators +*/ +template< class EOT> +class eoInvertedContinue: public eoContinue +{ +public: + /// Ctor + eoInvertedContinue(eoContinue& _cont) + : cont(_cont) {}; + + /** Returns the opposite of the wrapped continuator + */ + virtual bool operator() ( const eoPop& _pop ) + { + return !cont(_pop); + } + + virtual std::string className(void) const { return "eoInvertedContinue"; } + +private: + eoContinue &eval; + +}; + +#endif diff --git a/smp/doc/CMakeLists.txt b/smp/doc/CMakeLists.txt index d5499b86e..3fa4481eb 100644 --- a/smp/doc/CMakeLists.txt +++ b/smp/doc/CMakeLists.txt @@ -11,7 +11,7 @@ if(DOXYGEN_FOUND) # Creating the custom target if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) add_custom_target(doc-smp - COMMAND ${DOXYGEN_EXECUTABLE} ${SMP_DOC_CONFIG_FILE} 2> /dev/null > /dev/null + COMMAND ${DOXYGEN_EXECUTABLE} ${SMP_DOC_CONFIG_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) else(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) add_custom_target(doc-smp diff --git a/smp/doc/index.h b/smp/doc/index.h index 6e6ae3464..fde65787a 100644 --- a/smp/doc/index.h +++ b/smp/doc/index.h @@ -4,7 +4,7 @@ ParadisEO-SMP for Symmetric MultiProcessing or Shared Memory Parallelism is a module for multicores computations on several algorithms proposed by ParadiseEO. By simply wrapping the algorithms, it allows you to refer only to the API of your algorithm instead of learning a new one. -Different parallelism models are avaiable such as the Master / Slaves model or the Island Model. +Different parallelism models are available such as the Master / Slaves Model or the Island Model. @section tutorials Tutorials diff --git a/smp/doc/smp.doxyfile.cmake b/smp/doc/smp.doxyfile.cmake index 8a917426f..c84c918eb 100644 --- a/smp/doc/smp.doxyfile.cmake +++ b/smp/doc/smp.doxyfile.cmake @@ -1296,7 +1296,7 @@ SKIP_FUNCTION_MACROS = YES # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = @SMP_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/smp/doc/html +TAGFILES = @SMP_BIN_DIR@/doc/smp.doxytag=http://paradiseo.gforge.inria.fr/addon/smp/doc/index.html # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. diff --git a/smp/src/CMakeLists.txt b/smp/src/CMakeLists.txt index a7b9a268c..1135119a0 100644 --- a/smp/src/CMakeLists.txt +++ b/smp/src/CMakeLists.txt @@ -2,6 +2,7 @@ ### 0) Include directories ###################################################################################### +include_directories(${EO_SRC_DIR}/src) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### @@ -16,9 +17,22 @@ set(LIBRARY_OUTPUT_PATH ${SMP_LIB_OUTPUT_PATH}) ###################################################################################### set (SMP_FILE - thread.cpp MWModel.h - scheduler.h) + scheduler.h + island.h + topology/abstractTopology.h + topology/topology.h + topology/topologyBuilder.h + topology/complete.cpp + topology/star.cpp + topology/ring.cpp + topology/hypercubic.cpp + topology/mesh.cpp + topology/customBooleanTopology.cpp + topology/customStochasticTopology.cpp + notifier.cpp + islandModelWrapper.h + ) add_library(smp STATIC ${SMP_FILE}) @@ -28,15 +42,16 @@ install(TARGETS smp ARCHIVE DESTINATION ${LIB} COMPONENT libraries) ### 3) Look for headers ###################################################################################### -file(GLOB HDRS smp *.h) +file(GLOB HDRS smp *.h *.cpp) install(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/smp COMPONENT headers) ###################################################################################### ### 4) Install directories ###################################################################################### -install(DIRECTORY MWAlgo +install(DIRECTORY MWAlgo topology DESTINATION include${INSTALL_SUB_DIR}/smp COMPONENT headers FILES_MATCHING PATTERN "*.h" + PATTERN "*.cpp" ) diff --git a/smp/src/MWModel.cpp b/smp/src/MWModel.cpp index 6ec45d89c..f3b4082a4 100644 --- a/smp/src/MWModel.cpp +++ b/smp/src/MWModel.cpp @@ -29,19 +29,21 @@ Contact: paradiseo-help@lists.gforge.inria.fr template