-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHOLMOD METIS interface: use GKRAND with threadprivate
- Loading branch information
1 parent
d51c90f
commit f3ac3ea
Showing
16 changed files
with
117 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#------------------------------------------------------------------------------- | ||
# GraphBLAS/cmake_modules/SuiteSparse__thread.cmake | ||
#------------------------------------------------------------------------------- | ||
|
||
# Copyright (c) 2017-2023, Timothy A. Davis. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
#------------------------------------------------------------------------------- | ||
|
||
# determine if the __thread keyword is available, which is an extension by | ||
# gcc but supported by many compilers, to indicate thread-local-storage. | ||
|
||
include ( CheckCSourceRuns ) | ||
|
||
set ( thread_src | ||
" #include <stdio.h> | ||
__thread int x = 1 ; | ||
int main (void) | ||
{ | ||
x = 0 ; | ||
return (x) ; | ||
} | ||
" ) | ||
|
||
set ( declspec_thread_src | ||
" #include <stdio.h> | ||
__declspec ( thread ) int x = 1 ; | ||
int main (void) | ||
{ | ||
x = 0 ; | ||
return (x) ; | ||
} | ||
" ) | ||
|
||
set ( thread_local_src | ||
" #include <stdio.h> | ||
#include <threads.h> | ||
_Thread_local int x = 1 ; | ||
int main (void) | ||
{ | ||
x = 0 ; | ||
return (x) ; | ||
} | ||
" ) | ||
|
||
check_c_source_runs ( "${declspec_thread_src}" HAVE_KEYWORD__DECLSPEC_THREAD ) | ||
|
||
check_c_source_runs ( "${thread_src}" HAVE_KEYWORD__THREAD ) | ||
|
||
check_c_source_runs ( "${thread_local_src}" HAVE_KEYWORD__THREAD_LOCAL ) | ||
|
||
if ( HAVE_KEYWORD__DECLSPEC_THREAD ) | ||
add_compile_definitions ( HAVE_KEYWORD__DECLSPEC_THREAD ) | ||
message ( STATUS "__declspec(thread) keyword: available" ) | ||
else ( ) | ||
message ( STATUS "__declspec(thread) keyword: not available" ) | ||
endif ( ) | ||
|
||
if ( HAVE_KEYWORD__THREAD ) | ||
add_compile_definitions ( HAVE_KEYWORD__THREAD ) | ||
message ( STATUS "__thread keyword: available" ) | ||
else ( ) | ||
message ( STATUS "__thread keyword: not available" ) | ||
endif ( ) | ||
|
||
if ( HAVE_KEYWORD__THREAD_LOCAL ) | ||
add_compile_definitions ( HAVE_KEYWORD__THREAD_LOCAL ) | ||
message ( STATUS "_Thread_local keyword: available" ) | ||
else ( ) | ||
message ( STATUS "_Thread_local_thread keyword: not available" ) | ||
endif ( ) | ||
|
Binary file not shown.
Binary file not shown.
f3ac3ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #375