Changeset: 71b71ebda4e6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=71b71ebda4e6
Modified Files:
monetdb5/extras/crackers/60_crackers.mal
monetdb5/extras/crackers/Makefile.ag
monetdb5/extras/crackers/crackers.mx
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_support.h
Branch: holindex
Log Message:
Initial step for holistic indexing.
I implemented an operator that initializes with zero the weights in a list.
diffs (175 lines):
diff --git a/monetdb5/extras/crackers/60_crackers.mal
b/monetdb5/extras/crackers/60_crackers.mal
--- a/monetdb5/extras/crackers/60_crackers.mal
+++ b/monetdb5/extras/crackers/60_crackers.mal
@@ -19,5 +19,6 @@
library crackers;
include opt_selcrack;
include opt_selcrackst;
+include opt_selcrackhol;
include crackers;
diff --git a/monetdb5/extras/crackers/Makefile.ag
b/monetdb5/extras/crackers/Makefile.ag
--- a/monetdb5/extras/crackers/Makefile.ag
+++ b/monetdb5/extras/crackers/Makefile.ag
@@ -35,9 +35,13 @@ lib_crackers = {
crackers_index.mx \
crackers_core_unordered.mx \
crackers_select_ops.mx \
+ crackers_holistic.c \
+ crackers_holistic.h \
crackers_selectst_ops.mx \
+ crackers_selecthol_ops.mx \
opt_selcrack.mx \
- opt_selcrackst.mx
+ opt_selcrackst.mx \
+ opt_selcrackhol.mx
LIBS = ../../tools/libmonetdb5 \
../../../gdk/libbat \
../../../common/stream/libstream \
@@ -49,7 +53,8 @@ headers_mal = {
DIR = libdir/monetdb5
SOURCES = crackers.mx \
opt_selcrack.mx \
- opt_selcrackst.mx
+ opt_selcrackst.mx \
+ opt_selcrackhol.mx
}
headers_crackersautoload = {
diff --git a/monetdb5/extras/crackers/crackers.mx
b/monetdb5/extras/crackers/crackers.mx
--- a/monetdb5/extras/crackers/crackers.mx
+++ b/monetdb5/extras/crackers/crackers.mx
@@ -239,6 +239,55 @@ address CRKthetaselectst_@2
comment "Retrieve the subset using a cracker
index producing preferably a BATview.";
+
+command selecthol(b:bat[:oid,:@2],l:@2,h:@2):bat[:oid,:@2]
+address CRKselecthol_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command selecthol(b:bat[:oid,:@2],l:@2):bat[:oid,:@2]
+address CRKselectholValue_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command selecthol(b:bat[:oid,:@2],l:@2,h:@2,li:bit,hi:bit):bat[:oid,:@2]
+address CRKselectholBounds_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command uselecthol(b:bat[:any_1,:@2],l:@2,h:@2):bat[:any_1,:void]
+address CRKuselecthol_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command uselecthol(b:bat[:any_1,:@2],l:@2):bat[:any_1,:void]
+address CRKuselectholValue_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command uselecthol(b:bat[:any_1,:@2],l:@2,h:@2,li:bit,hi:bit):bat[:any_1,:void]
+address CRKuselectholBounds_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command thetauselecthol(b:bat[:any_1,:@2],v:@2,op:str):bat[:any_1,:void]
+address CRKthetauselecthol_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command thetaselecthol(b:bat[:any_1,:@2],v:@2,op:str):bat[:any_1,:@2]
+address CRKthetaselecthol_@2
+comment "Retrieve the subset using a cracker
+ index producing preferably a BATview.";
+
+command initFrequencyStruct(b:bat[:any_1,:@2]):void
+address CRKinitFrequencyStruct_@2
+comment "Initialize the struct(lifo) with zero values.";
+
+command selectNode(l:int,h:int):void
+address CRKselectNode
+comment "Select node/BAT to crack (randomly).";
+
@
@= Index
command printCrackerIndexBATpart(b:bat[:any_1,:@2]):void
@@ -296,12 +345,15 @@ comment "Break a BAT into three pieces w
#include "crackers_index.h"
#include "crackers_select_ops.h"
#include "crackers_selectst_ops.h"
+#include "crackers_selecthol_ops.h"
+#include "crackers_holistic.h"
#include "crackers_core_unordered.h"
#include "crackers_AVL_tree.h"
#ifdef LIBCRACKERS
extern int maxCrackMap;
extern CrackerIndexNode *CrackerIndex;
+extern FrequencyNode *FrequencyStruct;
extern int IndexEntries;
extern int IndexSize;
extern int IndexStop;
@@ -323,6 +375,7 @@ extern struct storageManagement *Storage
int maxCrackMap = 0;
CrackerIndexNode *CrackerIndex;
+FrequencyNode *FrequencyStruct;
struct storageManagement *StorageInfo = NULL;
diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c
--- a/monetdb5/optimizer/opt_pipes.c
+++ b/monetdb5/optimizer/opt_pipes.c
@@ -296,6 +296,28 @@ struct PIPELINES {
"optimizer.multiplex();"
"optimizer.garbageCollector();",
"experimental", "OPTselcrackst", 0},
+/*The HOLISTIC indexing pipeline*/
+ {"crackerhol_pipe",
+ "optimizer.inline();"
+ "optimizer.remap();"
+ "optimizer.evaluate();"
+ "optimizer.costModel();"
+ "optimizer.coercions();"
+ "optimizer.emptySet();"
+ "optimizer.aliases();"
+ "optimizer.selcrackhol();"
+ "optimizer.deadcode();"
+ "optimizer.commonTerms();"
+ "optimizer.groups();"
+ "optimizer.joinPath();"
+ "optimizer.reorder();"
+ "optimizer.deadcode();"
+ "optimizer.reduce();"
+ "optimizer.dataflow();"
+ "optimizer.history();"
+ "optimizer.multiplex();"
+ "optimizer.garbageCollector();",
+ "experimental", "OPTselcrackhol", 0},
{"sidcrack_pipe",
diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c
--- a/monetdb5/optimizer/opt_support.c
+++ b/monetdb5/optimizer/opt_support.c
@@ -603,6 +603,7 @@ struct OPTcatalog {
{"replication", 0, 0, 0, DEBUG_OPT_REPLICATION},
{"selcrack", 0, 0, 0, DEBUG_OPT_SELCRACK},
{"selcrackst", 0, 0, 0, DEBUG_OPT_SELCRACKST},
+{"selcrackhol", 0, 0, 0, DEBUG_OPT_SELCRACKHOL},
{"sidcrack", 0, 0, 0, DEBUG_OPT_SIDCRACK},
{"singleton", 0, 0, 0, DEBUG_OPT_SINGLETON},
{"strengthreduction", 0, 0, 0, DEBUG_OPT_STRENGTHREDUCTION},
diff --git a/monetdb5/optimizer/opt_support.h b/monetdb5/optimizer/opt_support.h
--- a/monetdb5/optimizer/opt_support.h
+++ b/monetdb5/optimizer/opt_support.h
@@ -93,6 +93,7 @@
#define DEBUG_OPT_HEURISTIC 49
#define DEBUG_OPT_CENTIPEDE 50
#define DEBUG_OPT_SELCRACKST 51
+#define DEBUG_OPT_SELCRACKHOL 52
#define DEBUG_OPT(X) ((lng) 1 << (X))
opt_export lng optDebug;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list