Skip to content

Commit 7690009

Browse files
authored
Merge pull request #395 from RcppCore/feature/reorg_internal_headers
Reorganise internal headers
2 parents 27cbb93 + 9b32efe commit 7690009

18 files changed

+203
-13
lines changed

ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2022-10-14 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/include/RcppArmadillo/RcppArmadillo: Header accessing
4+
Rcpp/Rcpp, and not imposing column-as-matrix return
5+
* inst/include/RcppArmadillo/Light: Header accessing Rcpp/Light, idem
6+
* inst/include/RcppArmadillo/Lighter: Header accessing Rcpp/Lighter, idem
7+
* inst/include/RcppArmadillo/Lightest: Header accessing Rcpp/Lightest, idem
8+
9+
* inst/include/RcppArmadillo/internal/: Regroup internal headers here
10+
* inst/include/RcppArmadillo_bits/: Move to new internal location
11+
* configure.ac: Support new location of generated config
12+
* configure: Idem
13+
* cleanup: Idem
14+
115
2022-10-10 Dirk Eddelbuettel <[email protected]>
216

317
* DESCRIPTION (Version): RcppArmadillo 0.11.4.1.0

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: RcppArmadillo
22
Type: Package
33
Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
4-
Version: 0.11.4.1.0
5-
Date: 2022-10-10
4+
Version: 0.11.4.1.0.3
5+
Date: 2022-10-14
66
Author: Dirk Eddelbuettel, Romain Francois, Doug Bates, Binxiang Ni, and Conrad Sanderson
77
Maintainer: Dirk Eddelbuettel <[email protected]>
88
Description: 'Armadillo' is a templated C++ linear algebra library (by Conrad

cleanup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rm -f config.log config.status confdefs.h \
1717
vignettes/*~ \
1818
*/*~ *~ \
1919
inst/include/RcppArmadilloLapack.h \
20-
inst/include/RcppArmadilloConfigGenerated.h \
20+
inst/include/RcppArmadillo/internal/RcppArmadilloConfigGenerated.h \
2121
src/Makevars \
2222
vignettes/jss.bst vignettes/pinp.cls
2323

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3407,7 +3407,7 @@ ARMA_HAVE_OPENMP="${arma_have_openmp}"
34073407
34083408
OPENMP_FLAG="${openmp_flag}"
34093409
3410-
ac_config_files="$ac_config_files inst/include/RcppArmadilloConfigGenerated.h src/Makevars"
3410+
ac_config_files="$ac_config_files inst/include/RcppArmadillo/internal/RcppArmadilloConfigGenerated.h src/Makevars"
34113411
34123412
cat >confcache <<\_ACEOF
34133413
# This file is a shell script that caches the results of configure
@@ -4109,7 +4109,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41094109
for ac_config_target in $ac_config_targets
41104110
do
41114111
case $ac_config_target in
4112-
"inst/include/RcppArmadilloConfigGenerated.h") CONFIG_FILES="$CONFIG_FILES inst/include/RcppArmadilloConfigGenerated.h" ;;
4112+
"inst/include/RcppArmadillo/internal/RcppArmadilloConfigGenerated.h") CONFIG_FILES="$CONFIG_FILES inst/include/RcppArmadillo/internal/RcppArmadilloConfigGenerated.h" ;;
41134113
"src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;;
41144114
41154115
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,5 +207,5 @@ fi
207207
AC_SUBST([ARMA_LAPACK],["${arma_lapack}"])
208208
AC_SUBST([ARMA_HAVE_OPENMP], ["${arma_have_openmp}"])
209209
AC_SUBST([OPENMP_FLAG], ["${openmp_flag}"])
210-
AC_CONFIG_FILES([inst/include/RcppArmadilloConfigGenerated.h src/Makevars])
210+
AC_CONFIG_FILES([inst/include/RcppArmadillo/internal/RcppArmadilloConfigGenerated.h src/Makevars])
211211
AC_OUTPUT

