Skip to content

Commit 149cce3

Browse files
author
Sancar Adali
committed
creating a test function for comparison with C-compiled binary
1 parent 4c2d13a commit 149cce3

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

R/RcppExports.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
33

44
run_graph_match <- function(A, B, algorithm_params) {
5-
.Call(RGraphM_run_graph_match, A, B, algorithm_params)
5+
.Call(`_RGraphM_run_graph_match`, A, B, algorithm_params)
66
}
77

src/Makevars.win

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SOURCES= graphmatch_rcpp.cpp RcppExports.cpp
2929
OBJECTS= $(SOURCES:.cpp=.o) RGraphM_init.o $(GRAPHM_OBJ_REL)
3030

3131
.PHONY: all $(GRAPHM_OBJ_REL)
32-
all: $(GRAPHM_OBJ_REL) $(SHLIB)
32+
all: $(GRAPHM_OBJ_REL) $(SHLIB) graphm_bin
3333
$(SHLIB): $(OBJECTS)
3434
graphmatch_rcpp.cpp: $(GRAPHM_OBJ_REL)
3535
./RcppExports.o: $(GRAPHM_OBJ_REL)
@@ -72,6 +72,9 @@ graphm/./algorithm_umeyama.o: algorithm_umeyama.cpp algorithm_umeyama.h
7272
graphm/./algorithm_unif.o: algorithm_unif.cpp algorithm_unif.h
7373
cd graphm && $(CXX) $(PKG_CPPFLAGS) -I"$(LIB_GSL)\include" -c algorithm_unif.cpp -o ./algorithm_unif.o
7474

75+
graphm_bin: graphm/bin/graphm
76+
graphm/bin/graphm: $(GRAPHM_OBJ_REL)
77+
cd graphm && $(CXX) $(PKG_CPPFLAGS) -c main.cpp -o bin/graphm
7578

7679
clean: cleanb
7780

src/RGraphM_init.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66

77
/* .Call calls */
8-
extern SEXP RGraphM_run_graph_match(SEXP, SEXP, SEXP);
8+
extern SEXP _RGraphM_run_graph_match(SEXP, SEXP, SEXP);
99

1010
static const R_CallMethodDef CallEntries[] = {
11-
{"RGraphM_run_graph_match", (DL_FUNC) &RGraphM_run_graph_match, 3},
11+
{"_RGraphM_run_graph_match", (DL_FUNC) &_RGraphM_run_graph_match, 3},
1212
{NULL, NULL, 0}
1313
};
1414

src/RcppExports.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using namespace Rcpp;
88

99
// run_graph_match
1010
Rcpp::List run_graph_match(const RcppGSL::Matrix& A, const RcppGSL::Matrix& B, const Rcpp::List& algorithm_params);
11-
RcppExport SEXP RGraphM_run_graph_match(SEXP ASEXP, SEXP BSEXP, SEXP algorithm_paramsSEXP) {
11+
RcppExport SEXP _RGraphM_run_graph_match(SEXP ASEXP, SEXP BSEXP, SEXP algorithm_paramsSEXP) {
1212
BEGIN_RCPP
1313
Rcpp::RObject rcpp_result_gen;
1414
Rcpp::RNGScope rcpp_rngScope_gen;

src/graphmatch_rcpp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// # Copyright (C) Sancar Adali 2015-2017
1+
// # Copyright (C) Sancar Adali 2015-
22

33
#include <Rcpp.h>
44
#include <RcppGSL.h>

0 commit comments

Comments
 (0)