I wat to calculate 8bit/16bit element.
void sum(char a<>, char b<>, out short c<>
c = a + b;
please show me the example on brook.
Thank for your comment.
I want to inplement Video encoder (input is yuv that each parameter is 8bit) on the brook+. It's slower than cpu that I use your idea.
Please tell me that How to describe on the brook+.
I found out a reason why it's slower, because "streamRead" and "streamWrite" are slow.
I described follow like that codes. Is it the specification about proccesing speed for "streamRead/Write" ?
int *a, *b, *c;
int out_c<1088, 480 >;
int in_a< 1088, 480 >;
int in_b< 1088, 480 >;
a = (int*)malloc(sizeof(int)*1088*480);
b = (int*)malloc(sizeof(int)*1088*480);
c = (int*)malloc(sizeof(int)*1088*480);
// CPU -> GPU
streamRead( in_a, a);
streamRead( in_b, b);
// involving kernel
StartKernel(in_a, in_b, out_c);
// GPU -> CPU
streamWrite( out_c, c);