CMakeLists.txt
上传用户:chinafayin
上传日期:2022-04-05
资源大小:153k
文件大小:2k
源码类别:

并行计算

开发平台:

Visual C++

  1. CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3)
  2. PROJECT(fastgrid)
  3. SET(CMAKE_BUILD_TYPE Release)
  4. SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--ptxas-options=-v)
  5. SET(AUTOGRID_SOURCES
  6.     ./ann/src/perf.cpp
  7.     ./ann/src/kd_dump.cpp
  8.     ./ann/src/bd_tree.cpp
  9.     ./ann/src/ANN.cpp
  10.     ./ann/src/kd_search.cpp
  11.     ./ann/src/brute.cpp
  12.     ./ann/src/kd_tree.cpp
  13.     ./ann/src/bd_search.cpp
  14.     ./ann/src/bd_fix_rad_search.cpp
  15.     ./ann/src/kd_util.cpp
  16.     ./ann/src/kd_pr_search.cpp
  17.     ./ann/src/kd_fix_rad_search.cpp
  18.     ./ann/src/bd_pr_search.cpp
  19.     ./ann/src/kd_split.cpp
  20.     ./math/Geometric/Sphere3.cpp
  21.     ./math/Geometric/AxisAlignedBox3.cpp
  22.     ./math/Geometric/Vec4.cpp
  23.     ./math/Geometric/Intersection3.cpp
  24.     ./openthreads/pthread_src/PThread.c++
  25.     ./openthreads/pthread_src/PThreadBarrier.c++
  26.     ./openthreads/pthread_src/PThreadCondition.c++
  27.     ./openthreads/pthread_src/PThreadMutex.c++
  28.     ./times.cpp
  29.     ./DesolvExpFunc.cpp
  30.     ./InputDataLoader.cpp
  31.     ./ParameterLibrary.cpp
  32.     ./PairwiseInteractionEnergies.cpp
  33.     ./main.cpp
  34.     ./BondVectors.cpp
  35.     ./LogFile.cpp
  36.     ./CalculateGridmaps.cpp
  37.     ./ProgramParameters.cpp
  38.     ./Utils.cpp
  39.     ./GridMap.cpp
  40.     ./electrostatics/Cpu.cpp
  41. )
  42. ADD_DEFINITIONS(-DLinux -DFASTGRID)
  43. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread")
  44. SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/cuda" ${CMAKE_MODULE_PATH})
  45. FIND_PACKAGE(OpenMP)
  46. IF(OPENMP_FOUND)
  47.     ADD_DEFINITIONS(-DAG_OPENMP)
  48.     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
  49. ENDIF(OPENMP_FOUND)
  50. FIND_PACKAGE(CUDA)
  51. #IF(CUDA_FOUND)
  52.     ADD_DEFINITIONS(-DAG_CUDA)
  53.     INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
  54.     SET(AUTOGRID_SOURCES
  55.         ${AUTOGRID_SOURCES}
  56.         ./electrostatics/Cuda.cpp
  57.         ./electrostatics/CudaConstantMemory.cpp
  58.         ./electrostatics/CudaEvents.cpp
  59.         ./electrostatics/CudaFloatTexture1D.cpp
  60.         ./electrostatics/CudaGridMap.cpp
  61.         ./electrostatics/cuda_internal/Interface.cpp
  62.         ./electrostatics/cuda_internal/StandardKernels.cu
  63.         ./electrostatics/cuda_internal/DDDConstMemKernels.cu
  64.     )
  65.     CUDA_ADD_EXECUTABLE(fastgrid4 ${AUTOGRID_SOURCES})
  66.     CUDA_BUILD_CLEAN_TARGET()
  67. #ELSE(CUDA_FOUND)
  68. #    ADD_EXECUTABLE(fastgrid4 ${AUTOGRID_SOURCES})
  69. #ENDIF(CUDA_FOUND)