git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2580 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
cf6468bf02
commit
0f868ad2b2
117 changed files with 36 additions and 14502 deletions
0
trunk/.clean
Normal file
0
trunk/.clean
Normal file
33
trunk/Testing/20111214-1102/Test.xml
Normal file
33
trunk/Testing/20111214-1102/Test.xml
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Site BuildName=""
|
||||||
|
BuildStamp="20111214-1102-Experimental"
|
||||||
|
Name=""
|
||||||
|
Generator="ctest-2.8.5"
|
||||||
|
CompilerName=""
|
||||||
|
OSName="Linux"
|
||||||
|
Hostname="mia-Precision-M4500"
|
||||||
|
OSRelease="3.0.0-14-generic-pae"
|
||||||
|
OSVersion="#23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011"
|
||||||
|
OSPlatform="i686"
|
||||||
|
Is64Bits="0"
|
||||||
|
VendorString="GenuineIntel"
|
||||||
|
VendorID="Intel Corporation"
|
||||||
|
FamilyID="6"
|
||||||
|
ModelID="37"
|
||||||
|
ProcessorCacheSize="4096"
|
||||||
|
NumberOfLogicalCPU="4"
|
||||||
|
NumberOfPhysicalCPU="2"
|
||||||
|
TotalVirtualMemory="4020"
|
||||||
|
TotalPhysicalMemory="3955"
|
||||||
|
LogicalProcessorsPerPhysical="2"
|
||||||
|
ProcessorClockFrequency="1199"
|
||||||
|
>
|
||||||
|
<Testing>
|
||||||
|
<StartDateTime>Dec 14 12:02 CET</StartDateTime>
|
||||||
|
<StartTestTime>1323860531</StartTestTime>
|
||||||
|
<TestList>
|
||||||
|
</TestList>
|
||||||
|
<EndDateTime>Dec 14 12:02 CET</EndDateTime>
|
||||||
|
<EndTestTime>1323860531</EndTestTime>
|
||||||
|
<ElapsedMinutes>0</ElapsedMinutes></Testing>
|
||||||
|
</Site>
|
||||||
2
trunk/Testing/TAG
Normal file
2
trunk/Testing/TAG
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
20111214-1102
|
||||||
|
Experimental
|
||||||
1
trunk/Testing/Temporary/CTestCostData.txt
Normal file
1
trunk/Testing/Temporary/CTestCostData.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
---
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
Authors:
|
|
||||||
Boufaras Karima
|
|
||||||
Thé Van Luong
|
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,79 +0,0 @@
|
||||||
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
|
|
||||||
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
|
|
||||||
#
|
|
||||||
# Copyright (c) 2007-2009
|
|
||||||
# Scientific Computing and Imaging Institute, University of Utah
|
|
||||||
#
|
|
||||||
# This code is licensed under the MIT License. See the FindCUDA.cmake script
|
|
||||||
# for the text of the license.
|
|
||||||
|
|
||||||
# The MIT License
|
|
||||||
#
|
|
||||||
# License for the specific language governing rights and limitations under
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
|
||||||
# to deal in the Software without restriction, including without limitation
|
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
# Software is furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included
|
|
||||||
# in all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
# DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# This converts a file written in makefile syntax into one that can be included
|
|
||||||
# by CMake.
|
|
||||||
|
|
||||||
file(READ ${input_file} depend_text)
|
|
||||||
|
|
||||||
if (${depend_text} MATCHES ".+")
|
|
||||||
|
|
||||||
# message("FOUND DEPENDS")
|
|
||||||
|
|
||||||
# Remember, four backslashes is escaped to one backslash in the string.
|
|
||||||
string(REGEX REPLACE "\\\\ " " " depend_text ${depend_text})
|
|
||||||
|
|
||||||
# This works for the nvcc -M generated dependency files.
|
|
||||||
string(REGEX REPLACE "^.* : " "" depend_text ${depend_text})
|
|
||||||
string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text})
|
|
||||||
|
|
||||||
set(dependency_list "")
|
|
||||||
|
|
||||||
foreach(file ${depend_text})
|
|
||||||
|
|
||||||
string(REGEX REPLACE "^ +" "" file ${file})
|
|
||||||
|
|
||||||
if(NOT IS_DIRECTORY ${file})
|
|
||||||
# If softlinks start to matter, we should change this to REALPATH. For now we need
|
|
||||||
# to flatten paths, because nvcc can generate stuff like /bin/../include instead of
|
|
||||||
# just /include.
|
|
||||||
get_filename_component(file_absolute "${file}" ABSOLUTE)
|
|
||||||
list(APPEND dependency_list "${file_absolute}")
|
|
||||||
endif(NOT IS_DIRECTORY ${file})
|
|
||||||
|
|
||||||
endforeach(file)
|
|
||||||
|
|
||||||
else()
|
|
||||||
# message("FOUND NO DEPENDS")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Remove the duplicate entries and sort them.
|
|
||||||
list(REMOVE_DUPLICATES dependency_list)
|
|
||||||
list(SORT dependency_list)
|
|
||||||
|
|
||||||
foreach(file ${dependency_list})
|
|
||||||
set(cuda_nvcc_depend "${cuda_nvcc_depend} \"${file}\"\n")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
file(WRITE ${output_file} "# Generated by: make2cmake.cmake\nSET(CUDA_NVCC_DEPEND\n ${cuda_nvcc_depend})\n\n")
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
|
|
||||||
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
|
|
||||||
#
|
|
||||||
# Copyright (c) 2007-2009
|
|
||||||
# Scientific Computing and Imaging Institute, University of Utah
|
|
||||||
#
|
|
||||||
# This code is licensed under the MIT License. See the FindCUDA.cmake script
|
|
||||||
# for the text of the license.
|
|
||||||
|
|
||||||
# The MIT License
|
|
||||||
#
|
|
||||||
# License for the specific language governing rights and limitations under
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
|
||||||
# to deal in the Software without restriction, including without limitation
|
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
# Software is furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included
|
|
||||||
# in all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
# DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Parses a .cubin file produced by nvcc and reports statistics about the file.
|
|
||||||
|
|
||||||
|
|
||||||
file(READ ${input_file} file_text)
|
|
||||||
|
|
||||||
if (${file_text} MATCHES ".+")
|
|
||||||
|
|
||||||
# Remember, four backslashes is escaped to one backslash in the string.
|
|
||||||
string(REGEX REPLACE ";" "\\\\;" file_text ${file_text})
|
|
||||||
string(REGEX REPLACE "\ncode" ";code" file_text ${file_text})
|
|
||||||
|
|
||||||
list(LENGTH file_text len)
|
|
||||||
|
|
||||||
foreach(line ${file_text})
|
|
||||||
|
|
||||||
# Only look at "code { }" blocks.
|
|
||||||
if(line MATCHES "^code")
|
|
||||||
|
|
||||||
# Break into individual lines.
|
|
||||||
string(REGEX REPLACE "\n" ";" line ${line})
|
|
||||||
|
|
||||||
foreach(entry ${line})
|
|
||||||
|
|
||||||
# Extract kernel names.
|
|
||||||
if (${entry} MATCHES "[^g]name = ([^ ]+)")
|
|
||||||
string(REGEX REPLACE ".* = ([^ ]+)" "\\1" entry ${entry})
|
|
||||||
|
|
||||||
# Check to see if the kernel name starts with "_"
|
|
||||||
set(skip FALSE)
|
|
||||||
# if (${entry} MATCHES "^_")
|
|
||||||
# Skip the rest of this block.
|
|
||||||
# message("Skipping ${entry}")
|
|
||||||
# set(skip TRUE)
|
|
||||||
# else (${entry} MATCHES "^_")
|
|
||||||
message("Kernel: ${entry}")
|
|
||||||
# endif (${entry} MATCHES "^_")
|
|
||||||
|
|
||||||
endif(${entry} MATCHES "[^g]name = ([^ ]+)")
|
|
||||||
|
|
||||||
# Skip the rest of the block if necessary
|
|
||||||
if(NOT skip)
|
|
||||||
|
|
||||||
# Registers
|
|
||||||
if (${entry} MATCHES "reg([ ]+)=([ ]+)([^ ]+)")
|
|
||||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
|
||||||
message("Registers: ${entry}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Local memory
|
|
||||||
if (${entry} MATCHES "lmem([ ]+)=([ ]+)([^ ]+)")
|
|
||||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
|
||||||
message("Local: ${entry}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Shared memory
|
|
||||||
if (${entry} MATCHES "smem([ ]+)=([ ]+)([^ ]+)")
|
|
||||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
|
||||||
message("Shared: ${entry}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (${entry} MATCHES "^}")
|
|
||||||
message("")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endif(NOT skip)
|
|
||||||
|
|
||||||
|
|
||||||
endforeach(entry)
|
|
||||||
|
|
||||||
endif(line MATCHES "^code")
|
|
||||||
|
|
||||||
endforeach(line)
|
|
||||||
|
|
||||||
else()
|
|
||||||
# message("FOUND NO DEPENDS")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,280 +0,0 @@
|
||||||
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
|
|
||||||
#
|
|
||||||
# This code is licensed under the MIT License. See the FindCUDA.cmake script
|
|
||||||
# for the text of the license.
|
|
||||||
|
|
||||||
# The MIT License
|
|
||||||
#
|
|
||||||
# License for the specific language governing rights and limitations under
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
|
||||||
# to deal in the Software without restriction, including without limitation
|
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
# Software is furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included
|
|
||||||
# in all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
# DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
# This file runs the nvcc commands to produce the desired output file along with
|
|
||||||
# the dependency file needed by CMake to compute dependencies. In addition the
|
|
||||||
# file checks the output of each command and if the command fails it deletes the
|
|
||||||
# output files.
|
|
||||||
|
|
||||||
# Input variables
|
|
||||||
#
|
|
||||||
# verbose:BOOL=<> OFF: Be as quiet as possible (default)
|
|
||||||
# ON : Describe each step
|
|
||||||
#
|
|
||||||
# build_configuration:STRING=<> Typically one of Debug, MinSizeRel, Release, or
|
|
||||||
# RelWithDebInfo, but it should match one of the
|
|
||||||
# entries in CUDA_HOST_FLAGS. This is the build
|
|
||||||
# configuration used when compiling the code. If
|
|
||||||
# blank or unspecified Debug is assumed as this is
|
|
||||||
# what CMake does.
|
|
||||||
#
|
|
||||||
# generated_file:STRING=<> File to generate. This argument must be passed in.
|
|
||||||
#
|
|
||||||
# generated_cubin_file:STRING=<> File to generate. This argument must be passed
|
|
||||||
# in if build_cubin is true.
|
|
||||||
|
|
||||||
if(NOT generated_file)
|
|
||||||
message(FATAL_ERROR "You must specify generated_file on the command line")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set these up as variables to make reading the generated file easier
|
|
||||||
set(CMAKE_COMMAND "@CMAKE_COMMAND@")
|
|
||||||
set(source_file "@source_file@")
|
|
||||||
set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@")
|
|
||||||
set(cmake_dependency_file "@cmake_dependency_file@")
|
|
||||||
set(CUDA_make2cmake "@CUDA_make2cmake@")
|
|
||||||
set(CUDA_parse_cubin "@CUDA_parse_cubin@")
|
|
||||||
set(build_cubin @build_cubin@)
|
|
||||||
# We won't actually use these variables for now, but we need to set this, in
|
|
||||||
# order to force this file to be run again if it changes.
|
|
||||||
set(generated_file_path "@generated_file_path@")
|
|
||||||
set(generated_file_internal "@generated_file@")
|
|
||||||
set(generated_cubin_file_internal "@generated_cubin_file@")
|
|
||||||
|
|
||||||
set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@")
|
|
||||||
set(CUDA_NVCC_FLAGS "@CUDA_NVCC_FLAGS@;;@CUDA_WRAP_OPTION_NVCC_FLAGS@")
|
|
||||||
@CUDA_NVCC_FLAGS_CONFIG@
|
|
||||||
set(nvcc_flags "@nvcc_flags@")
|
|
||||||
set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@")
|
|
||||||
set(format_flag "@format_flag@")
|
|
||||||
|
|
||||||
if(build_cubin AND NOT generated_cubin_file)
|
|
||||||
message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# This is the list of host compilation flags. It C or CXX should already have
|
|
||||||
# been chosen by FindCUDA.cmake.
|
|
||||||
@CUDA_HOST_FLAGS@
|
|
||||||
|
|
||||||
# Take the compiler flags and package them up to be sent to the compiler via -Xcompiler
|
|
||||||
set(nvcc_host_compiler_flags "")
|
|
||||||
# If we weren't given a build_configuration, use Debug.
|
|
||||||
if(NOT build_configuration)
|
|
||||||
set(build_configuration Debug)
|
|
||||||
endif()
|
|
||||||
string(TOUPPER "${build_configuration}" build_configuration)
|
|
||||||
#message("CUDA_NVCC_HOST_COMPILER_FLAGS = ${CUDA_NVCC_HOST_COMPILER_FLAGS}")
|
|
||||||
foreach(flag ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}})
|
|
||||||
# Extra quotes are added around each flag to help nvcc parse out flags with spaces.
|
|
||||||
set(nvcc_host_compiler_flags "${nvcc_host_compiler_flags},\"${flag}\"")
|
|
||||||
endforeach()
|
|
||||||
if (nvcc_host_compiler_flags)
|
|
||||||
set(nvcc_host_compiler_flags "-Xcompiler" ${nvcc_host_compiler_flags})
|
|
||||||
endif()
|
|
||||||
#message("nvcc_host_compiler_flags = \"${nvcc_host_compiler_flags}\"")
|
|
||||||
# Add the build specific configuration flags
|
|
||||||
list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
|
|
||||||
|
|
||||||
if(DEFINED CCBIN)
|
|
||||||
set(CCBIN -ccbin "${CCBIN}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# cuda_execute_process - Executes a command with optional command echo and status message.
|
|
||||||
#
|
|
||||||
# status - Status message to print if verbose is true
|
|
||||||
# command - COMMAND argument from the usual execute_process argument structure
|
|
||||||
# ARGN - Remaining arguments are the command with arguments
|
|
||||||
#
|
|
||||||
# CUDA_result - return value from running the command
|
|
||||||
#
|
|
||||||
# Make this a macro instead of a function, so that things like RESULT_VARIABLE
|
|
||||||
# and other return variables are present after executing the process.
|
|
||||||
macro(cuda_execute_process status command)
|
|
||||||
set(_command ${command})
|
|
||||||
if(NOT _command STREQUAL "COMMAND")
|
|
||||||
message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
|
|
||||||
endif()
|
|
||||||
if(verbose)
|
|
||||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status})
|
|
||||||
# Now we need to build up our command string. We are accounting for quotes
|
|
||||||
# and spaces, anything else is left up to the user to fix if they want to
|
|
||||||
# copy and paste a runnable command line.
|
|
||||||
set(cuda_execute_process_string)
|
|
||||||
foreach(arg ${ARGN})
|
|
||||||
# If there are quotes, excape them, so they come through.
|
|
||||||
string(REPLACE "\"" "\\\"" arg ${arg})
|
|
||||||
# Args with spaces need quotes around them to get them to be parsed as a single argument.
|
|
||||||
if(arg MATCHES " ")
|
|
||||||
list(APPEND cuda_execute_process_string "\"${arg}\"")
|
|
||||||
else()
|
|
||||||
list(APPEND cuda_execute_process_string ${arg})
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
# Echo the command
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${cuda_execute_process_string})
|
|
||||||
endif(verbose)
|
|
||||||
# Run the command
|
|
||||||
execute_process(COMMAND ${ARGN} RESULT_VARIABLE CUDA_result )
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
# Delete the target file
|
|
||||||
cuda_execute_process(
|
|
||||||
"Removing ${generated_file}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# For CUDA 2.3 and below, -G -M doesn't work, so remove the -G flag
|
|
||||||
# for dependency generation and hope for the best.
|
|
||||||
set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
|
|
||||||
set(CUDA_VERSION @CUDA_VERSION@)
|
|
||||||
if(CUDA_VERSION VERSION_LESS "3.0")
|
|
||||||
cmake_policy(PUSH)
|
|
||||||
# CMake policy 0007 NEW states that empty list elements are not
|
|
||||||
# ignored. I'm just setting it to avoid the warning that's printed.
|
|
||||||
cmake_policy(SET CMP0007 NEW)
|
|
||||||
# Note that this will remove all occurances of -G.
|
|
||||||
list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
|
|
||||||
cmake_policy(POP)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# nvcc doesn't define __CUDACC__ for some reason when generating dependency files. This
|
|
||||||
# can cause incorrect dependencies when #including files based on this macro which is
|
|
||||||
# defined in the generating passes of nvcc invokation. We will go ahead and manually
|
|
||||||
# define this for now until a future version fixes this bug.
|
|
||||||
set(CUDACC_DEFINE -D__CUDACC__)
|
|
||||||
|
|
||||||
# Generate the dependency file
|
|
||||||
cuda_execute_process(
|
|
||||||
"Generating dependency file: ${NVCC_generated_dependency_file}"
|
|
||||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
|
||||||
-M
|
|
||||||
${CUDACC_DEFINE}
|
|
||||||
"${source_file}"
|
|
||||||
-o "${NVCC_generated_dependency_file}"
|
|
||||||
${CCBIN}
|
|
||||||
${nvcc_flags}
|
|
||||||
${nvcc_host_compiler_flags}
|
|
||||||
${depends_CUDA_NVCC_FLAGS}
|
|
||||||
-DNVCC
|
|
||||||
${CUDA_NVCC_INCLUDE_ARGS}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CUDA_result)
|
|
||||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Generate the cmake readable dependency file to a temp file. Don't put the
|
|
||||||
# quotes just around the filenames for the input_file and output_file variables.
|
|
||||||
# CMake will pass the quotes through and not be able to find the file.
|
|
||||||
cuda_execute_process(
|
|
||||||
"Generating temporary cmake readable file: ${cmake_dependency_file}.tmp"
|
|
||||||
COMMAND "${CMAKE_COMMAND}"
|
|
||||||
-D "input_file:FILEPATH=${NVCC_generated_dependency_file}"
|
|
||||||
-D "output_file:FILEPATH=${cmake_dependency_file}.tmp"
|
|
||||||
-P "${CUDA_make2cmake}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CUDA_result)
|
|
||||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Copy the file if it is different
|
|
||||||
cuda_execute_process(
|
|
||||||
"Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CUDA_result)
|
|
||||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Delete the temporary file
|
|
||||||
cuda_execute_process(
|
|
||||||
"Removing ${cmake_dependency_file}.tmp and ${NVCC_generated_dependency_file}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CUDA_result)
|
|
||||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Generate the code
|
|
||||||
cuda_execute_process(
|
|
||||||
"Generating ${generated_file}"
|
|
||||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
|
||||||
"${source_file}"
|
|
||||||
${format_flag} -o "${generated_file}"
|
|
||||||
${CCBIN}
|
|
||||||
${nvcc_flags}
|
|
||||||
${nvcc_host_compiler_flags}
|
|
||||||
${CUDA_NVCC_FLAGS}
|
|
||||||
-DNVCC
|
|
||||||
${CUDA_NVCC_INCLUDE_ARGS}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CUDA_result)
|
|
||||||
# Since nvcc can sometimes leave half done files make sure that we delete the output file.
|
|
||||||
cuda_execute_process(
|
|
||||||
"Removing ${generated_file}"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
|
||||||
)
|
|
||||||
message(FATAL_ERROR "Error generating file ${generated_file}")
|
|
||||||
else()
|
|
||||||
if(verbose)
|
|
||||||
message("Generated ${generated_file} successfully.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Cubin resource report commands.
|
|
||||||
if( build_cubin )
|
|
||||||
# Run with -cubin to produce resource usage report.
|
|
||||||
cuda_execute_process(
|
|
||||||
"Generating ${generated_cubin_file}"
|
|
||||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
|
||||||
"${source_file}"
|
|
||||||
${CUDA_NVCC_FLAGS}
|
|
||||||
${nvcc_flags}
|
|
||||||
${CCBIN}
|
|
||||||
${nvcc_host_compiler_flags}
|
|
||||||
-DNVCC
|
|
||||||
-cubin
|
|
||||||
-o "${generated_cubin_file}"
|
|
||||||
${CUDA_NVCC_INCLUDE_ARGS}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Execute the parser script.
|
|
||||||
cuda_execute_process(
|
|
||||||
"Executing the parser script"
|
|
||||||
COMMAND "${CMAKE_COMMAND}"
|
|
||||||
-D "input_file:STRING=${generated_cubin_file}"
|
|
||||||
-P "${CUDA_parse_cubin}"
|
|
||||||
)
|
|
||||||
|
|
||||||
endif( build_cubin )
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
||||||
######################################################################################
|
|
||||||
### 0) Set your application properties
|
|
||||||
######################################################################################
|
|
||||||
# check cmake version compatibility
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
||||||
|
|
||||||
# Here define your project name
|
|
||||||
PROJECT(Paradiseo-GPU)
|
|
||||||
|
|
||||||
SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE)
|
|
||||||
SET(PACKAGE_NAME "ParadisEO-GPU - Moving Objects GPU" CACHE STRING "Package name" FORCE)
|
|
||||||
SET(PACKAGE_STRING "ParadisEO-GPU 1.0" CACHE STRING "GPU Package string full name" FORCE)
|
|
||||||
SET(PACKAGE_VERSION "1.0" CACHE STRING "Package version" FORCE)
|
|
||||||
SET(GLOBAL_VERSION "1.0" CACHE STRING "Global version" FORCE)
|
|
||||||
SET(VERSION "1.0.0" CACHE STRING "Version" FORCE)
|
|
||||||
|
|
||||||
# regular expression checking
|
|
||||||
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
|
|
||||||
|
|
||||||
# set a language for the entire project.
|
|
||||||
ENABLE_LANGUAGE(CXX)
|
|
||||||
ENABLE_LANGUAGE(C)
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# Find Cuda package #
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/cuda" ${CMAKE_MODULE_PATH})
|
|
||||||
find_package(CUDA QUIET REQUIRED)
|
|
||||||
|
|
||||||
# Check if CUDA was found
|
|
||||||
if (CUDA_FOUND)
|
|
||||||
message("CUDA found")
|
|
||||||
else()
|
|
||||||
message("CUDA not found")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
### 1) Include the install configuration file where are defined the main variables
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
INCLUDE(${CMAKE_SOURCE_DIR}/install.cmake)
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
### 2) Include the sources
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# Include required modules & utilities #
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
INCLUDE(CMakeBackwardCompatibilityCXX)
|
|
||||||
|
|
||||||
INCLUDE(FindDoxygen)
|
|
||||||
|
|
||||||
INCLUDE(CheckLibraryExists)
|
|
||||||
|
|
||||||
INCLUDE(Dart OPTIONAL)
|
|
||||||
|
|
||||||
# Set a special flag if the environment is windows (should do the same in a config.g file)
|
|
||||||
IF (WIN32)
|
|
||||||
ADD_DEFINITIONS(-D_WINDOWS=1)
|
|
||||||
ENDIF (WIN32)
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
#########################
|
|
||||||
# Manage the build type #
|
|
||||||
#########################
|
|
||||||
|
|
||||||
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
|
|
||||||
SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
|
||||||
|
|
||||||
FIND_PROGRAM(MEMORYCHECK_COMMAND
|
|
||||||
NAMES purify valgrind
|
|
||||||
PATHS
|
|
||||||
"/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
|
|
||||||
DOC "Path to the memory checking command, used for memory error detection.")
|
|
||||||
|
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
|
||||||
SET( CMAKE_BUILD_TYPE
|
|
||||||
${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING
|
|
||||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
|
||||||
FORCE)
|
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
|
||||||
|
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
|
||||||
IF(CMAKE_CXX_COMPILER MATCHES cl)
|
|
||||||
IF(NOT WITH_SHARED_LIBS)
|
|
||||||
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
|
||||||
SET(CMAKE_CXX_FLAGS "/nologo /Gy")
|
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od")
|
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530")
|
|
||||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2")
|
|
||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od")
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")
|
|
||||||
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
|
||||||
ENDIF(NOT WITH_SHARED_LIBS)
|
|
||||||
ENDIF(CMAKE_CXX_COMPILER MATCHES cl)
|
|
||||||
ELSE(WIN32 AND NOT CYGWIN)
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2 -g -pg -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter")
|
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
|
||||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6")
|
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
|
||||||
|
|
||||||
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
||||||
ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON)
|
|
||||||
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
||||||
|
|
||||||
EXECUTE_PROCESS(
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${PARADISEO_GPU_SRC_DIR}/CTestCustom.cmake
|
|
||||||
${PARADISEO_GPU_BIN_DIR}/CTestCustom.cmake)
|
|
||||||
##########################################################################################################################################
|
|
||||||
######################################################################################
|
|
||||||
### 3) Link the librairies for your executable
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(doc)
|
|
||||||
ADD_SUBDIRECTORY(test)
|
|
||||||
ADD_SUBDIRECTORY(tutorial)
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
set(CTEST_PROJECT_NAME "ParadisEO")
|
|
||||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
|
||||||
|
|
||||||
set(CTEST_DROP_METHOD "http")
|
|
||||||
set(CTEST_DROP_SITE "cdash.inria.fr")
|
|
||||||
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO")
|
|
||||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
|
|
||||||
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
|
|
||||||
"test/"
|
|
||||||
"paradiseo-eo/"
|
|
||||||
"paradiseo-mo/"
|
|
||||||
"paradiseo-gpu/"
|
|
||||||
"problems/"
|
|
||||||
)
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
PARADISEO-GPU README FILE
|
|
||||||
=======================================================================
|
|
||||||
check latest news at http://paradiseo.gforge.inria.fr/
|
|
||||||
=======================================================================
|
|
||||||
|
|
||||||
Welcome to ParadisEO-GPU, the reusable design and implementation of parallel meta-
|
|
||||||
heuristics on Graphics Processing Units (GPU).
|
|
||||||
The latest news about ParadisEO-GPU can be found on the gforge repository at
|
|
||||||
http://paradiseo.gforge.inria.fr/index.php?n=Doc.API
|
|
||||||
In case of any problem, please e-mail us at
|
|
||||||
paradiseo-help@lists.gforge.inria.fr
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
BUILDING PARADISEO-PEO
|
|
||||||
=======================================================================
|
|
||||||
The basic installation procedure goes the following.
|
|
||||||
|
|
||||||
To compile paradiseo-gpu in the default directory,
|
|
||||||
go to paradiseo-gpu/build/ and run:
|
|
||||||
> cmake ..
|
|
||||||
> make
|
|
||||||
// for an easy-use of the provided lessons
|
|
||||||
> make install
|
|
||||||
// optional (if the documentation is not already available)
|
|
||||||
> make doc
|
|
||||||
|
|
||||||
To compile paradiseo-peo anywhere else, simply run:
|
|
||||||
> cmake $(GPU) -Dconfig=<path to the install.cmake file>
|
|
||||||
> make
|
|
||||||
// for an easy-use of the provided lessons
|
|
||||||
> make install
|
|
||||||
// optional (if the documentation is not already available)
|
|
||||||
> make doc
|
|
||||||
|
|
||||||
To clean everything, simply run
|
|
||||||
> make clean
|
|
||||||
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
DIRECTORY STRUCTURE
|
|
||||||
===================================================================
|
|
||||||
After unpacking the archive file, you should end up with the following
|
|
||||||
structure:
|
|
||||||
|
|
||||||
.../ The main PARADISEO-GPU directory, created when unpacking.
|
|
||||||
|
|
|
||||||
+-- build BUILD directory that contains libraries and executable files.
|
|
||||||
|
|
|
||||||
+-- src SOURCE directory Contains most PARADISEO-GPU .h files.
|
|
||||||
|
|
|
||||||
+-- doc DOCUMENTATION directory (generated by Doxygen).
|
|
||||||
| |
|
|
||||||
| +- html HTML files - start at index.html.
|
|
||||||
| |
|
|
||||||
| +- latex latex files - use to generate Postcript doc.
|
|
||||||
| |
|
|
||||||
| +- man Unix man format documentation.
|
|
||||||
|
|
|
||||||
|
|
|
||||||
+-- tutorial APPLICATIONS
|
|
||||||
|
|
|
||||||
+-- INSTANCES The instances problem directory (QAP instances ...)
|
|
||||||
|
|
|
||||||
+-- OneMax How make One max problem with parallel evalution of neighborhood(bit flipping) with hamming distances =1
|
|
||||||
|
|
|
||||||
+-- KswapOneMax How make One max problem with parallel evalution of neighborhood(bit flipping) with hamming distances >=1
|
|
||||||
|
|
|
||||||
+-- PPP_GPU How make Permuted Perceptron Problem with parallel evalution of neighborhood on GPU
|
|
||||||
|
|
|
||||||
+-- QAP_GPU How make Quadratic Assignement Problem with parallel evaluation of neighborhood on GPU
|
|
||||||
|
|
|
||||||
+-- QAP_CPU How make Quadratic Assignement Problem with sequentiel evaluation of neighborhood on CPU
|
|
||||||
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
NOTES
|
|
||||||
===================================================================
|
|
||||||
|
|
||||||
Mailing list : paradiseo-help@lists.gforge.inria.fr
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
##########################################################################################
|
|
||||||
### Doc generation using Doxygen
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
IF (DOXYGEN_FOUND)
|
|
||||||
|
|
||||||
SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "GPU documentation directory")
|
|
||||||
SET(GPU_DOC_CONFIG_FILE "doxyfile" CACHE PATH "GPU documentation configuration file")
|
|
||||||
# define the doc target
|
|
||||||
IF (DOXYGEN_EXECUTABLE)
|
|
||||||
ADD_CUSTOM_TARGET(doc
|
|
||||||
COMMAND ${DOXYGEN_EXECUTABLE} ${GPU_DOC_CONFIG_FILE}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
ENDIF (DOXYGEN_EXECUTABLE)
|
|
||||||
|
|
||||||
# configure doxyfile file
|
|
||||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${GPU_DOC_CONFIG_FILE}.cmake"
|
|
||||||
"${CMAKE_BINARY_DIR}/doc/${GPU_DOC_CONFIG_FILE}")
|
|
||||||
|
|
||||||
ELSE (DOXYGEN_FOUND)
|
|
||||||
MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found")
|
|
||||||
ENDIF (DOXYGEN_FOUND)
|
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
|
|
@ -1,274 +0,0 @@
|
||||||
# Doxyfile 1.7.1
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Project related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
DOXYFILE_ENCODING = UTF-8
|
|
||||||
PROJECT_NAME = @PACKAGE_NAME@
|
|
||||||
PROJECT_NUMBER = @PACKAGE_VERSION@
|
|
||||||
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc
|
|
||||||
CREATE_SUBDIRS = NO
|
|
||||||
OUTPUT_LANGUAGE = English
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
|
||||||
REPEAT_BRIEF = YES
|
|
||||||
ABBREVIATE_BRIEF = "The $name class" \
|
|
||||||
"The $name widget" \
|
|
||||||
"The $name file" \
|
|
||||||
is \
|
|
||||||
provides \
|
|
||||||
specifies \
|
|
||||||
contains \
|
|
||||||
represents \
|
|
||||||
a \
|
|
||||||
an \
|
|
||||||
the
|
|
||||||
ALWAYS_DETAILED_SEC = NO
|
|
||||||
INLINE_INHERITED_MEMB = YES
|
|
||||||
FULL_PATH_NAMES = NO
|
|
||||||
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
|
|
||||||
STRIP_FROM_INC_PATH =
|
|
||||||
SHORT_NAMES = NO
|
|
||||||
JAVADOC_AUTOBRIEF = YES
|
|
||||||
QT_AUTOBRIEF = YES
|
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
|
||||||
DETAILS_AT_TOP = NO
|
|
||||||
INHERIT_DOCS = YES
|
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
|
||||||
TAB_SIZE = 8
|
|
||||||
ALIASES =
|
|
||||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
|
||||||
BUILTIN_STL_SUPPORT = YES
|
|
||||||
CPP_CLI_SUPPORT = NO
|
|
||||||
SIP_SUPPORT = NO
|
|
||||||
IDL_PROPERTY_SUPPORT = YES
|
|
||||||
TYPEDEF_HIDES_STRUCT = NO
|
|
||||||
SYMBOL_CACHE_SIZE = 0
|
|
||||||
EXTENSION_MAPPING =
|
|
||||||
BUILTIN_STL_SUPPORT = NO
|
|
||||||
DISTRIBUTE_GROUP_DOC = NO
|
|
||||||
SUBGROUPING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Build related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
EXTRACT_ALL = NO
|
|
||||||
EXTRACT_PRIVATE = YES
|
|
||||||
EXTRACT_STATIC = YES
|
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
|
||||||
EXTRACT_LOCAL_METHODS = NO
|
|
||||||
EXTRACT_ANON_NSPACES = NO
|
|
||||||
HIDE_UNDOC_MEMBERS = YES
|
|
||||||
HIDE_UNDOC_CLASSES = YES
|
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
|
||||||
HIDE_IN_BODY_DOCS = NO
|
|
||||||
INTERNAL_DOCS = NO
|
|
||||||
CASE_SENSE_NAMES = YES
|
|
||||||
HIDE_SCOPE_NAMES = NO
|
|
||||||
SHOW_INCLUDE_FILES = YES
|
|
||||||
INLINE_INFO = YES
|
|
||||||
SORT_MEMBER_DOCS = NO
|
|
||||||
SORT_BRIEF_DOCS = NO
|
|
||||||
SORT_GROUP_NAMES = NO
|
|
||||||
SORT_BY_SCOPE_NAME = NO
|
|
||||||
GENERATE_TODOLIST = YES
|
|
||||||
GENERATE_TESTLIST = YES
|
|
||||||
GENERATE_BUGLIST = YES
|
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
|
||||||
ENABLED_SECTIONS =
|
|
||||||
MAX_INITIALIZER_LINES = 30
|
|
||||||
SHOW_USED_FILES = YES
|
|
||||||
SHOW_DIRECTORIES = YES
|
|
||||||
SHOW_FILES = YES
|
|
||||||
SHOW_NAMESPACES = YES
|
|
||||||
FILE_VERSION_FILTER =
|
|
||||||
LAYOUT_FILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to warning and progress messages
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
QUIET = YES
|
|
||||||
WARNINGS = NO
|
|
||||||
WARN_IF_UNDOCUMENTED = NO
|
|
||||||
WARN_IF_DOC_ERROR = YES
|
|
||||||
WARN_NO_PARAMDOC = NO
|
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
|
||||||
WARN_LOGFILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the input files
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
INPUT = @CMAKE_SOURCE_DIR@
|
|
||||||
INPUT_ENCODING = UTF-8
|
|
||||||
FILE_PATTERNS = *.cu \
|
|
||||||
*.cpp \
|
|
||||||
*.h \
|
|
||||||
NEWS README
|
|
||||||
RECURSIVE = YES
|
|
||||||
EXCLUDE =
|
|
||||||
EXCLUDE_SYMLINKS = NO
|
|
||||||
EXCLUDE_PATTERNS =
|
|
||||||
EXCLUDE_SYMBOLS = *::*
|
|
||||||
EXAMPLE_PATH =
|
|
||||||
EXAMPLE_PATTERNS = *
|
|
||||||
EXAMPLE_RECURSIVE = NO
|
|
||||||
IMAGE_PATH =
|
|
||||||
INPUT_FILTER =
|
|
||||||
FILTER_PATTERNS =
|
|
||||||
FILTER_SOURCE_FILES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to source browsing
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SOURCE_BROWSER = YES
|
|
||||||
INLINE_SOURCES = NO
|
|
||||||
STRIP_CODE_COMMENTS = YES
|
|
||||||
REFERENCED_BY_RELATION = YES
|
|
||||||
REFERENCES_RELATION = YES
|
|
||||||
REFERENCES_LINK_SOURCE = YES
|
|
||||||
USE_HTAGS = NO
|
|
||||||
VERBATIM_HEADERS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the alphabetical class index
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ALPHABETICAL_INDEX = YES
|
|
||||||
COLS_IN_ALPHA_INDEX = 3
|
|
||||||
IGNORE_PREFIX = moGPU
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the HTML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_HTML = YES
|
|
||||||
HTML_OUTPUT = html
|
|
||||||
HTML_FILE_EXTENSION = .html
|
|
||||||
HTML_HEADER =
|
|
||||||
HTML_FOOTER =
|
|
||||||
HTML_STYLESHEET =
|
|
||||||
HTML_ALIGN_MEMBERS = YES
|
|
||||||
GENERATE_HTMLHELP = NO
|
|
||||||
HTML_DYNAMIC_SECTIONS = NO
|
|
||||||
GENERATE_DOCSET = NO
|
|
||||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
|
||||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
|
||||||
CHM_FILE =
|
|
||||||
HHC_LOCATION =
|
|
||||||
GENERATE_CHI = NO
|
|
||||||
CHM_INDEX_ENCODING =
|
|
||||||
GENERATE_QHP = NO
|
|
||||||
QCH_FILE =
|
|
||||||
QHP_NAMESPACE =
|
|
||||||
QHP_VIRTUAL_FOLDER = doc
|
|
||||||
QHP_CUST_FILTER_NAME =
|
|
||||||
QHP_CUST_FILTER_ATTRS =
|
|
||||||
QHG_LOCATION =
|
|
||||||
DISABLE_INDEX = NO
|
|
||||||
ENUM_VALUES_PER_LINE = 4
|
|
||||||
GENERATE_TREEVIEW = YES
|
|
||||||
TREEVIEW_WIDTH = 250
|
|
||||||
FORMULA_FONTSIZE = 10
|
|
||||||
BINARY_TOC = NO
|
|
||||||
TOC_EXPAND = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the LaTeX output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_LATEX = YES
|
|
||||||
LATEX_OUTPUT = latex
|
|
||||||
LATEX_CMD_NAME = latex
|
|
||||||
MAKEINDEX_CMD_NAME = makeindex
|
|
||||||
COMPACT_LATEX = NO
|
|
||||||
PAPER_TYPE = a4wide
|
|
||||||
EXTRA_PACKAGES =
|
|
||||||
LATEX_HEADER =
|
|
||||||
PDF_HYPERLINKS = NO
|
|
||||||
USE_PDFLATEX = NO
|
|
||||||
LATEX_BATCHMODE = NO
|
|
||||||
LATEX_HIDE_INDICES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the RTF output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_RTF = NO
|
|
||||||
RTF_OUTPUT = rtf
|
|
||||||
COMPACT_RTF = NO
|
|
||||||
RTF_HYPERLINKS = NO
|
|
||||||
RTF_STYLESHEET_FILE =
|
|
||||||
RTF_EXTENSIONS_FILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the man page output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_MAN = YES
|
|
||||||
MAN_OUTPUT = man
|
|
||||||
MAN_EXTENSION = .3
|
|
||||||
MAN_LINKS = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the XML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_XML = NO
|
|
||||||
XML_OUTPUT = xml
|
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options for the AutoGen Definitions output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the Perl module output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_PERLMOD = NO
|
|
||||||
PERLMOD_LATEX = NO
|
|
||||||
PERLMOD_PRETTY = YES
|
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the preprocessor
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ENABLE_PREPROCESSING = YES
|
|
||||||
MACRO_EXPANSION = NO
|
|
||||||
EXPAND_ONLY_PREDEF = NO
|
|
||||||
SEARCH_INCLUDES = YES
|
|
||||||
INCLUDE_PATH =
|
|
||||||
INCLUDE_FILE_PATTERNS =
|
|
||||||
PREDEFINED =
|
|
||||||
EXPAND_AS_DEFINED =
|
|
||||||
SKIP_FUNCTION_MACROS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to external references
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
TAGFILES = @PARADISEO_EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html \
|
|
||||||
@PARADISEO_MO_BIN_DIR@/doc/mo.doxytag=http://paradiseo.gforge.inria.fr/addon/paradiseo-mo/doc \
|
|
||||||
|
|
||||||
GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/mogpu.doxytag
|
|
||||||
ALLEXTERNALS = NO
|
|
||||||
EXTERNAL_GROUPS = YES
|
|
||||||
PERL_PATH = /usr/bin/perl
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the dot tool
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
CLASS_DIAGRAMS = YES
|
|
||||||
MSCGEN_PATH =
|
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
|
||||||
HAVE_DOT = YES
|
|
||||||
DOT_FONTNAME = FreeSans
|
|
||||||
CLASS_GRAPH = YES
|
|
||||||
COLLABORATION_GRAPH = NO
|
|
||||||
GROUP_GRAPHS = YES
|
|
||||||
UML_LOOK = YES
|
|
||||||
TEMPLATE_RELATIONS = YES
|
|
||||||
INCLUDE_GRAPH = YES
|
|
||||||
INCLUDED_BY_GRAPH = YES
|
|
||||||
CALL_GRAPH = NO
|
|
||||||
CALLER_GRAPH = NO
|
|
||||||
GRAPHICAL_HIERARCHY = YES
|
|
||||||
DIRECTORY_GRAPH = YES
|
|
||||||
DOT_IMAGE_FORMAT = png
|
|
||||||
DOT_PATH =
|
|
||||||
DOTFILE_DIRS =
|
|
||||||
DOT_GRAPH_MAX_NODES = 50
|
|
||||||
MAX_DOT_GRAPH_DEPTH = 0
|
|
||||||
DOT_TRANSPARENT = NO
|
|
||||||
DOT_MULTI_TARGETS = NO
|
|
||||||
GENERATE_LEGEND = YES
|
|
||||||
DOT_CLEANUP = YES
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to the search engine
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SEARCHENGINE = YES
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
/** @mainpage Welcome ParadisEO GPU
|
|
||||||
|
|
||||||
@section intro Introduction
|
|
||||||
|
|
||||||
ParadisEO-GPU is a white-box object-oriented generic framework dedicated to the flexible design of local search algorithms on GPU (hill-climbing, tabu search ...)
|
|
||||||
|
|
||||||
@section tutorials Tutorials
|
|
||||||
|
|
||||||
Tutorials for ParadisEO-GPU are available in the "Tutorials section" of the <a href="http://paradiseo.gforge.inria.fr/index.php?n=Doc.Tutorials">ParadisEO tutorials</a>.
|
|
||||||
|
|
||||||
@section install Installation
|
|
||||||
|
|
||||||
The installation procedure of the package is detailed in the "README.txt" file located in the top-directory of the source-tree.
|
|
||||||
|
|
||||||
|
|
||||||
@section design Design
|
|
||||||
|
|
||||||
For an introduction to the design of ParadisEO,
|
|
||||||
you can look at the <a href="http://paradiseo.gforge.inria.fr">ParadisEO website</a>.
|
|
||||||
|
|
||||||
|
|
||||||
@section LICENSE
|
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
|
||||||
abiding by the rules of distribution of free software. You can use,
|
|
||||||
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".
|
|
||||||
|
|
||||||
As a counterpart to the access to the source code and rights to copy,
|
|
||||||
modify and redistribute granted by the license, users are provided only
|
|
||||||
with a limited warranty and the software's author, the holder of the
|
|
||||||
economic rights, and the successive licensors have only limited liability.
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @page webpages Related webpages
|
|
||||||
|
|
||||||
- ParadisEO <a href="http://paradiseo.gforge.inria.fr">homepage</a>
|
|
||||||
- INRIA GForge <a href="http://gforge.inria.fr/projects/paradiseo/">project page</a>
|
|
||||||
- Fore any questions, please contact paradiseo-help@lists.gforge.inria.fr
|
|
||||||
*/
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
#######################################################################################
|
|
||||||
### Paths to EO, MO, GPU, MOEO and CUDA must be specified above.
|
|
||||||
#######################################################################################
|
|
||||||
|
|
||||||
SET(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-eo" CACHE PATH "ParadisEO-EO source directory" FORCE)
|
|
||||||
SET(EO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-eo/build" CACHE PATH "ParadisEO-EO binary directory" FORCE)
|
|
||||||
|
|
||||||
SET(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-mo" CACHE PATH "ParadisMO-MO source directory" FORCE)
|
|
||||||
SET(MO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-mo/build" CACHE PATH "ParadisMO-MO binary directory" FORCE)
|
|
||||||
|
|
||||||
SET(GPU_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-gpu" CACHE PATH "ParadisEO-GPU source directory" FORCE)
|
|
||||||
SET(GPU_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-gpu/build" CACHE PATH "ParadisEO-GPU binary directory" FORCE)
|
|
||||||
|
|
||||||
SET(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/../problems" CACHE PATH "Problems dependant source directory" FORCE)
|
|
||||||
|
|
||||||
SET(CUDA_DIR "/usr/local/cuda" CACHE PATH "cuda directory" FORCE)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,141 +0,0 @@
|
||||||
/*
|
|
||||||
<moGPUBitVector.h>
|
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
|
||||||
|
|
||||||
Karima Boufaras, Thé Van LUONG
|
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
|
||||||
abiding by the rules of distribution of free software. You can use,
|
|
||||||
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".
|
|
||||||
|
|
||||||
As a counterpart to the access to the source code and rights to copy,
|
|
||||||
modify and redistribute granted by the license, users are provided only
|
|
||||||
with a limited warranty and the software's author, the holder of the
|
|
||||||
economic rights, and the successive licensors have only limited liability.
|
|
||||||
|
|
||||||
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 __moGPUBitVector_H_
|
|
||||||
#define __moGPUBitVector_H_
|
|
||||||
|
|
||||||
#include <GPUType/moGPUVector.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementation of Bit vector representation on GPU.
|
|
||||||
*/
|
|
||||||
|
|
||||||
template<class Fitness>
|
|
||||||
|
|
||||||
class moGPUBitVector: public moGPUVector<bool, Fitness> {
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define bool vector corresponding to Solution
|
|
||||||
**/
|
|
||||||
typedef bool ElemType;
|
|
||||||
using moGPUVector<bool, Fitness>::vect;
|
|
||||||
using moGPUVector<bool, Fitness>::N;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUBitVector() :
|
|
||||||
moGPUVector<bool, Fitness> () {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Constructor.
|
|
||||||
*@param _neighborhoodSize The neighborhood size.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUBitVector(unsigned _neighborhoodSize) :
|
|
||||||
moGPUVector<bool, Fitness> (_neighborhoodSize) {
|
|
||||||
create();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Constructor.
|
|
||||||
*@param _neighborhoodSize The neighborhood size.
|
|
||||||
*@param _b Value to assign to vector.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUBitVector(unsigned _neighborhoodSize, bool _b) :
|
|
||||||
moGPUVector<bool, Fitness> (_neighborhoodSize) {
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < _neighborhoodSize; i++)
|
|
||||||
vect[i] = _b;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Initializer of random bit vector.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void create() {
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < N; i++) {
|
|
||||||
|
|
||||||
vect[i] = (int) (rng.rand() / RAND_MAX);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Function inline to set the size of vector, called from host.
|
|
||||||
*@param _size the vector size
|
|
||||||
*/
|
|
||||||
|
|
||||||
void setSize(unsigned _size) {
|
|
||||||
|
|
||||||
if (_size < N) {
|
|
||||||
moGPUBitVector<Fitness> tmp_vect(_size);
|
|
||||||
for (unsigned i = 0; i < tmp_vect.N; i++)
|
|
||||||
tmp_vect.vect[i] = vect[i];
|
|
||||||
(tmp_vect).invalidate();
|
|
||||||
(*this) = tmp_vect;
|
|
||||||
} else if (_size > N) {
|
|
||||||
moGPUBitVector<Fitness> tmp_vect(_size);
|
|
||||||
for (unsigned i = 0; i < N; i++)
|
|
||||||
tmp_vect.vect[i] = vect[i];
|
|
||||||
(tmp_vect).invalidate();
|
|
||||||
(*this) = tmp_vect;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Write object. Called printOn since it prints the object _on_ a stream.
|
|
||||||
* @param _os A std::ostream.
|
|
||||||
*/
|
|
||||||
void printOn(std::ostream& _os) const {
|
|
||||||
EO<Fitness>::printOn(_os);
|
|
||||||
_os << ' ';
|
|
||||||
_os << N << ' ';
|
|
||||||
for (unsigned int i = 0; i < N; i++)
|
|
||||||
_os << (*this)[i] << ' ';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
/*
|
|
||||||
<moGPUIntVector.h>
|
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
|
||||||
|
|
||||||
Karima Boufaras, Thé Van LUONG
|
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
|
||||||
abiding by the rules of distribution of free software. You can use,
|
|
||||||
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".
|
|
||||||
|
|
||||||
As a counterpart to the access to the source code and rights to copy,
|
|
||||||
modify and redistribute granted by the license, users are provided only
|
|
||||||
with a limited warranty and the software's author, the holder of the
|
|
||||||
economic rights, and the successive licensors have only limited liability.
|
|
||||||
|
|
||||||
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 __moGPUIntVector_H_
|
|
||||||
#define __moGPUIntVector_H_
|
|
||||||
|
|
||||||
#include <GPUType/moGPUVector.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementation of integer vector representation on GPU.
|
|
||||||
*/
|
|
||||||
|
|
||||||
template<class Fitness>
|
|
||||||
|
|
||||||
class moGPUIntVector: public moGPUVector<int, Fitness> {
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
using moGPUVector<int, Fitness>::vect;
|
|
||||||
using moGPUVector<int, Fitness>::N;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUIntVector() :
|
|
||||||
moGPUVector<int, Fitness> () {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Constructor.
|
|
||||||
*@param _neighborhoodSize The neighborhood size.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUIntVector(unsigned _neighborhoodSize) :
|
|
||||||
moGPUVector<int, Fitness> (_neighborhoodSize) {
|
|
||||||
create();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Initializer of random integer vector.
|
|
||||||
*/
|
|
||||||
virtual void create() {
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < N; i++)
|
|
||||||
vect[i] = ((int) (rng.rand())) % N + 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Function inline to set the size of vector, called from host.
|
|
||||||
*@param _size the vector size
|
|
||||||
*/
|
|
||||||
|
|
||||||
virtual inline __host__ void setSize(unsigned _size) {
|
|
||||||
|
|
||||||
if(N==_size)
|
|
||||||
return;
|
|
||||||
moGPUIntVector<Fitness> tmp_vect(_size);
|
|
||||||
if(_size<N) {
|
|
||||||
for (unsigned i = 0; i < tmp_vect.N; i++)
|
|
||||||
tmp_vect.vect[i]= vect[i];
|
|
||||||
}
|
|
||||||
else if(_size>N) {
|
|
||||||
for (unsigned i = 0; i <N; i++)
|
|
||||||
tmp_vect.vect[i]= vect[i];
|
|
||||||
}
|
|
||||||
(tmp_vect).invalidate();
|
|
||||||
(*this)=tmp_vect;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Write object. Called printOn since it prints the object _on_ a stream.
|
|
||||||
* @param _os A std::ostream.
|
|
||||||
*/
|
|
||||||
void printOn(std::ostream& _os) const {
|
|
||||||
EO<Fitness>::printOn(_os);
|
|
||||||
_os << ' ';
|
|
||||||
_os << N << ' ';
|
|
||||||
unsigned int i;
|
|
||||||
for (i = 0; i < N; i++)
|
|
||||||
_os << vect[i] << ' ';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
/*
|
|
||||||
<moGPUPermutationVector.h>
|
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
|
||||||
|
|
||||||
Karima Boufaras, Thé Van LUONG
|
|
||||||
|
|
||||||
This software is governed by the CeCILL license under French law and
|
|
||||||
abiding by the rules of distribution of free software. You can use,
|
|
||||||
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".
|
|
||||||
|
|
||||||
As a counterpart to the access to the source code and rights to copy,
|
|
||||||
modify and redistribute granted by the license, users are provided only
|
|
||||||
with a limited warranty and the software's author, the holder of the
|
|
||||||
economic rights, and the successive licensors have only limited liability.
|
|
||||||
|
|
||||||
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 __moGPUPermutationVector_H_
|
|
||||||
#define __moGPUPermutationVector_H_
|
|
||||||
|
|
||||||
#include <GPUType/moGPUIntVector.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementation of Permutation vector representation on GPU.
|
|
||||||
*/
|
|
||||||
|
|
||||||
template<class Fitness>
|
|
||||||
|
|
||||||
class moGPUPermutationVector: public moGPUIntVector<Fitness> {
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
using moGPUIntVector<Fitness>::vect;
|
|
||||||
using moGPUIntVector<Fitness>::N;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUPermutationVector() :
|
|
||||||
moGPUIntVector<Fitness> () {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*Constructor.
|
|
||||||
*@param _size The solution size.
|
|
||||||
*/
|
|
||||||
|
|
||||||
moGPUPermutationVector(unsigned _size) :
|
|
||||||
moGPUIntVector<Fitness> (_size) {
|
|
||||||
create();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
*Initializer of random permuatation vector.
|
|
||||||
*/
|
|
||||||
void create() {
|
|
||||||
|
|
||||||
unsigned random;
|
|
||||||
int tmp;
|
|
||||||
for (unsigned i = 0; i < N; i++)
|
|
||||||
vect[i] = i;
|
|
||||||
// we want a random permutation so we shuffle
|
|
||||||
for (unsigned i = 0; i < N; i++) {
|
|
||||||
random = rng.rand() % (N - i) + i;
|
|
||||||
tmp = vect[i];
|
|
||||||
vect[i] = vect[random];
|
|
||||||
vect[random] = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue