Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29486/include
Modified Files:
algebra.h builtins.h logical.h mil.h mil_mnemonic.h physical.h
Log Message:
- Implement pf:product(), pf:log() and pf:sqrt() for the algebra version.
There is one remaining problem pf:product(()) returns 0 instead of 1.
U physical.h
Index: physical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- physical.h 6 Feb 2009 13:01:49 -0000 1.53
+++ physical.h 10 Mar 2009 12:20:43 -0000 1.54
@@ -99,7 +99,8 @@
, pa_cast = 65 /**< cast a table to a given type */
, pa_seqty1 = 66 /**< test for exactly one type occurrence in one
iteration (Pathfinder extension) */
- , pa_all = 67 /**< test if all items in an iteration are true
*/
+ , pa_all = 67 /**< test if all items in an iteration are true */
+ , pa_prod = 68 /**< product aggregate, should be after pa_sum */
, pa_llscjoin = 100 /**< Loop-Lifted StaircaseJoin */
, pa_llscjoin_dup = 101 /**< Loop-Lifted StaircaseJoin with duplicates */
, pa_doc_tbl = 120 /**< Access to persistent document relation */
U algebra.h
Index: algebra.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/algebra.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- algebra.h 9 Mar 2009 14:48:10 -0000 1.107
+++ algebra.h 10 Mar 2009 12:20:42 -0000 1.108
@@ -390,6 +390,8 @@
, alg_fun_fn_ceiling /**< fn:ceiling */
, alg_fun_fn_floor /**< fn:floor */
, alg_fun_fn_round /**< fn:round */
+ , alg_fun_pf_log /**< pf:log */
+ , alg_fun_pf_sqrt /**< pf:sqrt */
, alg_fun_fn_concat /**< fn:concat */
, alg_fun_fn_substring /**< fn:substring */
, alg_fun_fn_substring_dbl /**< fn:substring with length specified*/
U mil_mnemonic.h
Index: mil_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil_mnemonic.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- mil_mnemonic.h 6 Feb 2009 13:01:44 -0000 1.66
+++ mil_mnemonic.h 10 Mar 2009 12:20:43 -0000 1.67
@@ -256,6 +256,10 @@
#define gsum(a) PFmil_gsum(a)
#define egsum(a,b) PFmil_egsum((a),(b))
+/** prod() operator and grouped sum */
+#define prod(a) PFmil_sum(a)
+#define gprod(a) PFmil_gsum(a)
+
/** type cast */
#define cast(type,e) PFmil_cast ((type), (e))
U mil.h
Index: mil.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- mil.h 6 Feb 2009 13:01:40 -0000 1.82
+++ mil.h 10 Mar 2009 12:20:43 -0000 1.83
@@ -255,6 +255,8 @@
, m_mabs /**< multiplexed operator abs */
, m_mceiling /**< multiplexed operator ceil */
, m_mfloor /**< multiplexed operator floor */
+ , m_mlog /**< multiplexed operator log */
+ , m_msqrt /**< multiplexed operator sqrt */
, m_mround_up /**< multiplexed operator round_up */
, m_gt /**< greater than */
@@ -288,6 +290,8 @@
, m_sum /**< MIL sum() function */
, m_gsum /**< Grouped sum() function `{sum}()' */
, m_egsum /**< Grouped sum() function `{sum}()' */
+ , m_prod /**< MIL prod() function */
+ , m_gprod /**< Grouped prod() function `{prod}()' */
, m_declare /**< declare variable */
, m_nop /**< `no operation', do nothing.
@@ -761,6 +765,12 @@
(aka. ``pumped sum'') */
PFmil_t * PFmil_egsum (const PFmil_t *, const PFmil_t *);
+/** MIL prod() function */
+PFmil_t * PFmil_prod (const PFmil_t *);
+
+/** Grouped prod function `{sum}()' (aka. ``pumped prod'') */
+PFmil_t * PFmil_gprod (const PFmil_t *);
+
/** typecast */
PFmil_t * PFmil_cast (const PFmil_t *, const PFmil_t *);
@@ -822,6 +832,12 @@
/** MIL multiplexed operator floor */
PFmil_t * PFmil_mfloor (const PFmil_t *);
+/** MIL multiplexed operator log */
+PFmil_t * PFmil_mlog (const PFmil_t *);
+
+/** MIL multiplexed operator sqrt */
+PFmil_t * PFmil_msqrt (const PFmil_t *);
+
/** MIL multiplexed operator round_up */
PFmil_t * PFmil_mround_up (const PFmil_t *);
U builtins.h
Index: builtins.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/builtins.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- builtins.h 9 Feb 2009 08:30:26 -0000 1.60
+++ builtins.h 10 Mar 2009 12:20:42 -0000 1.61
@@ -353,7 +353,6 @@
bool ordering,
PFla_op_t **side_effects,
struct PFla_pair_t *args);
-
struct PFla_pair_t PFbui_fn_round_int (const PFla_op_t *loop,
bool ordering,
PFla_op_t **side_effects,
@@ -366,6 +365,30 @@
bool ordering,
PFla_op_t **side_effects,
struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_sqrt_int (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_sqrt_dec (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_sqrt_dbl (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_log_int (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_log_dec (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_log_dbl (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
/* 7. FUNCTIONS ON STRINGS */
/* 7.4. Functions on String Values */
@@ -921,6 +944,11 @@
PFla_op_t **side_effects,
struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_fn_prod_dbl (const PFla_op_t *loop,
+ bool ordering,
+ PFla_op_t **side_effects,
+ struct PFla_pair_t *args);
+
/* 15.5. Functions and Operators that Generate Sequences */
struct PFla_pair_t PFbui_op_to (const PFla_op_t *loop,
bool ordering,
U logical.h
Index: logical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- logical.h 14 Jan 2009 16:41:20 -0000 1.67
+++ logical.h 10 Mar 2009 12:20:43 -0000 1.68
@@ -178,6 +178,8 @@
, la_internal_op = 99 /**< operator used inside optimizations */
/* builtin support for XQuery functions */
, la_string_join =102 /**< fn:string-join */
+
+ , la_prod =110 /**< pf:product should be after la_sum */
, la_dummy =120 /**< dummy operator that does nothing */
------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins