Skip to content

Commit 7ef8e86

Browse files
committed
Regenerated RcppExports.{cpp,R} with small update to call
1 parent ab4dcd2 commit 7ef8e86

File tree

6 files changed

+84
-62
lines changed

6 files changed

+84
-62
lines changed

ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2023-07-20 Dirk Eddelbuettel <[email protected]>
2+
3+
* src/RcppEigen.cpp (EigenNbThreads): Add simple threads reporter
4+
5+
* R/fastLm.R (fastLmPure): Simpler call to `fastLm_Impl()`
6+
7+
* src/init.c: Replaced by auto-generated section in RcppExports.cpp
8+
* src/RcppExports.cpp: Regenerated
9+
* R/RcppExports.R: Idem
10+
111
2023-04-18 Dirk Eddelbuettel <[email protected]>
212

313
* README.md: Use app.codecov.io as base for codecov link

R/RcppExports.R

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# This file was generated by Rcpp::compileAttributes
1+
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
22
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
33

4-
fastLm_Impl <- function(X, y, type) {
5-
.Call('RcppEigen_fastLm_Impl', PACKAGE = 'RcppEigen', X, y, type)
6-
}
7-
84
eigen_version <- function(single) {
9-
.Call('RcppEigen_eigen_version', PACKAGE = 'RcppEigen', single)
5+
.Call(`_RcppEigen_eigen_version`, single)
106
}
117

128
Eigen_SSE <- function() {
13-
.Call('RcppEigen_Eigen_SSE', PACKAGE = 'RcppEigen')
9+
.Call(`_RcppEigen_Eigen_SSE`)
10+
}
11+
12+
EigenNbThreads <- function() {
13+
.Call(`_RcppEigen_EigenNbThreads`)
14+
}
15+
16+
fastLm_Impl <- function(X, y, type) {
17+
.Call(`_RcppEigen_fastLm_Impl`, X, y, type)
1418
}
1519

R/fastLm.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## fastLm.R: Rcpp/Eigen implementation of lm()
22
##
3-
## Copyright (C) 2011 - 2017 Douglas Bates, Dirk Eddelbuettel and Romain Francois
3+
## Copyright (C) 2011 - 2023 Douglas Bates, Dirk Eddelbuettel and Romain Francois
44
##
55
## This file is part of RcppEigen.
66
##
@@ -21,7 +21,7 @@ fastLmPure <- function(X, y, method = 0L) {
2121

2222
stopifnot(is.matrix(X), is.numeric(y), NROW(y)==nrow(X))
2323

24-
.Call("RcppEigen_fastLm_Impl", X, y, method, PACKAGE="RcppEigen")
24+
fastLm_Impl(X, y, method)
2525
}
2626

2727
fastLm <- function(X, ...) UseMethod("fastLm")

