Skip to content
Permalink
Browse files

OpenCL POC 1

  • Loading branch information
elpaso committed Aug 8, 2018
1 parent a2a5669 commit 05be622c3043f45892e3901218fae711753117bd
Showing with 322 additions and 25 deletions.
  1. +13 −0 CMakeLists.txt
  2. +2 −0 cmake_templates/qgsconfig.h.in
  3. +12 −0 src/analysis/CMakeLists.txt
  4. +295 −25 src/analysis/raster/qgsninecellfilter.cpp
@@ -28,6 +28,19 @@ MESSAGE(STATUS "QGIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSIO


#############################################################
# Configure OpenCL if available

option(USE_OPENCL "Use OpenCL" ON)
if (USE_OPENCL)
FIND_PACKAGE(OpenCL)
if(${OpenCL_FOUND})
SET (USE_OPENCL TRUE CACHE BOOL "Use OpenCL")
IF(USE_OPENCL)
SET(HAVE_OPENCL TRUE)
ENDIF(USE_OPENCL)
endif(${OpenCL_FOUND})
endif(USE_OPENCL)

# Configure CCache if available
IF(NOT MSVC)
option(USE_CCACHE "Use ccache" ON)
@@ -57,6 +57,8 @@

#cmakedefine HAVE_SERVER_PYTHON_PLUGINS

#cmakedefine HAVE_OPENCL

#cmakedefine ENABLE_MODELTEST

#cmakedefine HAVE_3D
@@ -300,8 +300,15 @@ INCLUDE_DIRECTORIES(SYSTEM
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${OpenCL_INCLUDE_DIRS}
)

IF(HAVE_OPENCL)
INCLUDE_DIRECTORIES(${OpenCL_LIBRARIES})
ENDIF(HAVE_OPENCL)



#############################################################
# qgis_analysis library

@@ -353,6 +360,11 @@ ENDIF (NOT ANDROID)

TARGET_LINK_LIBRARIES(qgis_analysis qgis_core)

IF(HAVE_OPENCL)
TARGET_LINK_LIBRARIES(qgis_analysis ${OpenCL_LIBRARIES})
ENDIF(HAVE_OPENCL)


# clang-tidy
IF(CLANG_TIDY_EXE)
SET_TARGET_PROPERTIES(

0 comments on commit 05be622

Please sign in to comment.
You can’t perform that action at this time.