From 3daf11012446f3ad8338b1feb6bba094b1feaecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 29 Nov 2023 20:02:34 +0100 Subject: [PATCH 1/2] Absorb SPQR_CUDA module into libspqr library --- SPQR/CMakeLists.txt | 21 ++-- SPQR/Config/SPQRConfig.cmake.in | 28 ++--- SPQR/Config/SPQR_CUDA.pc.in | 19 ---- SPQR/Config/SPQR_CUDAConfig.cmake.in | 163 --------------------------- SPQR/SPQRGPU/CMakeLists.txt | 152 +++---------------------- 5 files changed, 38 insertions(+), 345 deletions(-) delete mode 100644 SPQR/Config/SPQR_CUDA.pc.in delete mode 100644 SPQR/Config/SPQR_CUDAConfig.cmake.in diff --git a/SPQR/CMakeLists.txt b/SPQR/CMakeLists.txt index 67b8e0b47..cec7144cc 100644 --- a/SPQR/CMakeLists.txt +++ b/SPQR/CMakeLists.txt @@ -75,7 +75,6 @@ if ( SUITESPARSE_CUDA ) # with CUDA add_subdirectory ( GPURuntime ) add_subdirectory ( GPUQREngine ) - add_subdirectory ( SPQRGPU ) endif ( ) #------------------------------------------------------------------------------- @@ -220,15 +219,15 @@ endif ( ) if ( SUITESPARSE_CUDA ) # CUDA + add_subdirectory ( SPQRGPU ) + if ( BUILD_SHARED_LIBS ) - target_link_libraries ( SPQR PRIVATE - SPQR_CUDA GPUQREngine GPURuntime ) + target_link_libraries ( SPQR PRIVATE GPUQREngine GPURuntime ) target_compile_definitions ( SPQR PUBLIC "SUITESPARSE_CUDA" ) endif ( ) set ( SPQR_CFLAGS "-DSUITESPARSE_CUDA" ) if ( BUILD_STATIC_LIBS ) - target_link_libraries ( SPQR_static PUBLIC - SPQR_CUDA_static GPUQREngine_static GPURuntime_static ) + target_link_libraries ( SPQR_static PUBLIC GPUQREngine_static GPURuntime_static ) target_compile_definitions ( SPQR_static PUBLIC "SUITESPARSE_CUDA" ) endif ( ) endif ( ) @@ -409,13 +408,13 @@ if ( DEMO ) if ( SUITESPARSE_CUDA ) if ( BUILD_SHARED_LIBS ) - target_link_libraries ( qrdemo_gpu PUBLIC SPQR SPQR_CUDA ) - target_link_libraries ( qrdemo_gpu2 PUBLIC SPQR SPQR_CUDA ) - target_link_libraries ( qrdemo_gpu3 PUBLIC SPQR SPQR_CUDA ) + target_link_libraries ( qrdemo_gpu PUBLIC SPQR ) + target_link_libraries ( qrdemo_gpu2 PUBLIC SPQR ) + target_link_libraries ( qrdemo_gpu3 PUBLIC SPQR ) else ( ) - target_link_libraries ( qrdemo_gpu PUBLIC SPQR_static SPQR_CUDA_static ) - target_link_libraries ( qrdemo_gpu2 PUBLIC SPQR_static SPQR_CUDA_static ) - target_link_libraries ( qrdemo_gpu3 PUBLIC SPQR_static SPQR_CUDA_static ) + target_link_libraries ( qrdemo_gpu PUBLIC SPQR_static ) + target_link_libraries ( qrdemo_gpu2 PUBLIC SPQR_static ) + target_link_libraries ( qrdemo_gpu3 PUBLIC SPQR_static ) endif ( ) target_link_libraries ( qrdemo_gpu PUBLIC SuiteSparse::CHOLMOD SuiteSparse::SuiteSparseConfig ) diff --git a/SPQR/Config/SPQRConfig.cmake.in b/SPQR/Config/SPQRConfig.cmake.in index babe5bc7b..f7c277527 100644 --- a/SPQR/Config/SPQRConfig.cmake.in +++ b/SPQR/Config/SPQRConfig.cmake.in @@ -40,6 +40,19 @@ include ( CMakeFindDependencyMacro ) set ( _dependencies_found ON ) +# Look for NVIDIA CUDA toolkit +if ( @SUITESPARSE_CUDA@ AND NOT CUDAToolkit_FOUND ) + find_dependency ( CUDAToolkit @CUDAToolkit_VERSION_MAJOR@ ) + if ( NOT CUDAToolkit_FOUND ) + set ( _dependencies_found OFF ) + endif ( ) +endif ( ) + +if ( NOT _dependencies_found ) + set ( SPQR_FOUND OFF ) + return ( ) +endif ( ) + # Look for SuiteSparse_config and CHOLMOD targets if ( @SUITESPARSE_IN_BUILD_TREE@ ) if ( NOT TARGET SuiteSparse::SuiteSparseConfig ) @@ -98,16 +111,6 @@ if ( @SUITESPARSE_CUDA@ ) find_dependency ( GPUQREngine @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@ ) endif ( ) endif ( ) - - if ( NOT SPQR_CUDA_FOUND ) - # First check in a common build tree - find_dependency ( SPQR_CUDA ${SPQR_VERSION} - PATHS ${CMAKE_SOURCE_DIR}/../SPQR/build NO_DEFAULT_PATH ) - # Then, check in the currently active CMAKE_MODULE_PATH - if ( NOT SPQR_CUDA_FOUND ) - find_dependency ( SPQR_CUDA ${SPQR_VERSION} ) - endif ( ) - endif ( ) else ( ) if ( NOT SuiteSparse_GPURuntime_FOUND ) find_dependency ( SuiteSparse_GPURuntime @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@ ) @@ -115,11 +118,8 @@ if ( @SUITESPARSE_CUDA@ ) if ( NOT GPUQREngine_FOUND ) find_dependency ( GPUQREngine @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@ ) endif ( ) - if ( NOT SPQR_CUDA_FOUND ) - find_dependency ( SPQR_CUDA ${SPQR_VERSION} ) - endif ( ) endif ( ) - if ( NOT SuiteSparse_GPURuntime_FOUND OR NOT GPUQREngine_FOUND OR NOT SPQR_CUDA_FOUND ) + if ( NOT SuiteSparse_GPURuntime_FOUND OR NOT GPUQREngine_FOUND ) set ( _dependencies_found OFF ) endif ( ) endif ( ) diff --git a/SPQR/Config/SPQR_CUDA.pc.in b/SPQR/Config/SPQR_CUDA.pc.in deleted file mode 100644 index 6617cbf9c..000000000 --- a/SPQR/Config/SPQR_CUDA.pc.in +++ /dev/null @@ -1,19 +0,0 @@ -# SPQR_CUDA, Copyright (c) 2008-2023, Timothy A. Davis. -# All Rights Reserved. -# SPDX-License-Identifier: GPL-2.0-or-later - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -# FIXME: Which flags do we need to statically link CUDA - -Name: SPQR_CUDA -URL: https://github.com/DrTimothyAldenDavis/SuiteSparse -Description: GPU module for SPQR in SuiteSparse -Version: @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@.@SPQR_VERSION_SUB@ -Requires.private: CHOLMOD -Libs: -L${libdir} -lspqr_cuda -Libs.private: @SPQR_STATIC_LIBS@ -Cflags: -I${includedir} diff --git a/SPQR/Config/SPQR_CUDAConfig.cmake.in b/SPQR/Config/SPQR_CUDAConfig.cmake.in deleted file mode 100644 index 832318fc8..000000000 --- a/SPQR/Config/SPQR_CUDAConfig.cmake.in +++ /dev/null @@ -1,163 +0,0 @@ -#------------------------------------------------------------------------------- -# SuiteSparse/SPQR/cmake_modules/SPQR_CUDAConfig.cmake -#------------------------------------------------------------------------------- - -# The following copyright and license applies to just this file only, not to -# the library itself: -# SPQR_CUDAConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved. -# SPDX-License-Identifier: BSD-3-clause - -#------------------------------------------------------------------------------- - -# Finds the SPQR_CUDA include file and compiled library. -# The following targets are defined: -# SuiteSparse::SPQR_CUDA - for the shared library (if available) -# SuiteSparse::SPQR_CUDA_static - for the static library (if available) - -# For backward compatibility the following variables are set: - -# SPQR_CUDA_LIBRARY - dynamic SPQR_CUDA library -# SPQR_CUDA_STATIC - static SPQR_CUDA library -# SPQR_CUDA_LIBRARIES - libraries when using SPQR_CUDA -# SPQR_CUDA_FOUND - true if SPQR_CUDA found - -# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is -# installed. - -#------------------------------------------------------------------------------- - -@PACKAGE_INIT@ - -set ( SPQR_CUDA_DATE "@SPQR_DATE@" ) -set ( SPQR_CUDA_VERSION_MAJOR @SPQR_VERSION_MAJOR@ ) -set ( SPQR_CUDA_VERSION_MINOR @SPQR_VERSION_MINOR@ ) -set ( SPQR_CUDA_VERSION_PATCH @SPQR_VERSION_SUB@ ) -set ( SPQR_CUDA_VERSION "@SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@.@SPQR_VERSION_SUB@" ) - -# Check for dependent targets -include ( CMakeFindDependencyMacro ) -set ( _dependencies_found ON ) - -# Look for CHOLMOD target -if ( @SUITESPARSE_IN_BUILD_TREE@ ) - if ( NOT TARGET SuiteSparse::CHOLMOD ) - # First check in a common build tree - find_dependency ( CHOLMOD @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@ - PATHS ${CMAKE_SOURCE_DIR}/../CHOLMOD/build NO_DEFAULT_PATH ) - # Then, check in the currently active CMAKE_MODULE_PATH - if ( NOT CHOLMOD_FOUND ) - find_dependency ( CHOLMOD @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@ ) - endif ( ) - endif ( ) - -else ( ) - if ( NOT TARGET SuiteSparse::CHOLMOD ) - find_dependency ( CHOLMOD @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@ ) - endif ( ) -endif ( ) - -if ( NOT CHOLMOD_FOUND ) - set ( _dependencies_found OFF ) -endif ( ) - -# Look for NVIDIA CUDA toolkit -if ( NOT CUDAToolkit_FOUND ) - find_dependency ( CUDAToolkit @CUDAToolkit_VERSION_MAJOR@ ) - if ( NOT CUDAToolkit_FOUND ) - set ( _dependencies_found OFF ) - endif ( ) -endif ( ) - -if ( NOT _dependencies_found ) - set ( SPQR_CUDA_FOUND OFF ) - return ( ) -endif ( ) - -# Import target -include ( ${CMAKE_CURRENT_LIST_DIR}/SPQR_CUDATargets.cmake ) - -# The following is only for backward compatibility with FindSPQR_CUDA. - -set ( _target_shared SuiteSparse::SPQR_CUDA ) -set ( _target_static SuiteSparse::SPQR_CUDA_static ) -set ( _var_prefix "SPQR_CUDA" ) - -if ( NOT @BUILD_SHARED_LIBS@ AND NOT TARGET ${_target_shared} ) - # make sure there is always an import target without suffix ) - add_library ( ${_target_shared} ALIAS ${_target_static} ) -endif ( ) - -get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES ) -if ( ${_var_prefix}_INCLUDE_DIR ) - # First item in SuiteSparse targets contains the "main" header directory. - list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR ) -endif ( ) -get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB ) -if ( NOT ${_var_prefix}_LIBRARY ) - get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION ) - if ( EXISTS ${_library_chk} ) - set ( ${_var_prefix}_LIBRARY ${_library_chk} ) - endif ( ) -endif ( ) -if ( TARGET ${_target_static} ) - get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION ) -endif ( ) - -# Check for most common build types -set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" "None" ) - -get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG ) -if ( _isMultiConfig ) - # For multi-configuration generators (e.g., Visual Studio), prefer those - # configurations. - list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} ) -else ( ) - # For single-configuration generators, prefer the current configuration. - list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} ) -endif ( ) - -list ( REMOVE_DUPLICATES _config_types ) - -foreach ( _config ${_config_types} ) - string ( TOUPPER ${_config} _uc_config ) - if ( NOT ${_var_prefix}_LIBRARY ) - get_target_property ( _library_chk ${_target_shared} - IMPORTED_IMPLIB_${_uc_config} ) - if ( EXISTS ${_library_chk} ) - set ( ${_var_prefix}_LIBRARY ${_library_chk} ) - endif ( ) - endif ( ) - if ( NOT ${_var_prefix}_LIBRARY ) - get_target_property ( _library_chk ${_target_shared} - IMPORTED_LOCATION_${_uc_config} ) - if ( EXISTS ${_library_chk} ) - set ( ${_var_prefix}_LIBRARY ${_library_chk} ) - endif ( ) - endif ( ) - if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC ) - get_target_property ( _library_chk ${_target_static} - IMPORTED_LOCATION_${_uc_config} ) - if ( EXISTS ${_library_chk} ) - set ( ${_var_prefix}_STATIC ${_library_chk} ) - endif ( ) - endif ( ) -endforeach ( ) - -set ( SPQR_CUDA_LIBRARIES ${SPQR_CUDA_LIBRARY} ) - -macro ( suitesparse_check_exist _var _files ) - # ignore generator expressions - string ( GENEX_STRIP "${_files}" _files2 ) - - foreach ( _file ${_files2} ) - if ( NOT EXISTS "${_file}" ) - message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" ) - endif ( ) - endforeach () -endmacro ( ) - -suitesparse_check_exist ( SPQR_CUDA_LIBRARY ${SPQR_CUDA_LIBRARY} ) - -message ( STATUS "SPQR_CUDA version: ${SPQR_CUDA_VERSION}" ) -message ( STATUS "SPQR_CUDA library: ${SPQR_CUDA_LIBRARY}" ) -message ( STATUS "SPQR_CUDA static: ${SPQR_CUDA_STATIC}" ) diff --git a/SPQR/SPQRGPU/CMakeLists.txt b/SPQR/SPQRGPU/CMakeLists.txt index 2175c75dc..4316886bc 100644 --- a/SPQR/SPQRGPU/CMakeLists.txt +++ b/SPQR/SPQRGPU/CMakeLists.txt @@ -20,158 +20,34 @@ message ( STATUS "Building SPQR_CUDA version: v" include ( SuiteSparsePolicy ) -project ( spqr_cuda - VERSION "${SPQR_VERSION_MAJOR}.${SPQR_VERSION_MINOR}.${SPQR_VERSION_SUB}" - LANGUAGES CXX ) +enable_language ( CXX ) + message ( STATUS "C++ flags for CUDA: ${CMAKE_CXX_FLAGS}" ) file ( GLOB SPQR_CUDA_SOURCES "spqrgpu_*.cpp" ) if ( BUILD_SHARED_LIBS ) - add_library ( SPQR_CUDA SHARED ${SPQR_CUDA_SOURCES} ) - - set_target_properties ( SPQR_CUDA PROPERTIES - VERSION ${SPQR_VERSION_MAJOR}.${SPQR_VERSION_MINOR}.${SPQR_VERSION_SUB} - CXX_STANDARD_REQUIRED ON - CXX_STANDARD 17 - C_STANDARD_REQUIRED ON - C_STANDARD 11 - OUTPUT_NAME spqr_cuda - SOVERSION ${SPQR_VERSION_MAJOR} ) + target_sources ( SPQR PRIVATE ${SPQR_CUDA_SOURCES} ) endif ( ) if ( BUILD_STATIC_LIBS ) - add_library ( SPQR_CUDA_static STATIC ${SPQR_CUDA_SOURCES} ) - - set_target_properties ( SPQR_CUDA_static PROPERTIES - CXX_STANDARD_REQUIRED ON - CXX_STANDARD 17 - C_STANDARD_REQUIRED ON - C_STANDARD 11 - OUTPUT_NAME spqr_cuda ) - - if ( MSVC ) - set_target_properties ( SPQR_CUDA_static PROPERTIES - OUTPUT_NAME SPQR_CUDA_static ) - endif ( ) + target_sources ( SPQR_static PRIVATE ${SPQR_CUDA_SOURCES} ) endif ( ) if ( BUILD_SHARED_LIBS ) - target_include_directories ( SPQR_CUDA PRIVATE - "$" - "$" - "$" - ${CUDAToolkit_INCLUDE_DIRS} - "$" ) + set_target_properties ( SPQR PROPERTIES POSITION_INDEPENDENT_CODE ON ) + set_target_properties ( SPQR PROPERTIES CUDA_SEPARABLE_COMPILATION ON ) + target_compile_definitions ( SPQR PRIVATE "SUITESPARSE_CUDA" ) - set_target_properties ( SPQR_CUDA PROPERTIES POSITION_INDEPENDENT_CODE ON ) - set_target_properties ( SPQR_CUDA PROPERTIES CUDA_SEPARABLE_COMPILATION ON ) - target_compile_definitions ( SPQR_CUDA PRIVATE "SUITESPARSE_CUDA" ) - - target_link_libraries ( SPQR_CUDA PRIVATE SuiteSparse::CHOLMOD ) - - target_link_libraries ( SPQR_CUDA PRIVATE CUDA::nvrtc CUDA::cudart_static CUDA::cublas ) + target_link_libraries ( SPQR PRIVATE + CUDA::nvrtc CUDA::cudart_static CUDA::cublas ) endif ( ) if ( BUILD_STATIC_LIBS ) - target_include_directories ( SPQR_CUDA_static PRIVATE - "$" - "$" - "$" - ${CUDAToolkit_INCLUDE_DIRS} - "$" ) - - set_target_properties ( SPQR_CUDA_static PROPERTIES CUDA_SEPARABLE_COMPILATION ON ) - set_target_properties ( SPQR_CUDA_static PROPERTIES POSITION_INDEPENDENT_CODE ON ) - target_compile_definitions ( SPQR_CUDA_static PRIVATE "SUITESPARSE_CUDA" ) - - if ( TARGET SuiteSparse::CHOLMOD_static ) - target_link_libraries ( SPQR_CUDA_static PUBLIC SuiteSparse::CHOLMOD_static ) - else ( ) - target_link_libraries ( SPQR_CUDA_static PUBLIC SuiteSparse::CHOLMOD ) - endif ( ) - - target_link_libraries ( SPQR_CUDA_static PUBLIC CUDA::nvrtc CUDA::cudart_static CUDA::cublas ) -endif ( ) - -#------------------------------------------------------------------------------- -# installation location -#------------------------------------------------------------------------------- - -include ( CMakePackageConfigHelpers ) - -if ( BUILD_SHARED_LIBS ) - install ( TARGETS SPQR_CUDA - EXPORT SPQR_CUDATargets - LIBRARY DESTINATION ${SUITESPARSE_LIBDIR} - ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR} - RUNTIME DESTINATION ${SUITESPARSE_BINDIR} ) -endif ( ) - -if ( BUILD_STATIC_LIBS ) - install ( TARGETS SPQR_CUDA_static - EXPORT SPQR_CUDATargets - ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR} ) -endif ( ) - -# create (temporary) export target file during build -export ( EXPORT SPQR_CUDATargets - NAMESPACE SuiteSparse:: - FILE ${CMAKE_CURRENT_BINARY_DIR}/../SPQR_CUDATargets.cmake ) - -# install export target, config and version files for find_package -install ( EXPORT SPQR_CUDATargets - NAMESPACE SuiteSparse:: - DESTINATION ${SUITESPARSE_PKGFILEDIR}/cmake/SPQR_CUDA ) - -# generate config file to be used in common build tree -set ( SUITESPARSE_IN_BUILD_TREE ON ) -configure_package_config_file ( - ../Config/SPQR_CUDAConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/../SPQR_CUDAConfig.cmake - INSTALL_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../SPQR_CUDAConfig.cmake ) - -# generate config file to be installed -set ( SUITESPARSE_IN_BUILD_TREE OFF ) -configure_package_config_file ( - ../Config/SPQR_CUDAConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/../target/SPQR_CUDAConfig.cmake - INSTALL_DESTINATION ${SUITESPARSE_PKGFILEDIR}/cmake/SPQR_CUDA ) - -write_basic_package_version_file ( - ${CMAKE_CURRENT_BINARY_DIR}/../SPQR_CUDAConfigVersion.cmake - COMPATIBILITY SameMajorVersion ) - -install ( FILES - ${CMAKE_CURRENT_BINARY_DIR}/../SPQR_CUDAConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/../SPQR_CUDAConfigVersion.cmake - DESTINATION ${SUITESPARSE_PKGFILEDIR}/cmake/SPQR_CUDA ) - -#------------------------------------------------------------------------------- -# create pkg-config file -#------------------------------------------------------------------------------- + set_target_properties ( SPQR_static PROPERTIES CUDA_SEPARABLE_COMPILATION ON ) + set_target_properties ( SPQR_static PROPERTIES POSITION_INDEPENDENT_CODE ON ) + target_compile_definitions ( SPQR_static PRIVATE "SUITESPARSE_CUDA" ) -if ( NOT MSVC ) - set ( prefix "${CMAKE_INSTALL_PREFIX}" ) - set ( exec_prefix "\${prefix}" ) - cmake_path ( IS_ABSOLUTE SUITESPARSE_LIBDIR SUITESPARSE_LIBDIR_IS_ABSOLUTE ) - if (SUITESPARSE_LIBDIR_IS_ABSOLUTE) - set ( libdir "${SUITESPARSE_LIBDIR}") - else ( ) - set ( libdir "\${exec_prefix}/${SUITESPARSE_LIBDIR}") - endif ( ) - cmake_path ( IS_ABSOLUTE SUITESPARSE_INCLUDEDIR SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE ) - if (SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE) - set ( includedir "${SUITESPARSE_INCLUDEDIR}") - else ( ) - set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}") - endif ( ) - configure_file ( - ../Config/SPQR_CUDA.pc.in - SPQR_CUDA.pc - @ONLY - NEWLINE_STYLE LF ) - install ( FILES - ${CMAKE_CURRENT_BINARY_DIR}/SPQR_CUDA.pc - DESTINATION ${SUITESPARSE_PKGFILEDIR}/pkgconfig ) + target_link_libraries ( SPQR_static PUBLIC + CUDA::nvrtc CUDA::cudart_static CUDA::cublas ) endif ( ) From 46bcb022ddd559f4b4c36fb16467233649dbbd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 29 Nov 2023 20:11:50 +0100 Subject: [PATCH 2/2] SPQRGPU: Explicitly add template argument. --- SPQR/SPQRGPU/spqrgpu_kernel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPQR/SPQRGPU/spqrgpu_kernel.cpp b/SPQR/SPQRGPU/spqrgpu_kernel.cpp index a3482e8ea..6f8fe284a 100644 --- a/SPQR/SPQRGPU/spqrgpu_kernel.cpp +++ b/SPQR/SPQRGPU/spqrgpu_kernel.cpp @@ -414,7 +414,7 @@ void spqrgpu_kernel f, frelp, pid, prelp)); // using placement new - Front *front = new (&fronts[frelp]) Front(frelp, prelp, fm, fn); + Front *front = new (&fronts[frelp]) Front (frelp, prelp, fm, fn); front->fidg = f; front->pidg = pid; @@ -478,8 +478,8 @@ void spqrgpu_kernel // only copy the exact CBlock back to the GPU PR (("building child %ld (%ld) with parent %ld (%ld)\n", c, pNextChild, f, frelp)); - Front *child = new (&fronts[pNextChild]) - Front(pNextChild, frelp, ccm, ccn); + Front *child = new (&fronts[pNextChild]) + Front (pNextChild, frelp, ccm, ccn); child->fidg = c; child->pidg = f;