Support for optional double threading in OpenCL and CUDA.
This commit is contained in:
parent
4e0d75b611
commit
e6fa35db42
4 changed files with 159 additions and 76 deletions
|
@ -8,6 +8,8 @@ option(WITH_TLS "Enable OpenSSL support" ON)
|
|||
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||
option(WITH_CUDA "Enable CUDA support" ON)
|
||||
option(WITH_OPENCL "Enable OpenCL support" ON)
|
||||
option(WITH_OPENCL_DOUBLE_THREADS "Enable dual threads for OpenCL jobs" ON)
|
||||
option(WITH_CUDA_DOUBLE_THREADS "Enable dual threads for CUDA jobs" ON)
|
||||
|
||||
include (CheckIncludeFile)
|
||||
include (cmake/cpu.cmake)
|
||||
|
@ -373,6 +375,9 @@ endif(ARCH STREQUAL "arm" OR ARCH STREQUAL "aarch64")
|
|||
if(WITH_OPENCL)
|
||||
add_definitions(-DWITH_OPENCL)
|
||||
find_package(OpenCL REQUIRED)
|
||||
if(WITH_OPENCL_DOUBLE_THREADS)
|
||||
add_definitions(-DPARALLEL_OPENCL)
|
||||
endif()
|
||||
include_directories(${OpenCL_INCLUDE_DIR})
|
||||
add_library(opencl_hasher MODULE ${SOURCE_OPENCL_HASHER})
|
||||
set_target_properties(opencl_hasher
|
||||
|
@ -388,7 +393,7 @@ endif()
|
|||
if(WITH_CUDA)
|
||||
add_definitions(-DWITH_CUDA)
|
||||
find_package(CUDA REQUIRED)
|
||||
if(NOT WIN32)
|
||||
if(WITH_CUDA_DOUBLE_THREADS)
|
||||
add_definitions(-DPARALLEL_CUDA)
|
||||
endif()
|
||||
set(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue