Is it possible that passing a constant string as an argument is not supported by the OpenCL compiler?
this OpenCL code gives me a segmentation fault with BuildKernel():
void Updatec(MEMBLK *context, __constant const uchar *dataptr, const uchar len);
function xxx(MEMBLK* context) {
uchar i;
uchar finalcount[8];
Updatec(context, "\200", 1);
while ((context->count & 504) != 448) {
Updatec(context, "\0", 1);
context->count = 448; }
}
while the following runs fine:
constant uchar static_characters[] = { 128, 0 };
void Updatec(MEMBLK *context, __constant const uchar *dataptr, const uchar len);
function xxx(MEMBLK* context) {
uchar i;
Updatec(context, static_characters, 1);
while ((context->count & 504) != 448) {
Updatec(context, &static_characters[1], 1);
context->count = 448;
}
}
any ideas what is happening? thank you!
Message was edited by: janpieter sollie
*edit: re-inserted characters