inst/include/RcppArmadillo/Light

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Emacs, please make this -*- mode: C++; -*-
2+
3+
// RcppArmadillo: Rcpp/Armadillo glue
4+
//
5+
// Copyright (C) 2010 - 2022 Dirk Eddelbuettel, Romain Francois and Douglas Bates
6+
//
7+
// This file is part of RcppArmadillo.
8+
//
9+
// RcppArmadillo is free software: you can redistribute it and/or modify it
10+
// under the terms of the GNU General Public License as published by
11+
// the Free Software Foundation, either version 2 of the License, or
12+
// (at your option) any later version.
13+
//
14+
// RcppArmadillo is distributed in the hope that it will be useful, but
15+
// WITHOUT ANY WARRANTY; without even the implied warranty of
16+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
// GNU General Public License for more details.
18+
//
19+
// You should have received a copy of the GNU General Public License
20+
// along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.
21+
22+
#ifndef RcppArmadillo__RcppArmadillo
23+
#define RcppArmadillo__RcppArmadillo
24+
25+
#if defined(Rcpp_hpp) && !defined(COMPILING_RCPPARMADILLO)
26+
#error "The file 'Rcpp.h' should not be included. Please correct to include only 'RcppArmadillo.h'."
27+
#endif
28+
29+
// We are undoing a design decision from early on by allowing vectors be returned
30+
// as standard 'one-dimension' objects -- as opposed to the matrix form we imposed
31+
#define RCPP_ARMADILLO_RETURN_ANYVEC_AS_VECTOR
32+
33+
// Set up actual #include <armadillo> after first #include <RcppArmadilloConfig> and more config
34+
#include <RcppArmadilloForward.h>
35+
36+
// Automatically include Rcpp as well -- but only the 'light' mode sans modules
37+
#include <Rcpp/Light>
38+
39+
// Remaining RcppArmadillo code
40+
#include <RcppArmadilloWrap.h>
41+
#include <RcppArmadilloAs.h>
42+
#include <RcppArmadilloSugar.h>
43+
44+
#endif

inst/include/RcppArmadillo/Lighter

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Emacs, please make this -*- mode: C++; -*-
2+
3+
// RcppArmadillo: Rcpp/Armadillo glue
4+
//
5+
// Copyright (C) 2010 - 2022 Dirk Eddelbuettel, Romain Francois and Douglas Bates
6+
//
7+
// This file is part of RcppArmadillo.
8+
//
9+
// RcppArmadillo is free software: you can redistribute it and/or modify it
10+
// under the terms of the GNU General Public License as published by
11+
// the Free Software Foundation, either version 2 of the License, or
12+
// (at your option) any later version.
13+
//
14+
// RcppArmadillo is distributed in the hope that it will be useful, but
15+
// WITHOUT ANY WARRANTY; without even the implied warranty of
16+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
// GNU General Public License for more details.
18+
//
19+
// You should have received a copy of the GNU General Public License
20+
// along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.
21+
22+
#ifndef RcppArmadillo__RcppArmadillo
23+
#define RcppArmadillo__RcppArmadillo
24+
25+
#if defined(Rcpp_hpp) && !defined(COMPILING_RCPPARMADILLO)
26+
#error "The file 'Rcpp.h' should not be included. Please correct to include only 'RcppArmadillo.h'."
27+
#endif
28+
29+
// We are undoing a design decision from early on by allowing vectors be returned
30+
// as standard 'one-dimension' objects -- as opposed to the matrix form we imposed
31+
#define RCPP_ARMADILLO_RETURN_ANYVEC_AS_VECTOR
32+
33+
// Set up actual #include <armadillo> after first #include <RcppArmadilloConfig> and more config
34+
#include <RcppArmadilloForward.h>
35+
36+
// Automatically include Rcpp as well -- but only the 'lighter' mode sans modules and rtti
37+
#include <Rcpp/Lighter>
38+
39+
// Remaining RcppArmadillo code
40+
#include <RcppArmadilloWrap.h>
41+
#include <RcppArmadilloAs.h>
42+
#include <RcppArmadilloSugar.h>
43+
44+
#endif

