Changeset: 845d2a6ead09 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=845d2a6ead09
Modified Files:
monetdb5/extras/bwd/91_bwd.sql
monetdb5/extras/bwd/operations.c
monetdb5/extras/bwd/utilities.c
Branch: bwd
Log Message:
* fixing compiler weirdness
Unterschiede (78 Zeilen):
diff --git a/monetdb5/extras/bwd/91_bwd.sql b/monetdb5/extras/bwd/91_bwd.sql
--- a/monetdb5/extras/bwd/91_bwd.sql
+++ b/monetdb5/extras/bwd/91_bwd.sql
@@ -1,6 +1,12 @@
create function bwdecomposedec(col decimal(9,2), bits integer)
returns varchar(4096) external name bwd.decompose;
+create function bwdecomposedec8_5(col decimal(8,5), bits integer)
+returns varchar(4096) external name bwd.decompose;
+
+create function bwdecomposedec7_5(col decimal(7,5), bits integer)
+returns varchar(4096) external name bwd.decompose;
+
create function bwdecomposedate(col date, bits integer)
returns varchar(4096) external name bwd.decompose;
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
@@ -25,6 +25,14 @@ static const int eagerBufferLoading = 1;
#pragma mark Actual MAL Operations Implementation
+#ifdef __APPLE__
+void clock_gettime(int a, struct timespec* b){
+ b->tv_sec = 0;
+ b->tv_nsec = 0;
+};
+static const int CLOCK_THREAD_CPUTIME_ID;
+#endif
+
int getCount(cl_mem memoryObject){
cl_int err = 0;
int result;
@@ -53,7 +61,7 @@ clHead* getPositionsColumn(cl_mem memory
} else {
int count;
err = clEnqueueReadBuffer(getCommandQueue(),
memoryObject, CL_TRUE, 0, sizeof(int), &count, 0, NULL, NULL);
- printf ("positioncount: %ld\n", count);
+ printf ("positioncount: %d\n", count);
*bufferSize = sizeof(int) * count;
}
@@ -128,11 +136,11 @@ str BWDLeftJoinApproximate(bat * res, ba
int headCount; // :-)
if((err = clEnqueueReadBuffer(getCommandQueue(), leftColumn,
CL_TRUE, 0, sizeof(int), &headCount , 0, NULL, NULL)))
- printf("#%s, clEnqueueReadBuffer: %s;\n", __func__,
clError(err));
+ printf("#%s, clEnqueueReadBuffer (left): %s;\n",
__func__, clError(err));
clTail newTailDefinition = {.count = headCount}; // :-)
if((err = clEnqueueReadBuffer(getCommandQueue(), rightColumn,
CL_TRUE, sizeof(int), sizeof(int), &newTailDefinition.base , 0, NULL, NULL)))
- printf("#%s, clEnqueueReadBuffer: %s;\n", __func__,
clError(err));
+ printf("#%s, clEnqueueReadBuffer (right): %s;\n",
__func__, clError(err));
BAT* result = BATnew(TYPE_void, ATOMtype(right->ttype), 0);
{
@@ -352,6 +360,8 @@ static inline str uselect(bat *res, bat
cl_int err =
clEnqueueReadBuffer(getCommandQueue(), batTailApproximation(result), CL_TRUE,
0, resultSize, compressedTail , 0, NULL, NULL);
if(err) printf("#%s, clEnqueueReadBuffer:
%s;\n", __func__, clError(err));
}
+ } else {
+ printf ("tuple count of %d is 0, not procssing furhter\n",
data->batCacheid);
}
if(1) printf ("%s result bat (%d) is of type [%s%s, %s%s]\n", __func__,
result->batCacheid, typeNames[BAThtype(result)], BAThvoid(result)?" (void)":"",
typeNames[BATttype(result)], BATtvoid(result)?" (void)":"");
BBPkeepref(*res = result->batCacheid);
diff --git a/monetdb5/extras/bwd/utilities.c b/monetdb5/extras/bwd/utilities.c
--- a/monetdb5/extras/bwd/utilities.c
+++ b/monetdb5/extras/bwd/utilities.c
@@ -269,7 +269,7 @@ const unsigned int decomposeIntArray(con
const register unsigned int residualBytes = (32-approximationBits)/8;
const register unsigned int approximationBytes =
(slot->approximationBits/8)-(slot->tailOffsetBits/8);
- printf ("using %s for approximation and %s for residuals \n",
humanreadablesize(approximationBytes*(size+1)+ sizeof(clTail), (char[64]){},
64), humanreadablesize(residualBytes*(size+1), (char[]){64}, 64));
+ printf ("using %s for approximation and %s for residuals \n",
humanreadablesize(approximationBytes*(size+1)+ sizeof(clTail), alloca(64), 64),
humanreadablesize(residualBytes*(size+1), alloca(64), 64));
slot->residuals = calloc((size+1)*residualBytes, sizeof(char));
clTail* approximation = calloc((size+1)*approximationBytes+
sizeof(clTail), sizeof(char));
approximation->base = subjectBounds.min;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list