patch by J santos to make ORP work again.
This commit is contained in:
parent
7463a9d31d
commit
32a4ea3a94
60
pl/yapor.yap
60
pl/yapor.yap
@ -1,34 +1,50 @@
|
|||||||
/**
|
:- system_module( '$_utils', [callable/1,
|
||||||
@file yapor.yap
|
current_op/3,
|
||||||
|
nb_current/2,
|
||||||
|
nth_instance/3,
|
||||||
|
nth_instance/4,
|
||||||
|
op/3,
|
||||||
|
prolog/0,
|
||||||
|
recordaifnot/3,
|
||||||
|
recordzifnot/3,
|
||||||
|
simple/1,
|
||||||
|
subsumes_term/2], ['$getval_exception'/3]).
|
||||||
|
|
||||||
@defgroup yapor Or-parallelism in YAP
|
:- use_system_module( '$_boot', ['$live'/0]).
|
||||||
|
|
||||||
Support for or-parallelism through parallel_findall/3 and
|
:- use_system_module( '$_errors', ['$do_error'/2]).
|
||||||
friends.
|
|
||||||
|
|
||||||
@{
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%% %%
|
||||||
*/
|
%% The YapTab/YapOr/OPTYap systems %%
|
||||||
|
%% %%
|
||||||
|
%% YapTab extends the Yap Prolog engine to support sequential tabling %%
|
||||||
|
%% YapOr extends the Yap Prolog engine to support or-parallelism %%
|
||||||
|
%% OPTYap extends the Yap Prolog engine to support or-parallel tabling %%
|
||||||
|
%% %%
|
||||||
|
%% %%
|
||||||
|
%% Yap Prolog was developed at University of Porto, Portugal %%
|
||||||
|
%% %%
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
:- system_module( yapor, [], []).
|
:- meta_predicate
|
||||||
|
parallel(0),
|
||||||
|
parallel_findall(?,0,?),
|
||||||
|
parallel_findfirst(?,0,?),
|
||||||
|
parallel_once(0).
|
||||||
|
|
||||||
/** or_statistics(Key, List) is det
|
|
||||||
|
|
||||||
Report the main statistics on parallel execution, where _Key_ must take one of these values:
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
- total_memory: a list wwhere the first element is _BytesInUse_ and the
|
%% or_statistics/0 %%
|
||||||
second is _BytesAllocated_.
|
%% opt_statistics/0 %%
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
- or_frames
|
|
||||||
- query_goal_solution_frames
|
or_statistics :-
|
||||||
- query_goal_answer_frames
|
|
||||||
|
|
||||||
*/
|
|
||||||
or_statistics(_,_) :-
|
|
||||||
current_output(Stream),
|
current_output(Stream),
|
||||||
or_statistics(Stream).
|
or_statistics(Stream).
|
||||||
|
|
||||||
opt_statistics(_) :-
|
opt_statistics :-
|
||||||
current_output(Stream),
|
current_output(Stream),
|
||||||
opt_statistics(Stream).
|
opt_statistics(Stream).
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user