src/RcppEigen.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// RcppEigen.cpp: Rcpp/Eigen glue
44
//
5-
// Copyright (C) 2011 - 2015 Douglas Bates, Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2011 - 2023 Douglas Bates, Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of RcppEigen.
88
//
@@ -25,13 +25,13 @@
2525
Rcpp::IntegerVector eigen_version(bool single) {
2626
using Rcpp::_;
2727
using Rcpp::IntegerVector;
28-
28+
2929
if (single) {
3030
return Rcpp::wrap( 10000 * EIGEN_WORLD_VERSION +
31-
100 * EIGEN_MAJOR_VERSION +
31+
100 * EIGEN_MAJOR_VERSION +
3232
EIGEN_MINOR_VERSION ) ;
3333
}
34-
34+
3535
return IntegerVector::create(_["major"] = EIGEN_WORLD_VERSION,
3636
_["minor"] = EIGEN_MAJOR_VERSION,
3737
_["patch"] = EIGEN_MINOR_VERSION);
@@ -41,3 +41,8 @@ Rcpp::IntegerVector eigen_version(bool single) {
4141
bool Eigen_SSE() {
4242
return Rcpp::wrap(Eigen::SimdInstructionSetsInUse());
4343
}
44+
45+
// [[Rcpp::export]]
46+
int EigenNbThreads() {
47+
return Eigen::nbThreads();
48+
}

src/RcppExports.cpp

Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,70 @@
1-
// This file was generated by Rcpp::compileAttributes
1+
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
22
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
33

44
#include "../inst/include/RcppEigen.h"
55
#include <Rcpp.h>
66

77
using namespace Rcpp;
88

9-
// fastLm_Impl
10-
Rcpp::List fastLm_Impl(Rcpp::NumericMatrix X, Rcpp::NumericVector y, int type);
11-
RcppExport SEXP RcppEigen_fastLm_Impl(SEXP XSEXP, SEXP ySEXP, SEXP typeSEXP) {
12-
BEGIN_RCPP
13-
Rcpp::RObject __result;
14-
Rcpp::RNGScope __rngScope;
15-
Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type X(XSEXP);
16-
Rcpp::traits::input_parameter< Rcpp::NumericVector >::type y(ySEXP);
17-
Rcpp::traits::input_parameter< int >::type type(typeSEXP);
18-
__result = Rcpp::wrap(fastLm_Impl(X, y, type));
19-
return __result;
20-
END_RCPP
21-
}
9+
#ifdef RCPP_USE_GLOBAL_ROSTREAM
10+
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
11+
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
12+
#endif
13+
2214
// eigen_version
2315
Rcpp::IntegerVector eigen_version(bool single);
24-
RcppExport SEXP RcppEigen_eigen_version(SEXP singleSEXP) {
16+
RcppExport SEXP _RcppEigen_eigen_version(SEXP singleSEXP) {
2517
BEGIN_RCPP
26-
Rcpp::RObject __result;
27-
Rcpp::RNGScope __rngScope;
18+
Rcpp::RObject rcpp_result_gen;
19+
Rcpp::RNGScope rcpp_rngScope_gen;
2820
Rcpp::traits::input_parameter< bool >::type single(singleSEXP);
29-
__result = Rcpp::wrap(eigen_version(single));
30-
return __result;
21+
rcpp_result_gen = Rcpp::wrap(eigen_version(single));
22+
return rcpp_result_gen;
3123
END_RCPP
3224
}
3325
// Eigen_SSE
3426
bool Eigen_SSE();
35-
RcppExport SEXP RcppEigen_Eigen_SSE() {
27+
RcppExport SEXP _RcppEigen_Eigen_SSE() {
28+
BEGIN_RCPP
29+
Rcpp::RObject rcpp_result_gen;
30+
Rcpp::RNGScope rcpp_rngScope_gen;
31+
rcpp_result_gen = Rcpp::wrap(Eigen_SSE());
32+
return rcpp_result_gen;
33+
END_RCPP
34+
}
35+
// EigenNbThreads
36+
int EigenNbThreads();
37+
RcppExport SEXP _RcppEigen_EigenNbThreads() {
3638
BEGIN_RCPP
37-
Rcpp::RObject __result;
38-
Rcpp::RNGScope __rngScope;
39-
__result = Rcpp::wrap(Eigen_SSE());
40-
return __result;
39+
Rcpp::RObject rcpp_result_gen;
40+
Rcpp::RNGScope rcpp_rngScope_gen;
41+
rcpp_result_gen = Rcpp::wrap(EigenNbThreads());
42+
return rcpp_result_gen;
4143
END_RCPP
4244
}
45+
// fastLm_Impl
46+
Rcpp::List fastLm_Impl(Rcpp::NumericMatrix X, Rcpp::NumericVector y, int type);
47+
RcppExport SEXP _RcppEigen_fastLm_Impl(SEXP XSEXP, SEXP ySEXP, SEXP typeSEXP) {
48+
BEGIN_RCPP
49+
Rcpp::RObject rcpp_result_gen;
50+
Rcpp::RNGScope rcpp_rngScope_gen;
51+
Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type X(XSEXP);
52+
Rcpp::traits::input_parameter< Rcpp::NumericVector >::type y(ySEXP);
53+
Rcpp::traits::input_parameter< int >::type type(typeSEXP);
54+
rcpp_result_gen = Rcpp::wrap(fastLm_Impl(X, y, type));
55+
return rcpp_result_gen;
56+
END_RCPP
57+
}
58+
59+
static const R_CallMethodDef CallEntries[] = {
60+
{"_RcppEigen_eigen_version", (DL_FUNC) &_RcppEigen_eigen_version, 1},
61+
{"_RcppEigen_Eigen_SSE", (DL_FUNC) &_RcppEigen_Eigen_SSE, 0},
62+
{"_RcppEigen_EigenNbThreads", (DL_FUNC) &_RcppEigen_EigenNbThreads, 0},
63+
{"_RcppEigen_fastLm_Impl", (DL_FUNC) &_RcppEigen_fastLm_Impl, 3},
64+
{NULL, NULL, 0}
65+
};
66+
67+
RcppExport void R_init_RcppEigen(DllInfo *dll) {
68+
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
69+
R_useDynamicSymbols(dll, FALSE);
70+
}

src/init.c

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)