inst/include/RcppArmadillo/Lightest

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Emacs, please make this -*- mode: C++; -*-
2+
3+
// RcppArmadillo: Rcpp/Armadillo glue
4+
//
5+
// Copyright (C) 2010 - 2022 Dirk Eddelbuettel, Romain Francois and Douglas Bates
6+
//
7+
// This file is part of RcppArmadillo.
8+
//
9+
// RcppArmadillo is free software: you can redistribute it and/or modify it
10+
// under the terms of the GNU General Public License as published by
11+
// the Free Software Foundation, either version 2 of the License, or
12+
// (at your option) any later version.
13+
//
14+
// RcppArmadillo is distributed in the hope that it will be useful, but
15+
// WITHOUT ANY WARRANTY; without even the implied warranty of
16+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
// GNU General Public License for more details.
18+
//
19+
// You should have received a copy of the GNU General Public License
20+
// along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.
21+
22+
#ifndef RcppArmadillo__RcppArmadillo
23+
#define RcppArmadillo__RcppArmadillo
24+
25+
#if defined(Rcpp_hpp) && !defined(COMPILING_RCPPARMADILLO)
26+
#error "The file 'Rcpp.h' should not be included. Please correct to include only 'RcppArmadillo.h'."
27+
#endif
28+
29+
// We are undoing a design decision from early on by allowing vectors be returned
30+
// as standard 'one-dimension' objects -- as opposed to the matrix form we imposed
31+
#define RCPP_ARMADILLO_RETURN_ANYVEC_AS_VECTOR
32+
33+
// Set up actual #include <armadillo> after first #include <RcppArmadilloConfig> and more config
34+
#include <RcppArmadilloForward.h>
35+
36+
// Automatically include Rcpp as well -- but only the 'lightest' mode sans modules, rtti, sugar
37+
#include <Rcpp/Lightest>
38+
39+
// Remaining RcppArmadillo code
40+
#include <RcppArmadilloWrap.h>
41+
#include <RcppArmadilloAs.h>
42+
#include <RcppArmadilloSugar.h>
43+
44+
#endif
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Emacs, please make this -*- mode: C++; -*-
2+
3+
// RcppArmadillo: Rcpp/Armadillo glue
4+
//
5+
// Copyright (C) 2010 - 2022 Dirk Eddelbuettel, Romain Francois and Douglas Bates
6+
//
7+
// This file is part of RcppArmadillo.
8+
//
9+
// RcppArmadillo is free software: you can redistribute it and/or modify it
10+
// under the terms of the GNU General Public License as published by
11+
// the Free Software Foundation, either version 2 of the License, or
12+
// (at your option) any later version.
13+
//
14+
// RcppArmadillo is distributed in the hope that it will be useful, but
15+
// WITHOUT ANY WARRANTY; without even the implied warranty of
16+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
// GNU General Public License for more details.
18+
//
19+
// You should have received a copy of the GNU General Public License
20+
// along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.
21+
22+
#ifndef RcppArmadillo__RcppArmadillo
23+
#define RcppArmadillo__RcppArmadillo
24+
25+
#if defined(Rcpp_hpp) && !defined(COMPILING_RCPPARMADILLO)
26+
#error "The file 'Rcpp.h' should not be included. Please correct to include only 'RcppArmadillo.h'."
27+
#endif
28+
29+
// We are undoing a design decision from early on by allowing vectors be returned
30+
// as standard 'one-dimension' objects -- as opposed to the matrix form we imposed
31+
#define RCPP_ARMADILLO_RETURN_ANYVEC_AS_VECTOR
32+
33+
// Set up actual #include <armadillo> after first #include <RcppArmadilloConfig> and more config
34+
#include <RcppArmadilloForward.h>
35+
36+
// Automatically include Rcpp as well -- full version
37+
#include <Rcpp/Rcpp>
38+
39+
// Remaining RcppArmadillo code
40+
#include <RcppArmadilloWrap.h>
41+
#include <RcppArmadilloAs.h>
42+
#include <RcppArmadilloSugar.h>
43+
44+
#endif

inst/include/RcppArmadilloConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
#else
107107
// on the other OSs we test via LAPACK_LIBS (in configure) which
108108
// updates this include file
109-
#include <RcppArmadilloConfigGenerated.h>
109+
#include <RcppArmadillo/internal/RcppArmadilloConfigGenerated.h>
110110
#endif
111111

112112
// Many client packages do not set the OpenMP compiler flag in their src/Makevars

inst/include/RcppArmadilloForward.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
#include <Rconfig.h>
2727
#include <RcppArmadilloConfig.h>
2828

29-
#define ARMA_EXTRA_MAT_PROTO RcppArmadillo/Mat_proto.h
30-
#define ARMA_EXTRA_MAT_MEAT RcppArmadillo/Mat_meat.h
31-
#define ARMA_EXTRA_COL_PROTO RcppArmadillo/Col_proto.h
32-
#define ARMA_EXTRA_COL_MEAT RcppArmadillo/Col_meat.h
33-
#define ARMA_EXTRA_ROW_PROTO RcppArmadillo/Row_proto.h
34-
#define ARMA_EXTRA_ROW_MEAT RcppArmadillo/Row_meat.h
29+
#define ARMA_EXTRA_MAT_PROTO RcppArmadillo/internal/Mat_proto.h
30+
#define ARMA_EXTRA_MAT_MEAT RcppArmadillo/internal/Mat_meat.h
31+
#define ARMA_EXTRA_COL_PROTO RcppArmadillo/internal/Col_proto.h
32+
#define ARMA_EXTRA_COL_MEAT RcppArmadillo/internal/Col_meat.h
33+
#define ARMA_EXTRA_ROW_PROTO RcppArmadillo/internal/Row_proto.h
34+
#define ARMA_EXTRA_ROW_MEAT RcppArmadillo/internal/Row_meat.h
3535

3636
// Using this define makes the R RNG have precedent over both the
3737
// C++11-based RNG provided by Armadillo, as well as the C++98-based

0 commit comments

Comments
 (0)