parent
d5382c36e9
commit
5549706443
@ -1,5 +1,11 @@
|
|||||||
|
OPT_FLASG =
|
||||||
|
ifneq ($(DEBUG), 1)
|
||||||
|
OPT_FLAGS = -Ofast -march=native -flto -DNDEBUG
|
||||||
|
else
|
||||||
|
OPT_FLAGS = -g3 -D_DEBUG -fsanitize=leak -fsanitize=address
|
||||||
|
endif
|
||||||
example:
|
example:
|
||||||
$(CXX) -shared -fPIC example.cpp aquery_mem.cpp -fno-semantic-interposition -Ofast -march=native -flto --std=c++1z -o ../test.so
|
$(CXX) -shared -fPIC example.cpp aquery_mem.cpp -fno-semantic-interposition -Ofast -march=native -flto --std=c++1z -o ../test.so
|
||||||
irf:
|
irf:
|
||||||
$(CXX) -shared -fPIC RF.cpp irf.cpp incrementalDecisionTree.cpp aquery_mem.cpp Evaluation.cpp -fno-semantic-interposition -Ofast -march=native -flto --std=c++1z -o ../libirf.so
|
$(CXX) -shared -fPIC RF.cpp irf.cpp incrementalDecisionTree.cpp aquery_mem.cpp Evaluation.cpp -fno-semantic-interposition $(OPT_FLAGS) --std=c++1z -o ../libirf.so
|
||||||
all: example
|
all: example
|
||||||
|
@ -1,26 +1,22 @@
|
|||||||
LOAD MODULE FROM "./libirf.so"
|
LOAD MODULE FROM "./libirf.so"
|
||||||
FUNCTIONS (
|
FUNCTIONS (
|
||||||
newtree(height:int, f:int64, sparse:vecint64, forget:double, maxf:int64, noclasses:int64, e:int, r:int64, rb:int64) -> bool,
|
newtree(height:int, f:int64, sparse:vecint, forget:double, maxf:int64, noclasses:int64, e:int, r:int64, rb:int64) -> bool,
|
||||||
fit(X:vecvecdouble, y:vecint64) -> bool,
|
fit(X:vecvecdouble, y:vecint64) -> bool,
|
||||||
predict(X:vecvecdouble) -> vecint64
|
predict(X:vecvecdouble) -> vecint
|
||||||
);
|
);
|
||||||
|
|
||||||
create table source(x1 double, x2 double, x3 double, x4 double, x5 int64);
|
create table source(x1 double, x2 double, x3 double, x4 double, x5 int64);
|
||||||
load data infile "data/benchmark" into table source fields terminated by ",";
|
load data infile "data/benchmark" into table source fields terminated by ",";
|
||||||
|
|
||||||
create table sparse(x int64);
|
create table sparse(x int);
|
||||||
insert into sparse values (1);
|
insert into sparse values (1);
|
||||||
insert into sparse values (1);
|
insert into sparse values (1);
|
||||||
insert into sparse values (1);
|
insert into sparse values (1);
|
||||||
insert into sparse values (1);
|
insert into sparse values (1);
|
||||||
|
|
||||||
select * from source;
|
select newtree(6, 4, sparse.x, 0, 4, 2, 0, 400, 2147483647) from sparse
|
||||||
|
|
||||||
select newtree(6, 4, sparse.x, 0, 4, 2, 0, 400, 2147483647) from sparse;
|
select fit(pack(x1, x2, x3, x4), x5) from source
|
||||||
|
|
||||||
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
|
-- select pack(x1, x2, x3, x4) from source
|
||||||
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
|
select predict(pack(x1, x2, x3, x4)) from source
|
||||||
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
|
|
||||||
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
|
|
||||||
|
|
||||||
select predict(pack(x1, x2, x3, x4)) from source limit 100;
|
|
Loading…
Reference in new issue