From 278c06bd4a69ac72f46e819264273f4fbf3539d0 Mon Sep 17 00:00:00 2001 From: Jan Wijffels Date: Mon, 19 Feb 2024 10:16:33 +0100 Subject: [PATCH] remove compliance.cpp and compliance.h --- src/Makevars | 3 +-- src/compliance.cpp | 22 ---------------------- src/compliance.h | 25 ------------------------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 src/compliance.cpp delete mode 100644 src/compliance.h diff --git a/src/Makevars b/src/Makevars index 4563a59..26b64b8 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,11 +1,10 @@ CXX_STD = CXX11 PKG_LIBS = -pthread -PKG_CPPFLAGS = -pthread -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -include compliance.h -I./Starspace/src +PKG_CPPFLAGS = -pthread -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -I./Starspace/src SOURCES = Starspace/src/utils/args.cpp Starspace/src/utils/normalize.cpp Starspace/src/utils/utils.cpp \ Starspace/src/data.cpp Starspace/src/dict.cpp Starspace/src/doc_data.cpp Starspace/src/doc_parser.cpp Starspace/src/model.cpp Starspace/src/parser.cpp Starspace/src/proj.cpp Starspace/src/starspace.cpp \ rcpp_textspace.cpp \ - compliance.cpp \ RcppExports.cpp OBJECTS = $(SOURCES:.cpp=.o) diff --git a/src/compliance.cpp b/src/compliance.cpp deleted file mode 100644 index e95ade0..0000000 --- a/src/compliance.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -#include -#include - -// [[Rcpp::export]] -int rand() { - int r = R::unif_rand() * RAND_MAX; - return r; -} - -// [[Rcpp::export]] -void srand(unsigned int seed){ - Rcpp::Environment base("package:base"); - Rcpp::Function set_seed = base["set.seed"]; - set_seed(seed); -}; - -namespace std { - std::ostream Rcout(Rcpp::Rcout.rdbuf()); - std::ostream Rcerr(Rcpp::Rcerr.rdbuf()); -} -*/ diff --git a/src/compliance.h b/src/compliance.h deleted file mode 100644 index 6590069..0000000 --- a/src/compliance.h +++ /dev/null @@ -1,25 +0,0 @@ - -#pragma once - -#ifdef _WIN32 -#include -#endif - -#include -#include - -#define exit(EXIT_FAILURE) Rcpp::stop("Incorrect Starspace usage") -/* -#define abort() Rcpp::stop("Incorrect Starspace usage") - -#define cerr Rcerr -#define cout Rcout - -int rand(); -void srand(unsigned int seed); - -namespace std { - extern std::ostream Rcout; - extern std::ostream Rcerr; -} -*/ \ No newline at end of file