Skip to content

Commit

Permalink
clang++ prefers Lighter over Lightest
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Feb 18, 2024
1 parent 1483c10 commit a980a5b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
2024-02-18 Dirk Eddelbuettel <[email protected]>

* src/fastLm.cpp: Switch to RcppArmadillo/Lightest
* src/fastLm.cpp: Switch to RcppArmadillo/Lighter
* src/RcppArmadillo.cpp: Idem

* README.md: Update count to February 2024, update example, edits
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ a good balance between speed and ease of use. It provides high-level syntax and
Glad you asked. Here is a light-weight and fast implementation of linear regression:

```c++
#include <RcppArmadillo/Lightest>
#include <RcppArmadillo/Lighter>
// [[Rcpp::depends(RcppArmadillo)]]

// [[Rcpp::export]]
Expand All @@ -58,10 +58,10 @@ the file above to compile the function. A version is also included in the
package [as the `fastLm()`](https://github.com/RcppCore/RcppArmadillo/blob/master/R/fastLm.R)
function.
The `RcppArmadillo/Lightest` header includes [Rcpp][rcpp] via its `Rcpp/Lightest` header which
The `RcppArmadillo/Lighter` header includes [Rcpp][rcpp] via its `Rcpp/Lighter` header which
precludes some more compile-time heavy features such as 'Rcpp Modules' which we may not need. See
the [Rcpp][rcpp] docs more details about 'Light', 'Lighter' and 'Lightest'. In the example above,
the switch saves about 15% to 20% of total compilation time.
the switch saves about 15% of total compilation time.
### Status
Expand Down
2 changes: 1 addition & 1 deletion src/RcppArmadillo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// You should have received a copy of the GNU General Public License
// along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.

#include <RcppArmadillo/Lightest>
#include <RcppArmadillo/Lighter>

//' Report the version of Armadillo
//'
Expand Down
2 changes: 1 addition & 1 deletion src/fastLm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// You should have received a copy of the GNU General Public License
// along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.

#include <RcppArmadillo/Lightest>
#include <RcppArmadillo/Lighter>

// [[Rcpp::export]]
Rcpp::List fastLm_impl(const arma::mat& X, const arma::colvec& y) {
Expand Down

0 comments on commit a980a5b

Please sign in to comment.