gdk_setop.c
来自「这个是内存数据库中的一个管理工具」· C语言 代码 · 共 2,964 行 · 第 1/5 页
C
2,964 行
#line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloop_flt(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtvar(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHins_flt(bn->hhash, (hash_t) zz, h); zz++; } }#line 146 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloop_flt(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtloc(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHins_flt(bn->hhash, (hash_t) zz, h); zz++; } }#line 148 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } (void) cmp; break; }#line 173 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx"#endif#ifndef NOEXPAND_DBL case TYPE_dbl: #line 134 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" { int xx, (*cmp)(ptr, ptr) = BATatoms[b->ttype].atomCmp; size_t zz; BUN p, q, r; if (BAThordered(b)&1) { if (b->tvarsized) { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); for (r = p + xx; (r < q) && (simple_CMP(h,BUNhloc(b,r),dbl) == 0); r += xx) { if (HITs(t, BUNtvar(b,r))) goto nextlocvar_dbl; } bunfastins(bn, h, t); nextlocvar_dbl:; }#line 141 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); for (r = p + xx; (r < q) && (simple_CMP(h,BUNhloc(b,r),dbl) == 0); r += xx) { if (HITs(t, BUNtloc(b,r))) goto nextlocloc_dbl; } bunfastins(bn, h, t); nextlocloc_dbl:; }#line 143 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } } else if (b->tvarsized) { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloop_dbl(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtvar(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHins_dbl(bn->hhash, (hash_t) zz, h); zz++; } }#line 146 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloop_dbl(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtloc(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHins_dbl(bn->hhash, (hash_t) zz, h); zz++; } }#line 148 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } (void) cmp; break; }#line 177 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx"#endif#ifndef NOEXPAND_LNG case TYPE_lng: #line 134 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" { int xx, (*cmp)(ptr, ptr) = BATatoms[b->ttype].atomCmp; size_t zz; BUN p, q, r; if (BAThordered(b)&1) { if (b->tvarsized) { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); for (r = p + xx; (r < q) && (simple_CMP(h,BUNhloc(b,r),lng) == 0); r += xx) { if (HITs(t, BUNtvar(b,r))) goto nextlocvar_lng; } bunfastins(bn, h, t); nextlocvar_lng:; }#line 141 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); for (r = p + xx; (r < q) && (simple_CMP(h,BUNhloc(b,r),lng) == 0); r += xx) { if (HITs(t, BUNtloc(b,r))) goto nextlocloc_lng; } bunfastins(bn, h, t); nextlocloc_lng:; }#line 143 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } } else if (b->tvarsized) { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloop_lng(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtvar(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHins_lng(bn->hhash, (hash_t) zz, h); zz++; } }#line 146 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloop_lng(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtloc(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHins_lng(bn->hhash, (hash_t) zz, h); zz++; } }#line 148 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } (void) cmp; break; }#line 181 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx"#endif default: { int (*merge)(ptr, ptr)= BATatoms[b->htype].atomCmp; if (b->hvarsized) { #line 134 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" { int xx, (*cmp)(ptr, ptr) = BATatoms[b->ttype].atomCmp; size_t zz; BUN p, q, r; if (BAThordered(b)&1) { if (b->tvarsized) { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhvar(b,p); ptr t = BUNtvar(b,p); for (r = p + xx; (r < q) && (((*merge)(h,BUNhvar(b,r))) == 0); r += xx) { if (HITs(t, BUNtvar(b,r))) goto nextvarvarvar; } bunfastins(bn, h, t); nextvarvarvar:; }#line 141 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhvar(b,p); ptr t = BUNtloc(b,p); for (r = p + xx; (r < q) && (((*merge)(h,BUNhvar(b,r))) == 0); r += xx) { if (HITs(t, BUNtloc(b,r))) goto nextvarlocvar; } bunfastins(bn, h, t); nextvarlocvar:; }#line 143 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } } else if (b->tvarsized) { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhvar(b,p); ptr t = BUNtvar(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloopvar(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtvar(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHinsvar(bn->hhash, (hash_t) zz, h); zz++; } }#line 146 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhvar(b,p); ptr t = BUNtloc(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHloopvar(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtloc(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHinsvar(bn->hhash, (hash_t) zz, h); zz++; } }#line 148 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } (void) cmp; break; }#line 188 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 134 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" { int xx, (*cmp)(ptr, ptr) = BATatoms[b->ttype].atomCmp; size_t zz; BUN p, q, r; if (BAThordered(b)&1) { if (b->tvarsized) { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); for (r = p + xx; (r < q) && (((*merge)(h,BUNhloc(b,r))) == 0); r += xx) { if (HITs(t, BUNtvar(b,r))) goto nextlocvarloc; } bunfastins(bn, h, t); nextlocvarloc:; }#line 141 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 92 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); for (r = p + xx; (r < q) && (((*merge)(h,BUNhloc(b,r))) == 0); r += xx) { if (HITs(t, BUNtloc(b,r))) goto nextloclocloc; } bunfastins(bn, h, t); nextloclocloc:; }#line 143 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } } else if (b->tvarsized) { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtvar(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHlooploc(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtvar(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHinsloc(bn->hhash, (hash_t) zz, h); zz++; } }#line 146 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } else { #line 103 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" zz = BUNindex(bn, BUNfirst(bn)); if (!bn->hhash){ if (BAThash(bn, BATcapacity(bn)/2) == NULL) { BBPreclaim(bn); return NULL; } } BATloopFast(b, p, q, xx) { ptr h = BUNhloc(b,p); ptr t = BUNtloc(b,p); int ins = 1; hash_t yy; if (BATprepareHash(bn)) { BBPreclaim(bn); return NULL; } HASHlooploc(bn, bn->hhash, yy, h, r) { if (HITs(t, BUNtloc(bn,r))) { ins=0; break; } } if (ins) { bunfastins(bn, h, t); if (bn->hhash) HASHinsloc(bn->hhash, (hash_t) zz, h); zz++; } }#line 148 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx" } (void) cmp; break; }#line 190 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB/src/gdk/gdk_setop.mx"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?