Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHOLMOD GPU: Fix qsort #366

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,20 @@ if ( SUITESPARSE_CUDA )
target_link_libraries ( CHOLMOD_static PUBLIC CUDA::nvrtc CUDA::cudart_static
CUDA::nvToolsExt CUDA::cublas )
endif ( )

include ( CheckTypeSize )
set ( old_CMAKE_EXTRA_INCLUDE_FILES CMAKE_EXTRA_INCLUDE_FILES )
list ( APPEND CMAKE_EXTRA_INCLUDE_FILES "stdlib.h" )
check_type_size ( "__compar_fn_t" COMPAR_FN_T )
set ( CMAKE_EXTRA_INCLUDE_FILES old_CMAKE_EXTRA_INCLUDE_FILES )

if ( NOT HAVE_COMPAR_FN_T )
target_compile_definitions ( CHOLMOD PRIVATE NCOMPAR_FN_T )
if ( NOT NSTATIC )
target_compile_definitions ( CHOLMOD_static PRIVATE NCOMPAR_FN_T )
endif ( )
endif ( )

endif ( )

#-------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions CHOLMOD/GPU/t_cholmod_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ int TEMPLATE2 (CHOLMOD (gpu_init))

}

#if defined(NCOMPAR_FN_T)
typedef int (*__compar_fn_t)(const void *, const void *);
#endif

/* ========================================================================== */
/* === gpu_reorder_descendants ============================================== */
Expand Down