File tree 3 files changed +16
-13
lines changed
Filter options
3 files changed +16
-13
lines changed
Original file line number Diff line number Diff line change 1
1
Package: RcppParallel
2
2
Type: Package
3
3
Title: Parallel Programming Tools for 'Rcpp'
4
- Version: 5.0.1
4
+ Version: 5.0.1-9000
5
5
Authors@R: c(
6
6
person("JJ", "Allaire", role = c("aut"), email = "jj@rstudio.com"),
7
7
person("Romain", "Francois", role = c("aut", "cph")),
Original file line number Diff line number Diff line change
1
+ RcppParallel 5.0.2 (UNRELEASED)
2
+ ------------------------------------------------------------------------
3
+ * Subsequent calls to setThreadOptions(...) are now ignored, to avoid
4
+ segfaults when compiling RcppParallel / TBB with gcc 10.1.
5
+
1
6
RcppParallel 5.0.1
2
7
------------------------------------------------------------------------
3
8
* Fixed compilation issue on OpenSUSE Tumbleweed with -flto=auto
Original file line number Diff line number Diff line change 13
13
extern " C" SEXP setThreadOptions (SEXP numThreadsSEXP, SEXP stackSizeSEXP) {
14
14
15
15
static tbb::task_scheduler_init* s_pTaskScheduler = NULL ;
16
+ if (s_pTaskScheduler != NULL )
17
+ return Rf_ScalarLogical (0 );
16
18
17
19
int numThreads = Rf_asInteger (numThreadsSEXP);
18
-
19
20
int stackSize = Rf_asInteger (stackSizeSEXP);
20
-
21
+
21
22
try
22
23
{
23
- if (!s_pTaskScheduler) {
24
- s_pTaskScheduler = new tbb::task_scheduler_init (numThreads, stackSize);
25
- } else {
26
- s_pTaskScheduler->terminate ();
27
- s_pTaskScheduler->initialize (numThreads, stackSize);
28
- }
24
+ s_pTaskScheduler = new tbb::task_scheduler_init (numThreads, stackSize);
29
25
}
30
26
catch (const std::exception & e)
31
27
{
32
- Rf_error ((" Error loading TBB: " + std::string (e.what ())).c_str ());
28
+ const char * fmt = " Error loading TBB: %s\n " ;
29
+ Rf_error (fmt, e.what ());
33
30
}
34
31
catch (...)
35
32
{
36
- Rf_error (" Error loading TBB: (Unknown error)" );
33
+ const char * fmt = " Error loading TBB: %s\n " ;
34
+ Rf_error (fmt, " (Unknown error)" );
37
35
}
38
-
39
- return R_NilValue ;
36
+
37
+ return Rf_ScalarLogical ( 1 ) ;
40
38
}
41
39
42
40
extern " C" SEXP defaultNumThreads () {
You can’t perform that action at this time.
0 commit comments