Changeset: ec6d7f82ab00 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec6d7f82ab00
Modified Files:
monetdb5/extras/bwd/cl_program_utilities.c
Branch: bwd
Log Message:
* cl program caching was still using byte-resolution, not any more
Unterschiede (35 Zeilen):
diff --git a/monetdb5/extras/bwd/cl_program_utilities.c
b/monetdb5/extras/bwd/cl_program_utilities.c
--- a/monetdb5/extras/bwd/cl_program_utilities.c
+++ b/monetdb5/extras/bwd/cl_program_utilities.c
@@ -73,9 +73,9 @@ cl_program getMultiplyProgram(unsigned i
}
cl_program getProjectionLeftjoinProgram(unsigned int approximationBits,
unsigned int offsetBits){
- static cl_program programCache[4][8] = {}; //TODO: limited to four
devices
+ static cl_program programCache[4][64] = {}; //TODO: limited to four
devices
const int deviceForThisThread = getGPUDeviceForThisThread();
- if(programCache[deviceForThisThread][approximationBits/8-offsetBits/8]
== NULL){
+ if(programCache[deviceForThisThread][approximationBits] == NULL){
const char* sourceCode = ""
"#define accessType unsigned int\n"
" __constant static const size_t targetTypeBits =
(sizeof(accessType)*8);\n"
@@ -103,14 +103,15 @@ cl_program getProjectionLeftjoinProgram(
" }else{"
" atomic_add(&(outputTail->values[outslot]),
(delta << (targetTypeBits-outoffset-approximationBits)));"
" }"
+ " if(outslot == 0)"
+ " printf(\"slot:0, offset: %u, delta: %u,
outputTail->values[0]: %u, slot: %u, offset: %u, vals[slot]: %u\\n\",
outoffset, delta, outputTail->values[outslot], slot, offset, vals[slot]);"
" }\n"
"}";
char options[256];
- int type = TYPE_int;
- snprintf(options, 256, "-D approximationBits=%d -D
residualBits=%lu", approximationBits,
typeSizes[type]*8-approximationBits-offsetBits);
-
programCache[deviceForThisThread][approximationBits/8-offsetBits/8] =
compileProgram(sourceCode, options);
+ snprintf(options, 256, "-D approximationBits=%d",
approximationBits);
+ programCache[deviceForThisThread][approximationBits] =
compileProgram(sourceCode, options);
}
- return
programCache[deviceForThisThread][approximationBits/8-offsetBits/8];
+ return programCache[deviceForThisThread][approximationBits];
}
cl_program getUSelectProgram(int type, char* predicateOperation, char*
predicateOperation2, unsigned int approximationBits, unsigned int offsetBits,
char inputIsVoidHeaded){
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list