|
3 | 3 | \alias{RcppArmadillo} |
4 | 4 | \alias{RcppArmadilloExample} |
5 | 5 | \docType{package} |
6 | | -\title{ |
7 | | - R and Armadillo Integration |
8 | | -} |
9 | | -\description{ |
10 | | - The package brings the power of Armadillo to R. |
11 | | -} |
| 6 | +\title{R and Armadillo Integration} |
| 7 | +\description{The package brings the power of Armadillo to R.} |
12 | 8 | \section{Armadillo}{ |
13 | 9 | \code{Armadillo} is a C++ linear algebra library, aiming towards a good |
14 | 10 | balance between speed and ease of use. |
|
28 | 24 | Armadillo has been primarily developed at NICTA (Australia) by Conrad |
29 | 25 | Sanderson, with contributions from around the world. |
30 | 26 | } |
31 | | - |
32 | 27 | \section{RcppArmadillo}{ |
33 | 28 | \code{RcppArmadillo} acts as a bridge between \code{Rcpp} and \code{Armadillo}, |
34 | 29 | allowing the programmer to write code using Armadillo classes that integrate |
35 | 30 | seemlessly with \code{R} via \code{Rcpp}. |
36 | 31 | } |
37 | | - |
38 | 32 | \section{Using RcppArmadillo}{ |
39 | 33 | The simplest way to get started is to create a skeleton of a package |
40 | 34 | using \code{RcppArmadillo}. This can be done conveniently by the |
41 | 35 | \code{\link{RcppArmadillo.package.skeleton}} |
42 | 36 | function. |
43 | | - |
44 | | - The important steps are |
45 | | - \itemize{ |
46 | | - \item Include the \code{RcppArmadillo.h} header file, which also includes |
47 | | - \code{armadillo.h}. |
48 | | - \item Import Rcpp, and LinkingTo Rcpp and RcppArmadillo by adding these lines to |
49 | | - the DESCRIPTION file: |
50 | | - |
51 | | - \preformatted{ |
52 | | - Imports: Rcpp (>= 0.11.0) |
53 | | - LinkingTo: Rcpp, RcppArmadillo |
54 | | - } |
55 | | - |
56 | | - \item Link against the BLAS and LAPACK libraries, by adding this line |
57 | | - in the \code{Makevars} and \code{Makevars.win} files: |
58 | | - \preformatted{PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) } |
59 | | - } |
60 | 37 | } |
61 | | - |
62 | | -\section{Support}{ |
63 | | - Please use the Rcpp-devel mailing list on r-forge |
64 | | - for questions about RcppArmadillo (subscribe first). |
65 | | - \url{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel} |
66 | | - |
| 38 | +\section{Threading}{ |
| 39 | + The Armadillo library can take advantage of OpenMP to execute computations in |
| 40 | + parallel via multi-threaded code. The number of cores uses can be set (or |
| 41 | + retrieved) explicitly via helper functions \code{armadillo_get_number_of_omp+threads()} and |
| 42 | + \code{armadillo_set_number_of_omp_threads()}. A default value is stored at package startup; it |
| 43 | + recognises R option value \code{Ncpus} and environment variable |
| 44 | + \code{OMP_THREAD_LIMIT}. Additional helper functions |
| 45 | + \code{armadillo_throttle_cores()} and \code{armadillo_reset_cores()} are |
| 46 | + available to (temporarily) lower the number of cores uses and to reset to |
| 47 | + the package default value set at startup. |
67 | 48 | } |
68 | | - |
69 | | - |
70 | 49 | \author{ |
71 | 50 | For RcppArmadillo: Dirk Eddelbuettel, Romain Francois, Doug Bates and |
72 | 51 | Binxiang Ni |
|
87 | 66 | "RcppArmadillo: Accelerating R with high-performance C++ linear algebra", |
88 | 67 | Computational Statistics and Data Analysis, 2014, 71, March, pages |
89 | 68 | 1054-1063, \doi{10.1016/j.csda.2013.02.005}. |
90 | | -) |
91 | | - |
92 | 69 | } |
93 | | -\keyword{ package } |
94 | | -\keyword{ programming } |
95 | | -\keyword{ interface } |
| 70 | +\keyword{package} |
| 71 | +\keyword{programming} |
| 72 | +\keyword{interface} |
0 commit comments