4
views
0
recommends
+1 Recommend
0 collections
    0
    shares
      • Record: found
      • Abstract: found
      • Article: found
      Is Open Access

      R friendly multi-threading in C++

      Preprint

      Read this article at

      Bookmark
          There is no author summary for this article yet. Authors can add summaries to their articles on ScienceOpen to make them more accessible to a non-specialist audience.

          Abstract

          Calling multi-threaded C++ code from R has its perils. Since the R interpreter is single-threaded, one must not check for user interruptions or print to the R console from multiple threads. One can, however, synchronize with R from the main thread. The R package RcppThread (current version 0.5.0) contains a header only C++ library for thread safe communication with R that exploits this fact. It includes C++ classes for threads, a thread pool, and parallel loops that routinely synchronize with R. This article explains the package's functionality and gives examples of its usage. The the synchronization mechanism may also apply to other threading frameworks. Benchmarks suggest that, although synchronization causes overhead, the parallel abstractions of RcppThread are competitive with other popular libraries in typical scenarios encountered in statistical computing.

          Related collections

          Most cited references2

          • Record: found
          • Abstract: not found
          • Article: not found

          A Computer Method for Calculating Kendall's Tau with Ungrouped Data

            Bookmark
            • Record: found
            • Abstract: not found
            • Book: not found

            Seamless R and C++ Integration with Rcpp

              Bookmark

              Author and article information

              Journal
              01 November 2018
              Article
              1811.00450
              c1fd850d-0ff1-4818-ace5-d0013ec97a92

              http://arxiv.org/licenses/nonexclusive-distrib/1.0/

              History
              Custom metadata
              stat.CO

              Mathematical modeling & Computation
              Mathematical modeling & Computation

              Comments

              Comment on this article