Changeset: f39c9ad2b2a7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f39c9ad2b2a7
Modified Files:
monetdb5/extras/bwd/operations.c
Branch: bwd
Log Message:
* fixed minor bugs in selection buffer size calculation
Unterschiede (21 Zeilen):
diff --git a/monetdb5/extras/bwd/operations.c b/monetdb5/extras/bwd/operations.c
--- a/monetdb5/extras/bwd/operations.c
+++ b/monetdb5/extras/bwd/operations.c
@@ -534,7 +534,7 @@ static inline str uselect(bat *res, bat
slot->tailOffsetBits = batTailOffsetBits(data);
slot->tailOffsetValue =
batTailOffsetValue(data);
slot->residuals = NULL;
- slot->tailApproximation =
bwdClCreateBuffer(getCLContext(), CL_MEM_READ_WRITE,
MIN(dataCount,MAX_INTERMEDIATE_RESULT_SIZE)*slot->approximationBits/8+sizeof(clTail),
NULL, &err);
+ slot->tailApproximation =
bwdClCreateBuffer(getCLContext(), CL_MEM_READ_WRITE,
ceil(MIN(dataCount,MAX_INTERMEDIATE_RESULT_SIZE)*slot->approximationBits/8.0)+sizeof(clTail),
NULL, &err);
if(err) printf("#%s, bwdClCreateBuffer: %s;\n",
__func__, clError(err));
if(0) printf ("%s result tail approximation:
%p\n", __func__, slot->tailApproximation);
slot->headApproximation =
bwdClCreateBuffer(getCLContext(), CL_MEM_READ_WRITE, size, NULL, &err);
@@ -770,7 +770,7 @@ str uselectrefine(bat *res, bat *bid, pt
unsigned int approximationSize;
err = clEnqueueReadBuffer(getCommandQueue(),
batHeadApproximation(approximation), CL_TRUE, 0, sizeof(int),
&approximationSize , 0, NULL, NULL);
approximationSize *= sizeof(int);
- approximationSize == sizeof(clHead);
+ approximationSize += sizeof(clHead);
compressedHead = GDKmalloc(approximationSize);
err = clEnqueueReadBuffer(getCommandQueue(),
batHeadApproximation(approximation), CL_TRUE, 0, approximationSize,
compressedHead , 0, NULL, NULL);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list