Changeset: c6f7ee2604c6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c6f7ee2604c6 Modified Files: gdk/gdk_calc.c Branch: qcancel Log Message:
timeout gdk calc division
diffs (78 lines):
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -8807,9 +8807,16 @@ div_##TYPE1##_##TYPE2##_##TYPE3(const TY
{ \
BUN nils = 0; \
BUN i = 0, j = 0, ncand = ci1->ncand; \
+ size_t counter = 0; \
+ lng timeoffset = 0; \
+ QryCtx *qry_ctx = MT_thread_get_qry_ctx(); \
+ if (qry_ctx != NULL) { \
+ timeoffset = (qry_ctx->starttime && qry_ctx->querytimeout) ?
(qry_ctx->starttime + qry_ctx->querytimeout) : 0; \
+ } \
\
if (ci1->tpe == cand_dense && ci2->tpe == cand_dense) { \
for (BUN k = 0; k < ncand; k++) { \
+ GDK_CHECK_TIMEOUT(timeoffset, counter,
TIMEOUT_HANDLER(BUN_NONE)); \
if (incr1) \
i = canditer_next_dense(ci1) - candoff1; \
if (incr2) \
@@ -8834,6 +8841,7 @@ div_##TYPE1##_##TYPE2##_##TYPE3(const TY
} \
} else { \
for (BUN k = 0; k < ncand; k++) { \
+ GDK_CHECK_TIMEOUT(timeoffset, counter,
TIMEOUT_HANDLER(BUN_NONE)); \
if (incr1) \
i = canditer_next(ci1) - candoff1; \
if (incr2) \
@@ -8872,9 +8880,16 @@ div_##TYPE1##_##TYPE2##_##TYPE3(const TY
{ \
BUN nils = 0; \
BUN i = 0, j = 0, ncand = ci1->ncand; \
+ size_t counter = 0; \
+ lng timeoffset = 0; \
+ QryCtx *qry_ctx = MT_thread_get_qry_ctx(); \
+ if (qry_ctx != NULL) { \
+ timeoffset = (qry_ctx->starttime && qry_ctx->querytimeout) ?
(qry_ctx->starttime + qry_ctx->querytimeout) : 0; \
+ } \
\
if (ci1->tpe == cand_dense && ci2->tpe == cand_dense) { \
for (BUN k = 0; k < ncand; k++) { \
+ GDK_CHECK_TIMEOUT(timeoffset, counter,
TIMEOUT_HANDLER(BUN_NONE)); \
if (incr1) \
i = canditer_next_dense(ci1) - candoff1; \
if (incr2) \
@@ -8905,6 +8920,7 @@ div_##TYPE1##_##TYPE2##_##TYPE3(const TY
} \
} else { \
for (BUN k = 0; k < ncand; k++) { \
+ GDK_CHECK_TIMEOUT(timeoffset, counter,
TIMEOUT_HANDLER(BUN_NONE)); \
if (incr1) \
i = canditer_next(ci1) - candoff1; \
if (incr2) \
@@ -8947,9 +8963,16 @@ div_##TYPE1##_##TYPE2##_##TYPE3(
\
{ \
BUN nils = 0; \
BUN i = 0, j = 0, ncand = ci1->ncand; \
+ size_t counter = 0; \
+ lng timeoffset = 0; \
+ QryCtx *qry_ctx = MT_thread_get_qry_ctx(); \
+ if (qry_ctx != NULL) { \
+ timeoffset = (qry_ctx->starttime && qry_ctx->querytimeout) ?
(qry_ctx->starttime + qry_ctx->querytimeout) : 0; \
+ } \
\
if (ci1->tpe == cand_dense && ci2->tpe == cand_dense) { \
for (BUN k = 0; k < ncand; k++) { \
+ GDK_CHECK_TIMEOUT(timeoffset, counter,
TIMEOUT_HANDLER(BUN_NONE)); \
if (incr1) \
i = canditer_next_dense(ci1) - candoff1; \
if (incr2) \
@@ -8980,6 +9003,7 @@ div_##TYPE1##_##TYPE2##_##TYPE3(
\
} \
} else { \
for (BUN k = 0; k < ncand; k++) { \
+ GDK_CHECK_TIMEOUT(timeoffset, counter,
TIMEOUT_HANDLER(BUN_NONE)); \
if (incr1) \
i = canditer_next(ci1) - candoff1; \
if (incr2) \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list
