summary refs log tree commit diff
path: root/gnu/packages/patches/r-sgloptim.patch
blob: efba2c7013987ac0e5823837e9c605db607afcb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From cb9a15eb9d558b2b4b67f9e6806b394f65bff01f Mon Sep 17 00:00:00 2001
From: Dirk Eddelbuettel <edd@debian.org>
Date: Wed, 30 Nov 2022 20:15:42 -0600
Subject: [PATCH] Simplify includes and only include RcppArmadillo.h

---
 inst/include/sgl.h | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/inst/include/sgl.h b/inst/include/sgl.h
index a36011e..869a295 100644
--- a/inst/include/sgl.h
+++ b/inst/include/sgl.h
@@ -21,13 +21,12 @@
 
 #define R_NO_REMAP
 
+//R, Rcpp, RcppArmadillo
+#include <RcppArmadillo.h>
+
 //Progress monitor
 #include <progress.hpp>
 
-//Rcpp ect
-#include <RcppCommon.h>
-#include <Rconfig.h>
-#include <RcppArmadilloConfig.h>
 
 // Debugging
 #ifdef SGL_DEBUG
@@ -45,8 +44,10 @@
 #else
 // Do no debugging
 #define ARMA_NO_DEBUG
+#ifndef NDEBUG
 #define NDEBUG
 #endif
+#endif
 
 // Registration helper macros
 #define STR_VALUE(x) #x
@@ -59,11 +60,6 @@
 
 #define CALL_METHOD(METHOD, MODULE, ARGS) {GET_STR_VALUE(FUN_NAME(METHOD,MODULE)), (DL_FUNC) &r_ ## MODULE ## _ ## METHOD, ARGS}
 
-//Support for xl matrices
-//#define ARMA_64BIT_WORD
-
-#include <armadillo>
-#include <Rcpp.h>
 
 //Boost
 #include <boost/math/special_functions/fpclassify.hpp>